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

Class: OpenDocumentText

Source Location: /OpenDocumentText.php

Class Overview

ZipArchive
   |
   --OpenDocumentArchive
      |
      --OpenDocumentAbstract
         |
         --OpenDocumentText

OpenDocumentText class.


Author(s):

  • Norman Markgraf (nmarkgraf(at)user.sourceforge.net)

Version:

  • $Revision: 182 $

Copyright:

  • Copyright in 2006, 2007 by The OpenDocumentPHP Team

Constants

Methods


Inherited Constants

Class: ZipArchive (Internal Class)

CHECKCONS = 4
CM_DEFAULT = -1
CM_DEFLATE = 8
CM_DEFLATE64 = 9
CM_IMPLODE = 6
CM_PKWARE_IMPLODE = 10
CM_REDUCE_1 = 2
CM_REDUCE_2 = 3
CM_REDUCE_3 = 4
CM_REDUCE_4 = 5
CM_SHRINK = 1
CM_STORE = 0
CREATE = 1
ER_CHANGED = 15
ER_CLOSE = 3
ER_COMPNOTSUPP = 16
ER_CRC = 7
ER_DELETED = 23
ER_EOF = 17
ER_EXISTS = 10
ER_INCONS = 21
ER_INTERNAL = 20
ER_INVAL = 18
ER_MEMORY = 14
ER_MULTIDISK = 1
ER_NOENT = 9
ER_NOZIP = 19
ER_OK = 0
ER_OPEN = 11
ER_READ = 5
ER_REMOVE = 22
ER_RENAME = 2
ER_SEEK = 4
ER_TMPOPEN = 12
ER_WRITE = 6
ER_ZIPCLOSED = 8
ER_ZLIB = 13
EXCL = 2
FL_COMPRESSED = 4
FL_NOCASE = 1
FL_NODIR = 2
FL_UNCHANGED = 8
OVERWRITE = 8

Inherited Variables

Inherited Methods

Class: OpenDocumentAbstract

OpenDocumentAbstract::close()
OpenDocumentAbstract::getBody()
OpenDocumentAbstract::getContent()
OpenDocumentAbstract::getMeta()
OpenDocumentAbstract::getStyles()
OpenDocumentAbstract::init()
OpenDocumentAbstract::loadContent()
Load content document.
OpenDocumentAbstract::loadMeta()
Load meta document.
OpenDocumentAbstract::loadSettings()
Load settings document.
OpenDocumentAbstract::loadStyles()
Load styles document.
OpenDocumentAbstract::open()
Open an OpenDocument and read the meta.xml and settings data.

Class: OpenDocumentArchive

OpenDocumentArchive::__construct()
Constructor method.
OpenDocumentArchive::addFile()
Adds a file to a ZIP archive from the given path.
OpenDocumentArchive::addFromString()
Add a file to a ZIP archive using its contents.
OpenDocumentArchive::close()
Close opened or created archive and save changes. This method is automatically called at the end of the script.
OpenDocumentArchive::deleteIndex()
Delete an entry in the archive using its index.
OpenDocumentArchive::deleteName()
Delete an entry in the archive using its name.
OpenDocumentArchive::getDOMFromName()
OpenDocumentArchive::getFilelist()
OpenDocumentArchive::getManifest()
OpenDocumentArchive::getMimeType()
Retrieve mime type of the OpenDocument archive.
OpenDocumentArchive::open()
Opens a new zip archive for reading, writing or modifying.
OpenDocumentArchive::renameIndex()
Renames an entry defined by its index.
OpenDocumentArchive::renameName()
Renames an entry defined by its name.
OpenDocumentArchive::setMimeType()
Set mime type of the OpenDocument archive.
OpenDocumentArchive::statName()
Get the details of an entry defined by its name.
OpenDocumentArchive::unchangeAll()
Undo all changes done in the archive. Always returns false!
OpenDocumentArchive::unchangeIndex()
Revert all changes done to an entry at the given index.
OpenDocumentArchive::unchangeName()
Revert all changes done to an entry with the given name.

Class: ZipArchive (Internal Class)

addEmptyDir ( )
addFile ( )
addFromString ( )
close ( )
deleteIndex ( )
deleteName ( )
extractTo ( )
getArchiveComment ( )
getCommentIndex ( )
getCommentName ( )
getFromIndex ( )
getFromName ( )
getNameIndex ( )
getStream ( )
locateName ( )
open ( )
renameIndex ( )
renameName ( )
setArchiveComment ( )
setCommentIndex ( )
setCommentName ( )
statIndex ( )
statName ( )
unchangeAll ( )
unchangeArchive ( )
unchangeIndex ( )
unchangeName ( )

Class Details

[line 49]
OpenDocumentText class.

You could uses this class as follows:

  1.          $text new OpenDocumentText'YourFavoriteTextDocument.odt' );
  2.          // do some thing with it
  3.          ...
  4.          // And write it back
  5.          $text->close();

Be aware that even if you do not modifiy the OpenDocument, the library will! So do not expect the that the file is absolut the same after you run the close method.




Tags:

author:  Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
version:  $Revision: 182 $
copyright:  Copyright in 2006, 2007 by The OpenDocumentPHP Team
since:  0.5.0 - 08.02.2007
license:  GNU Public License 2.0 or above.


[ Top ]


Class Methods


constructor __construct [line 62]

OpenDocumentText __construct( [string $fullpath = null])

Constructor method.

Read (and if not exists create) an OpenDocument text file.




Tags:

since:  0.5.0 - 08.02.2007


Overrides OpenDocumentArchive::__construct() (Constructor method.)

Parameters:

string   $fullpath   fullpath Full path and name of the document

[ Top ]

method setDefaultMeta [line 95]

void setDefaultMeta( )

Setup some default data for the meta.xml.



Tags:

since:  0.5.2 - 21.03.2007


[ Top ]

method setDefaultStyles [line 87]

void setDefaultStyles( )



Tags:

since:  0.5.2 - 21.03.2007


[ Top ]


Class Constants

odmTextNamespace =  'application/vnd.oasis.opendocument.text'

[line 53]

Namespace TEXT


[ Top ]



Documentation generated on Tue, 12 Jun 2007 10:00:31 +0200 by phpDocumentor 1.3.2