|
From: <nma...@us...> - 2006-03-10 10:46:17
|
Revision: 12 Author: nmarkgraf Date: 2006-03-10 02:45:55 -0800 (Fri, 10 Mar 2006) ViewCVS: http://svn.sourceforge.net/opendocumentphp/?rev=12&view=rev Log Message: ----------- Some minor bug fixes: - Added new directory to src /samples with two new php files TestInput.php and TestOutput.php. - Removed old TestOutput.php - Added a new method to OpenDocumentMeta.php (addCreationDate). - Removed a typo in OpenDocumentFactory.php - Fixed a typo in OpenDocumentObjectAbstract.php (NS_DC must have a "/" at the end!) Modified Paths: -------------- poc/src/OpenDocumentAbstract.php poc/src/OpenDocumentManifest.php poc/src/OpenDocumentManifestTest.php poc/src/OpenDocumentMeta.php poc/src/OpenDocumentObjectAbstract.php poc/src/OpenDocumentPackage.php Added Paths: ----------- poc/src/samples/ poc/src/samples/TestInput.php poc/src/samples/TestOutput.php Removed Paths: ------------- poc/src/TestOutput.php Modified: poc/src/OpenDocumentAbstract.php =================================================================== --- poc/src/OpenDocumentAbstract.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentAbstract.php 2006-03-10 10:45:55 UTC (rev 12) @@ -18,7 +18,7 @@ * */ const Revision = "ALPHA"; - const Release = "0.4.1"; + const Release = "0.4.2"; const Copyright = "(C) in 2006 by Norman Markgraf published under GPL 2.0"; const PackageName = "OpenDocumentPHP"; Modified: poc/src/OpenDocumentManifest.php =================================================================== --- poc/src/OpenDocumentManifest.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentManifest.php 2006-03-10 10:45:55 UTC (rev 12) @@ -102,15 +102,6 @@ } /** - * Same as <c>get<c>! - * - * @deprecated - */ - final public function getManifest() { - return $this->get(); - } - - /** * Save the whole OpenDocument Manifest in a file * * @access public Modified: poc/src/OpenDocumentManifestTest.php =================================================================== --- poc/src/OpenDocumentManifestTest.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentManifestTest.php 2006-03-10 10:45:55 UTC (rev 12) @@ -14,7 +14,7 @@ class OpenDocumentManifestTest extends PHPUnit2_Framework_TestCase { - function testConstrution() { + function testConstruction() { $ODM = new OpenDocumentManifest(); @@ -26,6 +26,18 @@ } + function testEmptyManifest() { + $ODM = new OpenDocumentManifest(); + + $this->assertNotNull( $ODM, "Error constructing OpenDocumentManifest without a given mimetype." ); + + $this->assertNotNull( $ODM->get(), "Returned value of OpenDocumentManifest->get() is NULL." ); + + $EmptyManifest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE manifest:manifest PUBLIC \"-//OpenOffice.org//DTD Manifest 1.0//EN\" \"Manifest.dtd\">\n<manifest:manifest xmlns:manifest=\"urn:oasis:names:tc:opendocument:xmlns:manifest:1.0\">\n <manifest:file-entry manifest:media-type=\"application/vnd.oasis.opendocument.text\" manifest:full-path=\"/\"/>\n</manifest:manifest>"; + + $this->assertEquals( $ODM->get()->saveXML(), $EmptyManifest, "Returned value of OpenDocuemtnManifest->get() is not a empty Manifest file." ); + } + } ?> \ No newline at end of file Modified: poc/src/OpenDocumentMeta.php =================================================================== --- poc/src/OpenDocumentMeta.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentMeta.php 2006-03-10 10:45:55 UTC (rev 12) @@ -16,7 +16,8 @@ private $meta; /** - * + * + * @since 0.4.0 */ public function __construct( $dom=0 ) { parent::__construct(); @@ -54,7 +55,10 @@ parent::__destruct(); } - + + /** + * @since 0.4.0 + */ public function load( $filename ) { $tmpDom = new DOMDocument(); @@ -92,7 +96,7 @@ } /** - * + * @since 0.4.0 */ public function getDublicCore( $dc ) { $retValue = ""; @@ -106,6 +110,27 @@ } /** + * @param $date Timestamp or 0 = now. + * @since 0.4.2 + */ + public function addCreationDate( $date=0 ) { + if (empty($time)) { + // 2006-02-14T16:36:10 + $creation_time = date( "Y-m-d\TH:i:s" ); + } else { + $creation_time = date( "Y-m-d\TH:i:s", $date ) + } + $this->logger->debug( "OpenDocumentMeta->addCreationTime: ". $creation_time ."." ); + + $node = $this->dom->createElementNS( self::NS_META, "meta:creation-date", $creation_time ); + + $this->root->appendChild( $node ); + + unset( $creation_time ); + + } + + /** * */ public function addGenerator( $generator ) { @@ -128,6 +153,7 @@ /** * + * @since 0.4.0 */ public function getGenerator() { $retValue = ""; @@ -167,6 +193,7 @@ /** * + * @since 0.4.0 */ public function addUserDefinedMetadata( $name, $type, $value ) { $node = $this->dom->createElementNS( self::NS_META, "meta:user-defined" ); @@ -183,6 +210,7 @@ /** * + * @since 0.4.0 */ public function commit() { $this->meta->appendChild( $this->root ); @@ -193,12 +221,14 @@ /** * @depricated + * @since 0.4.0 */ final public function getMeta() { return $this->get(); } /** + * @since 0.4.0 * @return */ final public function get() { @@ -210,6 +240,7 @@ } /** + * @since 0.4.0 * */ final public function save( $filename ) { Modified: poc/src/OpenDocumentObjectAbstract.php =================================================================== --- poc/src/OpenDocumentObjectAbstract.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentObjectAbstract.php 2006-03-10 10:45:55 UTC (rev 12) @@ -15,7 +15,7 @@ /** * namespace Dublin Core */ - const NS_DC = "http://purl.org/dc/elements/1.1"; + const NS_DC = "http://purl.org/dc/elements/1.1/"; /** * namespace OpenDocument meta Modified: poc/src/OpenDocumentPackage.php =================================================================== --- poc/src/OpenDocumentPackage.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/OpenDocumentPackage.php 2006-03-10 10:45:55 UTC (rev 12) @@ -187,7 +187,7 @@ } } - $this->writeDOMToPackage( "META-INF/manifest.xml" , $this->manifest->getManifest() ); + $this->writeDOMToPackage( "META-INF/manifest.xml" , $this->manifest->get() ); $this->logger->debug( "OpenDocumentPackage->commit: Write mimetype \"". $this->getMimeType()."\" to file \"mimetype\"..." ); $this->zip->addFile( $this->getMimeType(), "mimetype" ); $this->logger->debug( "OpenDocumentPackage->commit: Commited package named \"" . $this->packagename . "\"..." ); Deleted: poc/src/TestOutput.php =================================================================== --- poc/src/TestOutput.php 2006-03-09 19:29:11 UTC (rev 11) +++ poc/src/TestOutput.php 2006-03-10 10:45:55 UTC (rev 12) @@ -1,187 +0,0 @@ -<?php -/** - * SampleClass produces a little OpenDocument and send it to the client - * - * @copyright GNU General Public License - * @author Norman Markgraf <nma...@us...> - * @author Alex Latchford <yaw...@us...> - * @version $Revision$ - * @package OpenDocument_Samples - * @since 0.4.0 - * - * $Id$ - */ - -require_once( "OpenDocumentFactory.php" ); -require_once( "Log/observer.php" ); - -class TestOutput { - - private $logger; - - function __construct() { - $conf = array( "mode" => 0600 ); - // File Output: - $this->logger = &Log::factory( "file", "OpenDocument.log", "OpenDocument", $conf ); - // Console Output: - $this->logger = &Log::factory( "console", "", "OpenDocument" ); - } - - function makeMeta( $meta ) { - $meta->addDublinCore( "title", "This is a test!" ); - $meta->addDublinCore( "creator", "Norman Markgraf" ); - $meta->addDublinCore( "language", "en-EN" ); - $meta->addGenerator( "" ); - $meta->addInitialCreator( "Norman Markgraf" ); - } - - function makeContent( $content ) { - $content->addNoScript(); - - $content->addFontFace( "Test", "Tahoma" ); - - $content->addNoAutomaticStyles(); - - $text = $content->getBody()->getText(); - - $text->addNoForms(); - - $text->addToText( $text->getTextHeading( "Heading", "The first step" ) ); - $text->addToText( $text->getTextParagraph( "Paragraph", "This is a little test!" ) ); - } - - function makeStyle( $style ) { - $NS_STYLE = "urn:oasis:names:tc:opendocument:xmlns:style:1.0"; - $NS_FO = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compartible:1.0"; - - $style->addFontFace( "Test", "Tahoma" ); - - // Set default style - $defStyle = $style->getDefaultStyle( "paragraph" ); - - $defProp = $style->getDom()->createElementNS( $NS_STYLE, "style:paragraph-properties" ); - $defProp->setAttributeNS( $NS_FO, "fo:hypenation-ladder-count", "no-limit" ); - $defProp->setAttributeNS( $NS_STYLE, "style:text-autospace", "ideograph-alpha" ); - $defProp->setAttributeNS( $NS_STYLE, "style:punctuation-wrap", "hanging" ); - $defProp->setAttributeNS( $NS_STYLE, "style:line-break", "strict" ); - $defProp->setAttributeNS( $NS_STYLE, "style:tab-stop-distance", "1.251cm" ); - $defProp->setAttributeNS( $NS_STYLE, "style:writeing-mode", "page" ); - $defStyle->appendChild( $defProp ); - - $defProp = $style->getDom()->createElementNS( $NS_STYLE, "style:text-properties" ); - $defProp->setAttributeNS( $NS_FO, "fo:font-size", "12pt" ); - $defProp->setAttributeNS( $NS_FO, "fo:language", "de" ); - $defProp->setAttributeNS( $NS_FO, "fo:country", "DE" ); - $defProp->setAttributeNS( $NS_FO, "fo:hyphenate", "false" ); - $defProp->setAttributeNS( $NS_FO, "fo:hypenation-remain-char-count", "2" ); - $defProp->setAttributeNS( $NS_FO, "fo:hypenation-push-char-count", "2" ); - $defProp->setAttributeNS( $NS_STYLE, "style:use-window-font-color", "true" ); - $defProp->setAttributeNS( $NS_STYLE, "style:font-name", "Times New Roman" ); - $defProp->setAttributeNS( $NS_STYLE, "style:font-name-asian", "Arial Unicode MS" ); - $defProp->setAttributeNS( $NS_STYLE, "style:font-size-asian", "12pt" ); - $defProp->setAttributeNS( $NS_STYLE, "style:language-asian", "none" ); - $defProp->setAttributeNS( $NS_STYLE, "style:country-asian", "none" ); - $defProp->setAttributeNS( $NS_STYLE, "style:font-name-complex", "Tahoma" ); - $defProp->setAttributeNS( $NS_STYLE, "style:font-site-complex", "12pt" ); - $defProp->setAttributeNS( $NS_STYLE, "style:language-complex", "none" ); - $defProp->setAttributeNS( $NS_STYLE, "style:country-complex", "none" ); - $defStyle->appendChild( $defProp ); - - $style->addDefaultStyle( $defStyle ); - - //Set a style - $aStyle = $style->getStyle( "Paragraph" ); - $aStyle->setAttributeNS ( $NS_STYLE, "style:family", "paragraph" ); - $aStyle->setAttributeNS ( $NS_STYLE, "style:class", "text" ); - - $style->addStyle( $aStyle, "Paragraph" ); - - //Set a style - $aStyle = $style->getStyle( "Heading" ); - $aStyle->setAttributeNS ( $NS_STYLE, "style:family", "paragraph" ); - $aStyle->setAttributeNS ( $NS_STYLE, "style:class", "text" ); - - $aStyleProp = $style->getDom()->createElementNS( $NS_STYLE, "style:paragraph-properties" ); - $aStyleProp->setAttributeNS ( $NS_FO, "fo:margin-top", "0.423cm" ); - $aStyleProp->setAttributeNS ( $NS_FO, "fo:margin-bottom", "0.212cm" ); - $aStyleProp->setAttributeNS ( $NS_FO, "fo:keep-with-next", "always" ); - $aStyle->appendChild( $aStyleProp ); - - $aStyleProp = $style->getDom()->createElementNS( $NS_STYLE, "style:text-properties" ); - $aStyleProp->setAttributeNS ( $NS_FO, "fo:font-size", "20pt" ); - $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name", "Arial" ); - $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name-asian", "MS Mincho" ); - $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-size-asian", "20pt" ); - $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name-complex", "Tahoma1" ); - $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-size-complex", "20pt" ); - $aStyle->appendChild( $aStyleProp ); - - $style->addStyle( $aStyle, "Paragraph" ); - } - - function run($SingleDocument) { - if (!function_exists('gzencode')) { - $out = "<p>You have to enable zlib at compile time of your PHP! "; - $out .= "use <emph>--with-zlib=[DIR]</emph> at the <emph>configure</emph> "; - $out .= "procedure</p>"; - echo $out; - return; - } - - $DocumentName = "test.odt"; - - //header( "Content-type: application/odt" ); - //header( "Content-Disposition: attachment; filename=".$DocumentName ); - - - // Get a OpenDocument object from the factory: - - if(isset($SingleDocument)) - { - $TestDoc = OpenDocumentFactory::createOpenDocument( - $DocumentName, - "D:/PHP/OpenDocument/", - $SingleDocument - ); - - /* - $TestDoc->attachObserverToLogger( $this->logger ); - */ - - $this->makeMeta( $TestDoc->getMeta() ); - $this->makeStyle( $TestDoc->getStyle() ); - $this->makeContent( $TestDoc->getContent() ); - - echo $TestDoc->get(); - - //$TestDoc->save(); - } - - - } -} - -if(isset($_POST['SingleDocument'])) -{ - $SingleDocument = $_POST['SingleDocument']; - $TestOutput = new TestOutput(); - $TestOutput->run($SingleDocument); -} - -?> - -<html> -<head> -<title>TestOutput File!</title> -</head> -<body> -<form method="POST" action=""> - <fieldset> - <legend>Document Type:</legend> - Single <input type="radio" name="SingleDocument" value="TRUE" checked="checked" /> - Package <input type="radio" name="SingleDocument" value="FALSE" /><br /> - <input type="submit" value="Submit!" /> - </fieldset> -</form> -</body> -</html> Added: poc/src/samples/TestInput.php =================================================================== --- poc/src/samples/TestInput.php (rev 0) +++ poc/src/samples/TestInput.php 2006-03-10 10:45:55 UTC (rev 12) @@ -0,0 +1,46 @@ +<?php +/** + * SampleClass produces a little OpenDocument and send it to the client + * + * @copyright GNU General Public License + * @author Norman Markgraf <nma...@us...> + * @author Alex Latchford <yan...@us...> + * @version $Revision$ + * @package OpenDocument/Samples + * @since 0.4.2 + * + * $Id$ + */ + ?> +<html> + <head> + <title>TestOutput File!</title> + </head> + <body> + <form method="POST" action="TestOutput.php"> + <fieldset> + <legend>Generate a sample OpenDocument:</legend> + <fieldset> + <legend>Document Type:</legend> + <label for="single">Single </label><input id="single" type="radio" name="SingleDocument" value="true" checked="checked" /> + <label for="package">Package </label><input id="package" type="radio" name="SingleDocument" value="false" /><br /> + </fieldset> + <fieldset> + <legend>Metadata:</legend> + <table> + <tr> + <td><label for="author">Author: </label></td> + <td><input id="author" type="text" name="Creator" size="40" maxsize="50" value="Norman Markgraf" /></td> + </tr> + <tr> + <td><label for="title">Title: </label></td> + <td><input id="title" type="text" name="Title" size="80" maxsize="180" value="This is a sample OpenDocument file." /></td> + </tr> + </table> + </fieldset> + <legend>Try it:</legend> + <input type="submit" value="Submit!" /> + </fieldset> + </form> + </body> +</html> \ No newline at end of file Property changes on: poc/src/samples/TestInput.php ___________________________________________________________________ Name: svn:keywords + Date Revision Author HeadURL Id Added: poc/src/samples/TestOutput.php =================================================================== --- poc/src/samples/TestOutput.php (rev 0) +++ poc/src/samples/TestOutput.php 2006-03-10 10:45:55 UTC (rev 12) @@ -0,0 +1,193 @@ +<?php +/** + * SampleClass produces a little OpenDocument and send it to the client + * + * @copyright GNU General Public License + * @author Norman Markgraf <nma...@us...> + * @author Alex Latchford <yan...@us...> + * @version $Revision$ + * @package OpenDocument/Samples + * @since 0.4.2 + * + * $Id$ + */ + +ini_set( "include_path", ini_get( "include_path" ). ";..\\" ); + +require_once( "OpenDocumentFactory.php" ); +require_once( "Log/observer.php" ); + +class TestOutput { + + const DocumentName = "test.odt"; + + const PathToDocument = "D:/PHP/OpenDocument/"; + + private $logger; + + function __construct() { + /* ***TO DO *** This raises a warning ... + // $conf = array( "mode" => 0600 ); + $this->logger = &Log_observer::factory( "file", "D:/PHP/OpenDocument.log", "OpenDocument", $conf ); + $this->logger = &Log_observer::factory( "console", "", "OpenDocument" ); + */ + + /* + Console output: + $this->logger = &Log_observer::factory( "console", "", "OpenDocument" ); + + File output: + $this->logger = &Log_observer::factory( "file", "OpenDocument.log", "OpenDocument" ); + */ + } + + function makeMeta( $meta, $creator="Norman Markgraf", $title="This is a test!", $language="en-EN" ) { + $meta->addDublinCore( "title", $title ); + $meta->addDublinCore( "creator", $creator ); + $meta->addDublinCore( "language", "en-EN" ); + $meta->addDublinCore( "date", date("Y-m-d\TH:i:s") ); + $meta->addGenerator( "" ); + $meta->addInitialCreator( $creator ); + $meta->addCreationDate(); + } + + function makeContent( $content ) { + $content->addNoScript(); + + $content->addFontFace( "Test", "Tahoma" ); + + $content->addNoAutomaticStyles(); + + $text = $content->getBody()->getText(); + + $text->addNoForms(); + + $text->addToText( $text->getTextHeading( "Heading", "The first step" ) ); + $text->addToText( $text->getTextParagraph( "Paragraph", "This is a little test!" ) ); + } + + function makeStyle( $style ) { + $NS_STYLE = "urn:oasis:names:tc:opendocument:xmlns:style:1.0"; + $NS_FO = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compartible:1.0"; + + $style->addFontFace( "Test", "Tahoma" ); + + // Set default style + $defStyle = $style->getDefaultStyle( "paragraph" ); + + $defProp = $style->getDom()->createElementNS( $NS_STYLE, "style:paragraph-properties" ); + $defProp->setAttributeNS( $NS_FO, "fo:hypenation-ladder-count", "no-limit" ); + $defProp->setAttributeNS( $NS_STYLE, "style:text-autospace", "ideograph-alpha" ); + $defProp->setAttributeNS( $NS_STYLE, "style:punctuation-wrap", "hanging" ); + $defProp->setAttributeNS( $NS_STYLE, "style:line-break", "strict" ); + $defProp->setAttributeNS( $NS_STYLE, "style:tab-stop-distance", "1.251cm" ); + $defProp->setAttributeNS( $NS_STYLE, "style:writeing-mode", "page" ); + $defStyle->appendChild( $defProp ); + + $defProp = $style->getDom()->createElementNS( $NS_STYLE, "style:text-properties" ); + $defProp->setAttributeNS( $NS_FO, "fo:font-size", "12pt" ); + $defProp->setAttributeNS( $NS_FO, "fo:language", "de" ); + $defProp->setAttributeNS( $NS_FO, "fo:country", "DE" ); + $defProp->setAttributeNS( $NS_FO, "fo:hyphenate", "false" ); + $defProp->setAttributeNS( $NS_FO, "fo:hypenation-remain-char-count", "2" ); + $defProp->setAttributeNS( $NS_FO, "fo:hypenation-push-char-count", "2" ); + $defProp->setAttributeNS( $NS_STYLE, "style:use-window-font-color", "true" ); + $defProp->setAttributeNS( $NS_STYLE, "style:font-name", "Times New Roman" ); + $defProp->setAttributeNS( $NS_STYLE, "style:font-name-asian", "Arial Unicode MS" ); + $defProp->setAttributeNS( $NS_STYLE, "style:font-size-asian", "12pt" ); + $defProp->setAttributeNS( $NS_STYLE, "style:language-asian", "none" ); + $defProp->setAttributeNS( $NS_STYLE, "style:country-asian", "none" ); + $defProp->setAttributeNS( $NS_STYLE, "style:font-name-complex", "Tahoma" ); + $defProp->setAttributeNS( $NS_STYLE, "style:font-site-complex", "12pt" ); + $defProp->setAttributeNS( $NS_STYLE, "style:language-complex", "none" ); + $defProp->setAttributeNS( $NS_STYLE, "style:country-complex", "none" ); + $defStyle->appendChild( $defProp ); + + $style->addDefaultStyle( $defStyle ); + + //Set a style + $aStyle = $style->getStyle( "Paragraph" ); + $aStyle->setAttributeNS ( $NS_STYLE, "style:family", "paragraph" ); + $aStyle->setAttributeNS ( $NS_STYLE, "style:class", "text" ); + + $style->addStyle( $aStyle, "Paragraph" ); + + //Set a style + $aStyle = $style->getStyle( "Heading" ); + $aStyle->setAttributeNS ( $NS_STYLE, "style:family", "paragraph" ); + $aStyle->setAttributeNS ( $NS_STYLE, "style:class", "text" ); + + $aStyleProp = $style->getDom()->createElementNS( $NS_STYLE, "style:paragraph-properties" ); + $aStyleProp->setAttributeNS ( $NS_FO, "fo:margin-top", "0.423cm" ); + $aStyleProp->setAttributeNS ( $NS_FO, "fo:margin-bottom", "0.212cm" ); + $aStyleProp->setAttributeNS ( $NS_FO, "fo:keep-with-next", "always" ); + $aStyle->appendChild( $aStyleProp ); + + $aStyleProp = $style->getDom()->createElementNS( $NS_STYLE, "style:text-properties" ); + $aStyleProp->setAttributeNS ( $NS_FO, "fo:font-size", "20pt" ); + $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name", "Arial" ); + $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name-asian", "MS Mincho" ); + $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-size-asian", "20pt" ); + $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-name-complex", "Tahoma1" ); + $aStyleProp->setAttributeNS ( $NS_STYLE, "style:font-size-complex", "20pt" ); + $aStyle->appendChild( $aStyleProp ); + + $style->addStyle( $aStyle, "Paragraph" ); + } + + function run($post) { + if (!function_exists('gzencode')) { + $out = "<p>You have to enable zlib at compile time of your PHP! "; + $out .= "use <emph>--with-zlib=[DIR]</emph> at the <emph>configure</emph> "; + $out .= "procedure</p>"; + echo $out; + return; + } + + $SingleDocument = ($post["SingleDocument"] == "true"); + $creator = $post["Creator"]; + $title = $post["Title"]; + + + + header( "Content-type: application/odt" ); + header( "Content-Disposition: attachment; filename=".self::DocumentName ); + header( "Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 + header( "Cache-Control: post-check=0, pre-check=0", false ); + header( "Pragma: no-cache" ); + + // Get a OpenDocument object from the factory: + + if(isset($SingleDocument)) + { + $TestDoc = OpenDocumentFactory::createOpenDocument( + self::DocumentName, + self::PathToDocument, + $SingleDocument + ); + + /* + $TestDoc->attachObserverToLogger( $this->logger ); + */ + + $this->makeMeta( $TestDoc->getMeta(), $creator, $title, "en-EN" ); + $this->makeStyle( $TestDoc->getStyle() ); + $this->makeContent( $TestDoc->getContent() ); + + echo $TestDoc->get(); + + //$TestDoc->save(); + } + + + } +} + +if(isset($_POST['SingleDocument'])) +{ + $TestOutput = new TestOutput(); + $TestOutput->run($_POST); +} + +// Do TestInput again ... +?> Property changes on: poc/src/samples/TestOutput.php ___________________________________________________________________ Name: svn:keywords + Date Revision Author HeadURL Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |