cvs: phd(PHD_ENTERPRISE) / render.php
| From: | Moacir de Oliveira Miranda Júnior | Date: | Thu, 28 May 2009 20:01:58 +0000 |
| Subject: | cvs: phd(PHD_ENTERPRISE) / render.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4082@lists.php.net to get a copy of this message | ||
moacir Thu May 28 20:01:58 2009 UTC
Modified files: (Branch: PHD_ENTERPRISE)
/phd render.php
Log:
Added support to the Format Factory. Now PHD_ENTERPRISE works with the --package option.
http://cvs.php.net/viewvc.cgi/phd/render.php?r1=1.3.2.10&r2=1.3.2.11&diff_format=u
Index: phd/render.php
diff -u phd/render.php:1.3.2.10 phd/render.php:1.3.2.11
--- phd/render.php:1.3.2.10 Mon Aug 11 12:46:48 2008
+++ phd/render.php Thu May 28 20:01:58 2009
@@ -11,9 +11,11 @@
require $ROOT . "/include/PhDFormat.class.php";
require $ROOT . "/include/PhDIndex.class.php";
-require $ROOT . "/formats/xhtml.php";
-require $ROOT . "/formats/bigxhtml.php";
-require $ROOT . "/formats/php.php";
+//require $ROOT . "/formats/xhtml.php";
+//require $ROOT . "/formats/bigxhtml.php";
+//require $ROOT . "/formats/php.php";
+
+require $ROOT . "/include/PhDFormatFactory.php";
//$INDEX = "/Users/loudi/Travail/phpdoc/.manual.xml";
//$FILENAME = "/Users/loudi/Travail/phpdoc/.manual.xml";
@@ -37,12 +39,13 @@
"verbose" =>
VERBOSE_ALL^(VERBOSE_PARTIAL_CHILD_READING|VERBOSE_CHUNK_WRITING),
"lang_dir" => $ROOT . DIRECTORY_SEPARATOR . "include" .
DIRECTORY_SEPARATOR . "langs" . DIRECTORY_SEPARATOR,
- "phpweb_version_filename" => PhDConfig::xml_root() . DIRECTORY_SEPARATOR .
'phpbook' . DIRECTORY_SEPARATOR . 'phpbook-xsl' . DIRECTORY_SEPARATOR .
'version.xml',
+ "phpweb_version_filename" => PhDConfig::xml_root() . DIRECTORY_SEPARATOR .
'version.xml',
"phpweb_acronym_filename" => PhDConfig::xml_root() . DIRECTORY_SEPARATOR .
'entities' . DIRECTORY_SEPARATOR . 'acronyms.xml',
));
$render = new PhDRender();
$reader = new PhDReader();
+$factory = PhDFormatFactory::createFactory();
// Indexing & registering formats
foreach(range(0, 0) as $i) {
@@ -66,13 +69,13 @@
foreach (PhDConfig::output_format() as $format) {
switch($format) {
case "xhtml": // Standalone Chunked xHTML Format
- $render->attach(new PhDXHTMLFormat());
+ $render->attach($factory->createXhtmlFormat());
break;
case "php": // Standalone phpweb Format
- $render->attach(new PhDPHPFormat());
+ $render->attach($factory->createPHPFormat());
break;
case "bigxhtml": // Standalone Big xHTML Format
- $render->attach(new PhDBigXHTMLFormat());
+ $render->attach($factory->createBigXhtmlFormat());
break;
}
}