Inserts plain text into a pargraph or span
package |
Docxpresso |
---|---|
subpackage |
Core |
__construct(\Docxpresso\Core\Elements\DOMElement $node, \Docxpresso\Core\Elements\ODFElement $parentODFElement = NULL, string $target = 'document')
access |
public |
---|---|
\Docxpresso\Core\Elements\DOMElement
\Docxpresso\Core\Elements\ODFElement
string
_addStyle(string $type, mixed $style, string $styleId, string $target) : array
access |
private |
---|
string
mixed
string
string
array
_break(mixed $style = '') : mixed
access |
private |
---|
mixed
mixed
_drawControl(string $name, string $type, array $options) : \Docxpresso\Core\Elements\ODFElement
access |
protected |
---|
string
string
array
\Docxpresso\Core\Elements\ODFElement
_getChart() : mixed
access |
private |
---|---|
mixed
_gotoODFnode(\Docxpresso\Core\Elements\ODFElement $odfNode, string $name = '') : \Docxpresso\Core\Elements\ODFNode
access |
public |
---|
\Docxpresso\Core\Elements\ODFElement
string
ODF node name
\Docxpresso\Core\Elements\ODFNode
_insertListItems(\Docxpresso\Core\Elements\ODFElement $element, array $items, string $type) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
\Docxpresso\Core\Elements\ODFElement
array
string
\Docxpresso\Core\Elements\ODFElement
_insertODFNode(\Docxpresso\Core\Elements\DOMNode $newNode, \Docxpresso\Core\Elements\DOMElement $refNode = NULL, string $mode = 'append') : void
access |
public |
---|
\Docxpresso\Core\Elements\DOMNode
the node to insert
\Docxpresso\Core\Elements\DOMElement
the node to insert the new node
string
append, after, before, first
_list(string $listId, array $options, boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
private |
---|
string
array
boolean
\Docxpresso\Core\Elements\ODFElement
_note(string $type, array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
private |
---|
string
it can be endnote or footnote
array
boolean
\Docxpresso\Core\Elements\ODFElement
_paragraph(array $options = array()) : \Docxpresso\Core\Elements\ODFElement
_plainText(string $text) : \Docxpresso\Core\Elements\ODFElement
_styleAttribute(\Docxpresso\Core\Elements\DOMNode $node) : string
access |
private |
---|
\Docxpresso\Core\Elements\DOMNode
string
_styleProcessing(string $type, string $defaultStyle, array $options, string $styleId, string $target = 'document') : void
access |
protected |
---|
string
string
array
string
string
_themeStyles(string $type, string $defaultStyle, array $options) : string
access |
protected |
---|
string
string
array
string
bookmark(array $options, boolean $reference = false) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'name' => (string) the bookmark name needed for croos references
'text' => (string) the text to insert (can be empty)
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the text element so they can be nested.
\Docxpresso\Core\Elements\ODFElement
cell(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'cell-content' => (mixed) the cell content. It may be a string of
text or a document fragment.
'rowspan' => (int) the number of rows that the table cell should
cover.
'colspan' => (int) the number of columns that the table cell should
cover.
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
chart(string $type, array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
string
the available types are: 2D: column, bar, pie, donut, area, line, scatter, bubble, radar, filled-radar, column-line 3D: 3Dcolumn, 3Dbar, 3Dpie, 3Ddonut, 3Darea, 3Dline, 3Dscatter
array
with the following keys and values
'data' => (array) it can be an array with different formats:
pie and donuts charts:
array( 'category_1' => 3,
'category_2' => 5,
'category_3' => 4.3,
)
bar, column, area , line, scatter, (filled-)radar
and column-line charts:
array( 'series' => array('ser_1', 'ser_2'),
'category_1' => array(20,40),
'category_2' => array(30,10),
'category_3' => array(12.5, 54),
)
buble charts
array( array(2, 5 7),
array(4.3, 12, 3.5),
array(6, 3, 5),
)
'chart-properties' => (array) with keys and values:
'data-label-number' => (string) none, value or percentage.
'label-position' => (string) avoid-overlap, center,
top, top-right, right, bottom-right, bottom, bottom-left, left,
top-left, inside, outside or near-origin.
'label-position-negative' => (string) it only applies if
the value is negative. If not given the value for
data-label-position will be used
top-left, inside, outside or near-origin.
'hole-size' => (int) specifies the diameter of the inner hole
of a ring chart as percentage of the outer diameter of the
outermost ring.
'pie-offset' => (int) specifies the distance of a segment from
the center of the circle in case of circle charts. The offset
is given as an integer which is interpreted as a percentage of
the radius of the circle. In case of ring charts specifies an
additional distance of a segment from the center of the circle.
The distance is given as percentage of the thickness of the
ring.
'angle-offset' => (int) it specifies in degrees a counter
clockwise rotation of a polar coordinate in a circle, ring or
polar chart.
'stacked' => (boolean) default value is false. it specifies the
accumulation of the series values per category. Each value is
in addition to the other values in the same category.
'gap-width' => (int) specifies a gap between neighboring groups
of bars in a bar/column chart. It is specified as an integer
percentage relative to the width of a single bar
'overlap' => (int) specifies how much bars within the same
category in a bar/column chart overlap. The attribute value is
an integer that is interpreted as a percentage relative to the
width of a bar. Negative values specify gaps between bars
'percentage' => (boolean) if true specifies a percentage
accumulation of values per category
'chart-interpolation' => (string) none (if points are to be
connected by a straight line, b-spline or cubic-spline.
'spline-resolution' => (int) a positive inetger. It only applies
if the chart-interpolation option is not equal to none.
'deep' => (boolean) if true the series will be shown
in 3D one behind the other and not side by side. It only
applies to 3D charts.
'solid-type' => (string) cuboid (default), cylinder, cone or
pyramid. It only applies to 3D bar charts.
'style' => (string) a list of properties in CSS format that only
set the global properties of the chart. In order to customize the
different chart components you should use the associated
chart methods.
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
chart3DTransform( $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
with the following keys and values
'rotate-x' => (int) rotation angle respect the x-axis (default
value is 11)
'rotate-y' => (int) rotation angle respect the y-axis (default
value is 25)
'rotate-z' => (int) rotation angle respect the z-axis (default
value is 5)
'right-angled-axes' => (boolean) default value is true (if true
the rotate-z option is ignored)
'perspective' => (int) given as a percentage (default value
is 20)
\Docxpresso\Core\Elements\ODFElement
chartAxis(\Docxpresso\Core\Elements\(string) $axis, $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
\Docxpresso\Core\Elements\(string)
it may be x, y or z
with the following keys and values
'visible' => (boolean) default value is true
'logarithmic' => (boolean) default value is false
'font-color' => (string) hexadecimal color: #ff0000, ...
'font-family' => (string) Arial, Calibri, ...
'font-size' => (int) given in points
'axis-position' => (mixed) it can be start (default), end or a
numeric value dictating where the perpendicular axis shiould cross.
In the case of the y-axis it refers to the category, i.e. 1 before
the first category, 2 behind the second and so long so forth
'minimum' => (float) specifies the minimun value of an axes
'maximum' => (float) specifies the maximun value of an axes
'label-arrangement' => (string) side-by-side, stagger-even or
stagger-odd.
'display-label' => (boolean) default value is true
'axis-label-position' => (string) near-axis (default),
near-axis-other-side, outside-end or outside-start
'reverse-direction' => (boolean) default is false
'text-overlap' => (boolean) default is false. It specifies
whether axis labels may overlap each other
'line-break' => (boolean) default is true. specifies whether
word wrapping is allowed for axis labels
'stroke' => (string) solid (default), dash or none.
'stroke-width' => (string) given in points, cm or in. The defaults
are: 0.75pt for major grids and 0.5pt for minor grids
'stroke-color' => (string) hexadecimal color.
'stroke-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke-linejoin' => (string) round (default), bevel, middle,
miter or none
'stroke-linecap' => (string) butt (default), round or square.
'interval-major' => (float) specifies the separation between
major intervals within an axis
'interval-minor-divisor' => (integer) specifies the number of
divisions between to major interval lines
'tick-marks-major-inner' => (boolean) default value is false
'tick-marks-minor-inner' => (boolean) default value is false
'tick-marks-major-outer' => (boolean) default value is false
'tick-marks-minor-outer' => (boolean) default value is false
\Docxpresso\Core\Elements\ODFElement
chartComponent(string $component = 'wall', $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
string
it can be wall or floor
with the following keys and values
'fill-color' => (string) hexadecimal color: #ffffff (default)
'opacity' => (string) percentage: 100% (default), 80%, ....
'stroke' => (string) solid (default), dash or none.
'stroke-width' => (string) given in points.
'stroke-color' => (string) hexadecimal color.
'stroke-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke-linejoin' => (string) round (default), bevel, middle,
miter or none
'stroke-linecap' => (string) butt (default), round or square.
\Docxpresso\Core\Elements\ODFElement
chartData(array $data, $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
(array) an array of arrays each of them with the following keys and values:
'fill-color' => (string) hexadecimal color.
'opacity' => (string) percentage: 100% (default), 80%, ....
'stroke' => (string) solid (default), dash or none.
'stroke-width' => (string) given in points, cm or in.
'stroke-color' => (string) hexadecimal color.
'stroke-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke-linejoin' => (string) round (default), bevel, middle,
miter or none
'stroke-linecap' => (string) butt (default), round or square.
'solid-type' => (string) cuboid (default), cylinder, cone or
pyramid. It only applies to 3D bar and column charts.
\Docxpresso\Core\Elements\ODFElement
chartGrid(\Docxpresso\Core\Elements\(string) $axis = 'x', \Docxpresso\Core\Elements\(string) $type = 'major', $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
\Docxpresso\Core\Elements\(string)
it may be x, y or z
\Docxpresso\Core\Elements\(string)
it may be major or minor
with the following keys and values
'stroke' => (string) solid (default), dash or none.
'stroke-width' => (string) given in points. The defaults
are: 0.75pt for major grids and 0.5pt for minor grids
'stroke-color' => (string) hexadecimal color. For major grids the
default is #d9d9d9 and #f0f0f0 for minor grids
'stroke-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke-linejoin' => (string) round (default), bevel, middle,
miter or none
'stroke-linecap' => (string) butt (default), round or square.
\Docxpresso\Core\Elements\ODFElement
chartLegend( $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
with the following keys and values
'legend-position' => (string) left, right, top or bottom
'color' => (string) hexadecimal value: #333333, ...
'font-family' => (string) Arial, Calibri, ...
'font-size => (string) (string) given in points, cm or in.
'font-weight' => (string) bold or normal.
'font-style' => (string) italic or normal.
'fill-color' => (string) hexadecimal color: #ffffff (default)
'fill-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke' => (string) solid (default), dash or none.
'stroke-width' => (string) given in points, cm or in.
'stroke-color' => (string) hexadecimal color.
'stroke-opacity' => (string) percentage: 100% (default), 80%, ....
'stroke-linejoin' => (string) round (default), bevel, middle,
miter or none
'stroke-linecap' => (string) butt (default), round or square.
\Docxpresso\Core\Elements\ODFElement
checkbox(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'form-name' => (string) the name of the form where we want to insert
this control
'name' => (string) the control name
'value' => (string) the associated value
'checked' => (bool) true or false
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) fro absolutely positioned controls (optional)
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
columnBreak() : void
access |
public |
---|---|
documentFragment(\Docxpresso\Core\Elements\ODFElement $odfNode = NULL) : \Docxpresso\Core\Elements\DocumentFragment
access |
public |
---|
\Docxpresso\Core\Elements\ODFElement
\Docxpresso\Core\Elements\DocumentFragment
end( $element = '') : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
it can take the following values: 'cell' 'chart', 'frame', 'endnote', 'footnote', 'link', 'list', 'math', 'paragraph', 'root', 'row', 'table', if element is left empty the method returns the root document element.
\Docxpresso\Core\Elements\ODFElement
endnote(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
the posible keys and values are:
'label' => (string) the footnote label. You should not declare this
option if you prefer automatic labelling.
'note' => (mixed) the note content. It can be a plain string of
text or a Document Fragment object.
'style' => (string) a list of properties in CSS format for the note.
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the form element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
field(string $type, array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
string
the available types are: author-name: the full author name bookmark-ref: reference to a bookmark page date: current date page-count: total number of pages page-number: current page number (with an optional offset) title: document title
array
the possible keys and values are:
'default-value' => (string) the field default value
'number-format' => (string) used for page-count and page-number
1: Hindu-Arabic number sequence, starts with 1 (default).
a: number sequence of lowercase Modern Latin basic alphabet
characters, starts with 'a'.
A: number sequence of uppercase Modern Latin basic alphabet
characters, starts with 'A'.
i: number sequence of lowercase Roman numerals, starts with 'i'.
I: number sequence of uppercase Roman numerals, start with 'I'.
'number-offset' => (int) allows to start the numbering with a given
offset. For example, if we would like to ignore the front page for
page numbering we should choose a value of -1.
'reference-format' => (string) used for bookmark-ref
page: displays the number of the page on which the
referenced item appears.
text: displays the text of the referenced item.
'reference-name' => (string) the name of the linked reference
'date-format' => (array) the date is built by running consecutively
through the array entries. possible values are:
day: day of the month with two digits
day-short: day of the month with one/two digits (as required)
day-of-week: day of the week in textual format
day-of-week-short: abbreviated day of the week in textual format
month: month of the year with two digits
month-short: month of the year with one/two digits (as required)
month-of-year: month of year in textual form
month-of-year-short: month of year in abbreviated textual form
year: year number with four digits
year-short: year number with 2 digits
text (string): an arbitrary string of text
Examples:
1. array('day', '/', 'month', '/', 'year') yields 07/03/2014
2. array('day-of-week', ' ', 'day-short', ', ' , 'month-of-year', ' ', 'year')
yields Thursday 7, November-2014
'style' => (string) a list of properties in CSS format
boolean
if true returns a reference to the form element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
footnote(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
the posible keys and values are:
'label' => (string) the footnote label. You should not declare this
option if you prefer automatic labelling.
'note' => (mixed) the note content. It can be a plain string of
text or a Document Fragment object.
'style' => (string) a list of properties in CSS format for the note.
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the form element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
form(array $options, boolean $reference = true) : void
access |
public |
---|
array
the avalaible key and values are: 'name' => (string) a unique name that identifies the form. If not given will be automatically generated. 'target' => (string) that can be '_blank (default), _self or _top or a frame name 'action' => (string) points to the URL (if any) where the data of the form should be sent and processed 'method' => (string) may be get (default) or post
boolean
if true returns a reference to the form element so further elements can be nested. The default value is true.
frame(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) for absolutely positioned frames (optional)
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
getAncestor(\Docxpresso\Core\Elements\ODFElement $odfNode, array $allowedNodes) : \Docxpresso\Core\Elements\ODFNode
access |
public |
---|
\Docxpresso\Core\Elements\ODFElement
array
where the keys must be the allowed tags and the value should be set to true. The method in_array is not used to improve performance
\Docxpresso\Core\Elements\ODFNode
getCurrentStyleId() : string
access |
public |
---|---|
string
getDefaultStyles(integer $data) : string
access |
public |
---|
integer
string
getHasODFChild() : boolean
access |
public |
---|---|
boolean
getNode() : \Docxpresso\Core\Elements\DOMNode
access |
public |
---|---|
\Docxpresso\Core\Elements\DOMNode
getNodeType() : string
access |
public |
---|---|
string
getParentODFElement() : \Docxpresso\Core\Elements\ODFElement
getStyleId() : string
access |
public |
---|---|
string
getTarget() : string
access |
public |
---|---|
string
header(array $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'section' => (int) the section number. If not given it is assumed
that the header will be inserted in the current section
'left-page' => (bool) if true the header will be specific of left
pages only
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
\Docxpresso\Core\Elements\ODFElement
heading(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'level' => (int) the heading level: 1 (h1), 2 (h2),... up to 6
'text' => (string) an optional text (it can also be added later
with the text method)
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'enforce' => (bool) if set to true and the current element does not
accept paragraphs the method searches for the first ancestor that
allows for the isnsertion. Beware that the return element is a
reference to the inserted paragraph and the chaining may result
affected consequently!!
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
hr(array $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
\Docxpresso\Core\Elements\ODFElement
html(array $options) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
the available keys and values are: 'baseURL' => (string) if set enforces the base URL used for relative paths, otherwise it will be autodetected (if possible). 'encoding' => (string) if set enforces the encoding to be used otherwise it will be autodetected. 'isFile' => (boolean) true if the HTML code has to be retrieved from a file. Default value is false, i.e. the HTML is a string. 'context' => (array) this option is only taken into account if we need to fetch the HTML code via a http request. Its use is optional and if not set standard values, valid in the majority of cases, will be used. This option sets the http context (headers) for the http request. Depending on the server this option may be mandatory, i.e. the server will not return anything unless it receives this additional info. The keys and values are(http://www.php.net/manual/en/context.http.php):
'method': GET (default value) or POST.
'header': an array with the required headers that may include among
others: 'Referer', 'User-agent', 'Referer', 'Connection', ...
'proxy':address of the proxy server
'request_fulluri' true or false (default).
'follow_location': Follow Location header redirects. Set to 0
to disable. Default value is 1.
'max_redirects'The maximum number of redirects to follow.
1 or less means that no redirects are followed (default is 20).
'protocol_version': HTTP protocol version (default is 1.0).
'html' => (string) it can be a string of HTML code or the path to the the path to the HTML file if the 'isFile' option is set to true.
\Docxpresso\Core\Elements\ODFElement
image(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'src' => (string) path to the image we want to insert
'title' => (string) the image title should be included for
accesibility reasons
'description' => (string) the image description should be included
for accesibility reasons
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the image element so further elements can be nested. The default value is false.
\Docxpresso\Core\Elements\ODFElement
inputField(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'form-name' => (string) the name of the form where we want to insert
this control
'name' => (string) the control name.
'value' => (string) the associated default value, if any.
'style' => (string) a list of properties in CSS format.
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) for absolutely positioned controls (optional).
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
insertDocumentFragment(\Docxpresso\Core\Elements\DocumentFragment $fragment) : \Docxpresso\Core\Elements\ODFElement
lineBreak() : void
access |
public |
---|---|
link(array $options, boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'text' => (string) the linked text
'target' => (string) the link target (the default is _blank)
'title' => (string) an optional title text for the link
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'url' => (string) the link href attribute. It can be a http path or
an anchor to a previously defined bookmark (#name)
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
listItem(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'text' => (mixed) a string with an optional text (it can also be
added later with the text or paragraph methods) or a
documentFragment object
'enforce' => (bool) if set to true (default) and the current element
does not accept paragraphs the method searches for the first
ancestor that allows for the insertion. Beware that the return
element is a reference to the inserted listItem and the chaining
may result affected consequently!!
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
math(string $equation, array $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
string
the equation that we want to insert in MathML 1.0 or StarMath 5.0 format
array
with the following keys and values
'math-settings' => (array) with the following keys and values:
'base-font-size' => (int) base font size used in the equation.
The default size is 12 (pt).
'rel-text-size' => (int) relative text size (default: 100)
'rel-indexes-size' => (int) relative index size (default: 60)
'rel-functions-size' => (int) relative function size (default: 100)
'rel-operators-size' => (int) relative operator size (default: 100)
'rel-limits-size' => (int) relative limit size (default: 60)
'variables-font' => (string) default is Times New Roman
'functions-font' => (string) default is Times New Roman
'numbers-font' => (string) default is Times New Roman
'text-font' => (string) default is Times New Roman
'custom-serif-font' => (string) default is Times New Roman
'custom-sans-serif-font' => (string) default is Arial
'custom-fixed-font' => (string) default is Courier New
'type' => (string) it can be MathML (default) or StarMath
'style' => (string) a list of properties in CSS format
NOTE: Only MathML 1.0 is supported. You can check the documentation in
http://www.w3.org/TR/1998/REC-MathML-19980407/.
For StarMath 5.0 syntax you may refer to the official docs in:
https://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Math_Guide/Math_commands_reference
http://www.openoffice.org/documentation/manuals/oooauthors/MathObjects.pdf
\Docxpresso\Core\Elements\ODFElement
orderedList(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'items' => (array) a (nested) array with the items to be included
in the list (plain text or document fragments). This argument is
optional because the items can also be added via the itemList
method.
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'enforce' => (bool) if set to true (default) and the current element
does not accept paragraphs the method searches for the first
ancestor that allows for the insertion. Beware that the return
element is a reference to the inserted paragraph and the chaining
may result affected consequently!!
boolean
if true returns a reference to the image element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
pageBreak() : void
access |
public |
---|---|
paragraph(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'text' => (mixed) a string with an optional text (it can also be
added later with the text method) or a documentFragment object
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'enforce' => (bool) if set to true (default) and the current element
does not accept paragraphs the method searches for the first
ancestor that allows for the insertion. Beware that the return
element is a reference to the inserted paragraph and the chaining
may result affected consequently!!
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
parent( $element = '') : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
it can take the following values: 'list', 'paragraph', 'section', 'table', 'row', 'cell', 'chart', 'frame', 'root' if element is left empty the method returns the first parent that fits one of the previous values.
\Docxpresso\Core\Elements\ODFElement
parentList() : \Docxpresso\Core\Elements\ODFElement
plainText(string $text) : \Docxpresso\Core\Elements\ODFElement
printXML() : string
access |
public |
---|---|
string
radioButton(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'form-name' => (string) the name of the form where we want to insert
this control
'name' => (string) the control name. Radio buttons belonging to the
same group should share the same name
'value' => (string) the associated value
'selected' => (bool) true or false. only one readio button should be
selected by group otherwise use a checkbox control component
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) fro absolutely positioned controls (optional)
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
row(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'header' => (boolean) if true it is a header row. If a table spans
trough more than one page the header rows are repeated at the
beginning of each new page.
'row-content' => (array) the row content. Each array item may be a
string of text or a document fragment. Beware that you may have
higher control by using the cell method to insert content
into a row.
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
select(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'form-name' => (string) the name of the form where we want to insert
this control
'name' => (string) the control name.
'items' => (array) an associative array with keys as options and
values the corresponding form values
'selected' => (string) the name of the selected item
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) for absolutely positioned controls (optional)
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
setCurrentStyleId(string $styleId) : void
access |
public |
---|
string
setDefaultStyles(integer $data) : string
access |
public |
---|
integer
string
setHasODFChild(boolean $odfChild) : void
access |
public |
---|
boolean
setNode(\Docxpresso\Core\Elements\DOMNode $node) : void
access |
public |
---|
\Docxpresso\Core\Elements\DOMNode
setNodeType(string $type) : void
access |
public |
---|
string
setParentODFElement(\Docxpresso\Core\Elements\ODFElement $odfElement) : void
setStyleId(string $styleId) : void
access |
public |
---|
string
setTarget(string $target) : void
access |
public |
---|
string
style(mixed $style = '') : void
access |
public |
---|
mixed
it can be a CSS like properties string or an array
tab(array $options = array()) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'type' => (string) the accepted values are left, center, right or
char (in this case the text will be aligned in reference to a
specified character)
'character' => (string) the character to be used in if the type is
char (the default value is '.')
'leader' => (string) the available style are:
none: tab stop has no leader line.
dash: tab stop has a dashed leader line.
dot-dash: tab stop has a dot followed by a dash.
dot-dot-dash: tab stop has two dots followed by a dash.
dotted: tab stop has a dotted leader line.
long-dash: tab stop has a long dash line.
solid: tab stop has a solid leader line.
wave: tab stop has a wavy leader line.
'position' => (int) distance from the left margin or the left indent
given in points.
\Docxpresso\Core\Elements\ODFElement
table(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'table-content' => (array) an optional array of arrays with the
values to be included in the different table rows and cells.
Each final entry may be an string of text or a document fragment. Beware that you can get higher control
by including the table contents via the row and cell methods.
'grid' => (mixed) mandatory if the data option is not set.
It may be:
The number of columns (integer): all columns are of equal size
An array where each item represents the respective column width
'style' => (string) a list of properties in CSS format
'mask' => (array) this array stablishes the table theme options that
should be applied to the current table. The default values are:
array( 'NE' => true,
'NW' => true,
'SE' => true,
'SW' => false,
'firstRow' => true,
'lastRow' => false,
'bandedRow' => true,
'firstCol' => true,
'lastCol' => false,
'bandedCol' => false)
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the paragraph element. The default value is true
\Docxpresso\Core\Elements\ODFElement
text(array $options, boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'nestSpans' => (boolean) if set to true the text spans will be
nested. Default value is false
'text' => (string) the text to insert
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the text element so they can be nested.
\Docxpresso\Core\Elements\ODFElement
textArea(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'form-name' => (string) the name of the form where we want to insert
this control
'name' => (string) the control name
'value' => (string) the associated value
'scroll' => (boolean) if true (default) the text area shows vertical
scrollbars
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'pageNumber' => (int) for absolutely positioned controls (optional)
boolean
if true returns a reference to the frame element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
textBox(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'pageNumber' => (int) for absolutely positioned textboxes (optional)
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
boolean
if true returns a reference to the image element so further elements can be nested. The default value is false.
\Docxpresso\Core\Elements\ODFElement
toc(array $options = array()) : \Docxpresso\Core\Elements\CreateDocument
access |
public |
---|
array
with the following keys and values
'auto-update' => (boolean) if true (default value) the TOC will
automatically update on openning and the user will not be prompted
to do so. This option is ignored unless the target document
is in Open Document Format (.odt)
'leader-char' => (string) the leader char the joins the name of the
heading with its page number. The default value is '.'.
'linked' => (boolean) if true (default value) the toc entry is
linked to the corresponding heading so on can navegate through the
contents from the toc.
'outline-level' => (int) an integer number (smaller than 10) that
sets the the highest heading level that wil show up in the toc. The
default value is 3.
'title' => (string) The title, if any, of the table of contents. The
format is given in the first array entry of the style option
'style' => (array) an array with the styles in CSS format
for the title (style[0]) and the toc levels (the j-th level style
being given by style[j]).
\Docxpresso\Core\Elements\CreateDocument
unorderedList(array $options = array(), boolean $reference = true) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
array
with the following keys and values
'items' => (array) a (nested) array with the items to be included
in the list (plain text or document fragments). This argument is
optional because the items can also be added via the itemList
method.
'style' => (string) a list of properties in CSS format
'styleId' => (string) if given the styleId is not generated randomly
'enforce' => (bool) if set to true (default) and the current element
does not accept paragraphs the method searches for the first
ancestor that allows for the insertion. Beware that the return
element is a reference to the inserted paragraph and the chaining
may result affected consequently!!
boolean
if true returns a reference to the image element so further elements can be nested. The default value is true.
\Docxpresso\Core\Elements\ODFElement
whitespace(integer $number = 1) : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
integer
the number of whitespaces we want to insert
\Docxpresso\Core\Elements\ODFElement
XMLChart(string $xml, string $styleId = '') : \Docxpresso\Core\Elements\ODFElement
access |
public |
---|
string
with the following structure <chart style="CSS styles"
type="column|bar|pie|donut|area|line|scatter|bubble|radar|filled-radar|column-line|3Dcolumn|3Dbar|3Dpie|3Ddonut|3Darea|3Dline|3Dscatter"
data-label-number="none|value|percentage"
label-position="avoid-overlap|center|top|top-right|right|bottom-right|bottom|bottom-left|left|top-left|inside|outside|near-origin"
label-position-negative="top-left|inside|outside|near-origin"
hole-size="integer"
pie-offset="integer"
angle-offset="integer"
stacked="boolean"
gap-width="integer"
overlap="integer"
percentage="boolean"
chart-interpolation="none|b-spline|cubic-spline"
spline-resolution="integer"
deep="boolean"
solid-type="cuboid|cylinder|cone|pyramid" >
<title color="hexadecimal color"
font-family="string"
font-size="float(pt|cm|in|mm)"
font-weight="normal|bold"
font-style="normal|italic"
stroke="solid|dash|none"
fill-color="hexadecimal color"
opacity="integer%"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%"
stroke-linejoin="round|bevel|middle|miter|none"
stroke-linecap="butt|round|square" >Title</title>
<legend name="" //only applies to bubble charts
legend-position="left|right|top|bottom"
color="hexadecimal color"
font-family="string"
font-size="float(pt|cm|in|mm)"
font-weight="normal|bold"
font-style="normal|italic"
stroke="solid|dash|none"
fill-color="hexadecimal color"
opacity="integer%"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%"
stroke-linejoin="round|bevel|middle|miter|none"
stroke-linecap="butt|round|square"/>
<grid dimension="x|y|z"
type="major|minor"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%"
stroke-linejoin="round|bevel|middle|miter|none"
stroke-linecap="butt|round|square" />
<axis dimension="x|y|z"
visible="boolean"
logarithmic="boolean"
font-color="hexadecimal color"
font-size="float(pt|cm|in|mm)"
axis-position="start|end"
origin="float"
maximum="float"
minimum ="float"
label-arrangement="side-by-side|stagger-even|stagger-odd"
display-level="boolean"
axis-label-position="near-axis|near-axis-other-side|outside-end|outside-start"
reverse-direction="boolean"
text-overlap="boolean"
line-break="boolean"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%"
stroke-linejoin="round|bevel|middle|miter|none"
stroke-linecap="butt|round|square"
interval-major="float"
interval-minor-divisor="integer"
tick-marks-major-inner="boolean"
tick-marks-minor-inner="boolean"
tick-marks-major-outer="boolean"
tick-marks-minor-outer="boolean" />
<component type="wall|floor"
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%"
stroke-linejoin="round|bevel|middle|miter|none"
stroke-linecap="butt|round|square" />
<transform3D rotate-x="integer"
rotate-y="integer"
rotate-z="integer"
right-angled-axes="true|false"
perspective="integer" />
<!-- for pie and donut charts -->
<categories>
<category name=""
value=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
<category name=""
value=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
<category name=""
value=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
</categories>
<!-- for bubble charts -->
<series>
<ser name=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
</series>
<categories>
<category>
<data value="" />
<data value="" />
<data value="" />
</category>
<category>
<data value="" />
<data value="" />
<data value="" />
</category>
<category>
<data value="" />
<data value="" />
<data value="" />
</category>
</categories>
<!-- for all other charts -->
<series>
<ser name=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
<ser name=""
fill-color="hexadecimal color"
opacity="integer%"
stroke="solid|dash|none"
stroke-width="float(pt|cm|in|mm)"
stroke-color="hexadecimal color"
stroke-opacity="integer%" />
</series>
<categories>
<category name="">
<data value="" />
<data value="" />
</category>
<category name="">
<data value="" />
<data value="" />
</category>
<category name="">
<data value="" />
<data value="" />
</category>
</categories>
string
\Docxpresso\Core\Elements\ODFElement
parentNodes : array
var | |
---|---|
access |
public |
static |
array
_currentStyleId : string
var | |
---|---|
access |
private |
string
_dom : \Docxpresso\Core\Elements\DOMDocument
var | |
---|---|
access |
private |
\Docxpresso\Core\Elements\DOMDocument
_node : \Docxpresso\Core\Elements\DOMNode
var | |
---|---|
access |
private |
\Docxpresso\Core\Elements\DOMNode
_hasODFChild : mixed
var |
(a string or false) |
---|---|
access |
private |
mixed
_parentODFElement : \Docxpresso\Core\Elements\ODFElement
_styleId : string
var | |
---|---|
access |
private |
string
_target : string
var | |
---|---|
access |
private |
string