OpenDocument
[ class tree: OpenDocument ] [ index: OpenDocument ] [ all elements ]

Class: OpenDocument

Source Location: /OpenDocument-0.1.0/OpenDocument.php

Class Overview


OpenDocument base class


Author(s):

Version:

  • 0.1.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
OpenDocument base class

OpenDocument class handles reading and modifying files in OpenDocument format



[ Top ]


Method Detail

__construct (Constructor)   [line 260]

OpenDocument __construct( [string $filename = ''])

Constructor
  • Throws: OpenDocument_Exception
  • Access: public

Parameters:

string   $filename   —  optional specify file name if you want to open existing file to create new document pass nothing or empty string

[ Top ]

addFont   [line 631]

void addFont( string $font_name, [string $font_family = ''])

Add new font declaration
  • Access: public

Parameters:

string   $font_name   — 
string   $font_family   —  optional

[ Top ]

applyStyle   [line 487]

string applyStyle( string $style_name, string $name, mixed $value, OpenDocument_StyledElement $object)

Apply style information to object

If object has no style information yet, then create new style node If object style information is similar to other object's style info, then apply the same style name And if object old style information was not shared with other objects then delete old style info Else leave old style info Else just add new style description

  • Access: public

Parameters:

string   $style_name   — 
string   $name   — 
mixed   $value   — 
OpenDocument_StyledElement   $object   — 

[ Top ]

compareNodes   [line 651]

bool compareNodes( mixed $node1, mixed $node2)

Compare two DOMNode nodes

Parameters:

mixed   $node1   — 
mixed   $node2   — 

[ Top ]

createBookmark   [line 459]

OpenDocument_Bookmark createBookmark( string $name, [string $type = 'start'])

Create OpenDocument_Bookmark
  • Todo: finish method
  • Access: public

Parameters:

string   $name   — 
string   $type   — 

[ Top ]

createHeading   [line 445]

OpenDocument_Heading createHeading( [string $text = ''], [integer $level = 1])

Create Open_document_Heading
  • Access: public

Parameters:

string   $text   — 
integer   $level   — 

[ Top ]

createParagraph   [line 432]

OpenDocument_Paragraph createParagraph( [string $text = ''])

Create OpenDocument_Paragraph
  • Access: public

Parameters:

string   $text   —  optional

[ Top ]

deleteElement   [line 384]

void deleteElement( OpenDocument_Element $element)

Delete document child element
  • Access: public

Parameters:

OpenDocument_Element   $element   — 

[ Top ]

getChildren   [line 344]

ArrayIterator getChildren( )

Get children list
  • Access: public

[ Top ]

getStyle   [line 559]

array getStyle( string $style_name, array $properties)

Get array of style values
  • Access: public

Parameters:

string   $style_name   — 
array   $properties   — 

[ Top ]

output   [line 746]

void output( )

Test function
  • Todo: remove or finish function
  • Access: public

[ Top ]

save   [line 765]

void save( [string $filename = ''])

Save changes in document or save as a new document / under another name
  • Throws: OpenDocument_Exception
  • Access: public

Parameters:

string   $filename   —  optional

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:57:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.