Re: cvs: pear /OpenDocument OpenDocument.php
| From: | Hannes Magnusson | Date: | Thu, 31 Aug 2006 20:31:05 +0000 |
| Subject: | Re: cvs: pear /OpenDocument OpenDocument.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-41943@lists.php.net to get a copy of this message | ||
You forgot to rename the class itself.. and 'move the examples to docs'
On 8/31/06, Alexander Pak <irokez@php.net> wrote:
irokez Thu Aug 31 18:53:04 2006 UTC Modified files:/pear/OpenDocument OpenDocument.phpLog: Added prefix to ZipWrapper and moved examples to docs http://cvs.php.net/viewvc.cgi/pear/OpenDocument/OpenDocument.php?r1=1.1&r2=1.2&diff_format=u Index: pear/OpenDocument/OpenDocument.php diff -u pear/OpenDocument/OpenDocument.php:1.1 pear/OpenDocument/OpenDocument.php:1.2 --- pear/OpenDocument/OpenDocument.php:1.1 Wed Aug 30 17:59:16 2006 +++ pear/OpenDocument/OpenDocument.php Thu Aug 31 18:53:04 2006 @@ -270,41 +270,41 @@$this->path = $filename;//get mimetype - if (!$this->mimetype = ZipWrapper::read($filename,self::FILE_MIMETYPE)) {+ if (!$this->mimetype = OpenDocument_ZipWrapper::read($filename,self::FILE_MIMETYPE)) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_MIMETYPE_ERR);}//get content $this->contentDOM = new DOMDocument(); - if (!$this->contentDOM->loadXML(ZipWrapper::read($filename,self::FILE_CONTENT))) {+ if(!$this->contentDOM->loadXML(OpenDocument_ZipWrapper::read($filename, self::FILE_CONTENT))) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_CONTENT_ERR);} $this->contentXPath = new DOMXPath($this->contentDOM);//get meta data $this->metaDOM = new DOMDocument(); - if (!$this->metaDOM->loadXML(ZipWrapper::read($filename,self::FILE_META))) {+ if(!$this->metaDOM->loadXML(OpenDocument_ZipWrapper::read($filename, self::FILE_META))) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_META_ERR);} $this->metaXPath = new DOMXPath($this->metaDOM);//get settings $this->settingsDOM = new DOMDocument(); - if (!$this->settingsDOM->loadXML(ZipWrapper::read($filename,self::FILE_SETTINGS))) {+ if(!$this->settingsDOM->loadXML(OpenDocument_ZipWrapper::read($filename, self::FILE_SETTINGS))) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_SETTINGS_ERR);} $this->settingsXPath = new DOMXPath($this->settingsDOM);//get styles $this->stylesDOM = new DOMDocument(); - if (!$this->stylesDOM->loadXML(ZipWrapper::read($filename,self::FILE_STYLES))) {+ if(!$this->stylesDOM->loadXML(OpenDocument_ZipWrapper::read($filename, self::FILE_STYLES))) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_STYLES_ERR);} $this->stylesXPath = new DOMXPath($this->stylesDOM);//get manifest information $this->manifestDOM = new DOMDocument(); - if (!$this->manifestDOM->loadXML(ZipWrapper::read($filename,self::FILE_MANIFEST))) {+ if(!$this->manifestDOM->loadXML(OpenDocument_ZipWrapper::read($filename, self::FILE_MANIFEST))) {throw newOpenDocument_Exception(OpenDocument_Exception::LOAD_MANIFEST_ERR);} $this->manifestXPath = new DOMXPath($this->manifestDOM);@@ -768,37 +768,37 @@$this->path = $filename; } //write mimetype - if (!ZipWrapper::write($this->path, self::FILE_MIMETYPE,$this->mimetype)) {+ if (!OpenDocument_ZipWrapper::write($this->path,self::FILE_MIMETYPE, $this->mimetype)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_MIMETYPE_ERR);}//write content $xml = str_replace("'", ''', $this->contentDOM->saveXML()); - if (!ZipWrapper::write($this->path, self::FILE_CONTENT, $xml)) { + if (!OpenDocument_ZipWrapper::write($this->path,self::FILE_CONTENT, $xml)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_CONTENT_ERR);}//write meta $xml = str_replace("'", ''', $this->metaDOM->saveXML()); - if (!ZipWrapper::write($this->path, self::FILE_META, $xml)) { + if (!OpenDocument_ZipWrapper::write($this->path, self::FILE_META,$xml)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_META_ERR);}//write settings $xml = str_replace("'", ''', $this->settingsDOM->saveXML()); - if (!ZipWrapper::write($this->path, self::FILE_SETTINGS, $xml)) { + if (!OpenDocument_ZipWrapper::write($this->path,self::FILE_SETTINGS, $xml)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_SETTINGS_ERR);}//write styles $xml = str_replace("'", ''', $this->stylesDOM->saveXML()); - if (!ZipWrapper::write($this->path, self::FILE_STYLES, $xml)) { + if (!OpenDocument_ZipWrapper::write($this->path, self::FILE_STYLES,$xml)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_STYLES_ERR);}//write manifest $xml = str_replace("'", ''', $this->manifestDOM->saveXML()); - if (!ZipWrapper::write($this->path, self::FILE_MANIFEST, $xml)) { + if (!OpenDocument_ZipWrapper::write($this->path,self::FILE_MANIFEST, $xml)) {throw newOpenDocument_Exception(OpenDocument_Exception::WRITE_MANIFEST_ERR);} }-- PEAR CVS Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php