From eab6bb13b9efb3e1c6d725368368de4d74b00946 Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 7 May 2007 04:17:37 +0000 Subject: Update Active Record docs. --- buildscripts/phing/tasks/PradoQuickStartDocs.php | 85 ++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 buildscripts/phing/tasks/PradoQuickStartDocs.php (limited to 'buildscripts/phing/tasks/PradoQuickStartDocs.php') diff --git a/buildscripts/phing/tasks/PradoQuickStartDocs.php b/buildscripts/phing/tasks/PradoQuickStartDocs.php new file mode 100644 index 00000000..06c30a14 --- /dev/null +++ b/buildscripts/phing/tasks/PradoQuickStartDocs.php @@ -0,0 +1,85 @@ +destdir = $destdir; + } + + function setPages($page) + { + $this->page = $page; + } + + /** + * Main entrypoint of the task + */ + function main() + { + $output = $this->destdir->getAbsolutePath(); + $base = dirname(__FILE__).'/../../../demos/quickstart/protected/'; + error_reporting(0); + $quickstart= new ChmQuickstartBuilder($base,$output); + + foreach(preg_split('/\s*[, ]+\s*/', $this->page) as $page) + { + $file = str_replace(array('/','.page'), array('_','.html'),$page); + $this->log("Parsing $page"); + file_put_contents($output.'/'.$file, $this->parsePage($quickstart,$page)); + $this->log("Writing $file"); + } + } + + protected function parsePage($quickstart, $page) + { + $_GET['page'] = str_replace(array('/','.page'),array('.',''),$page); + $_GET['notheme'] = 'true'; + $content = $quickstart->parseHtmlContent($quickstart->getApplicationContent()); + //hide prado specific content + $content = str_replace('', '', $content); + return $content; + } + +} + +?> \ No newline at end of file -- cgit v1.2.3