summaryrefslogtreecommitdiff
path: root/buildscripts/chmbuilder
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/chmbuilder')
-rw-r--r--buildscripts/chmbuilder/ChmQuickstartBuilder.php876
-rw-r--r--buildscripts/chmbuilder/build.php158
-rw-r--r--buildscripts/chmbuilder/build_child.php12
-rw-r--r--buildscripts/chmbuilder/classes/pages/ClassDoc.php456
-rw-r--r--buildscripts/chmbuilder/classes/pages/Classes.php38
-rw-r--r--buildscripts/chmbuilder/classes/pages/MainLayout.php14
-rw-r--r--buildscripts/chmbuilder/index.php12
7 files changed, 783 insertions, 783 deletions
diff --git a/buildscripts/chmbuilder/ChmQuickstartBuilder.php b/buildscripts/chmbuilder/ChmQuickstartBuilder.php
index 43b55d12..2e517d68 100644
--- a/buildscripts/chmbuilder/ChmQuickstartBuilder.php
+++ b/buildscripts/chmbuilder/ChmQuickstartBuilder.php
@@ -1,439 +1,439 @@
-<?php
-
-class ChmQuickstartBuilder
-{
- private $base;
- const DEMO_URL = 'http://www.pradosoft.com/demos/quickstart/';
- const CSS_URL = 'assets/chm_style.css';
- private $output_dir;
- private $app;
-
- private $_viewed=array();
-
- public function __construct($base,$output)
- {
- $this->base = $base;
- $this->output_dir = $output;
-
- if(!is_dir($this->output_dir) || !is_dir($this->output_dir.'/assets'))
- {
- @mkdir($this->output_dir);
- @mkdir($this->output_dir.'/assets/');
- copy(dirname(__FILE__).'/chm_style.css', $this->output_dir.'/assets/chm_style.css');
- }
-
- Prado::setPathOfAlias('Output', realpath($this->output_dir));
- }
-
- public function buildDoc($pages)
- {
- foreach($pages as $section)
- {
- foreach($section as $page)
- {
- $this->parsePage($page);
- }
- }
- }
-
- protected function initApp()
- {
- $this->app = new TApplication($this->base);
- $response = new THttpResponse();
- $response->setBufferOutput(false);
- $this->app->setResponse($response);
- $assets = new TAssetManager();
- $assets->setBasePath('Output.assets.*');
- $this->app->setAssetManager($assets);
- }
-
- public function parsePage($page)
- {
- $_GET['page'] = str_replace(array('/','.page'),array('.',''),$page);
- $_GET['notheme'] = 'true';
-
- $html = $this->parseHtmlContent($this->getApplicationContent());
- $file = str_replace(array('/','.page'), array('_','.html'),$page);
-// echo 'writing file '.$file."\n";
- file_put_contents($this->output_dir.'/'.$file, $html);
- }
-
- public function getApplicationContent()
- {
- ob_start();
- $this->initApp();
- $this->app->run();
- $content = ob_get_contents();
- ob_end_clean();
- return $content;
- }
-
- public function parseHtmlContent($content)
- {
- $html = preg_replace('/<input.*name="PRADO_PAGESTATE" [^>]+\/>/m', '', $content);
-$html = str_replace('<div id="header">
-<div class="title">Prado QuickStart Tutorial</div>
-<div class="image"></div>
-</div>', '', $html);
-$html = preg_replace('/<div id="footer">.*?<\/div>/ms', '<div id="footer">
-Copyright &copy; 2005-2007 <a href="http://www.pradosoft.com">PradoSoft</a>.</div>', $html);
-
-
- $html = str_replace('</head>', '<link rel="stylesheet" type="text/css" href="'.self::CSS_URL.'" /></head>', $html);
-
- $html = preg_replace_callback('/(?<!RunButton" )href=".*\?page=([a-zA-Z0-9\.#]+)"/',
- array($this, 'update_page_url'), $html);
- $html = preg_replace_callback('/(?<=RunButton" )href=".*\?page=([a-zA-Z0-9\.#]+)"/',
- array($this, 'update_run_url'), $html);
-
- $html = preg_replace('/(src|href)=("?)\//', '$1=$2assets/',$html);
- $html = str_replace('http://www.pradosoft.com/docs/manual', '../manual/CHMdefaultConverter', $html);
- $html = str_replace('target="_blank">View Source', '>View Source', $html);
- $html = preg_replace('/action="[^"]+"/', '', $html);
- $html = preg_replace('/<script[^>]+><\/script>/', '', $html); //remove js
- $html = preg_replace('/href="C:[^"]+"/', 'href="#"', $html);
-
- $html = preg_replace_callback('/href="\?page=ViewSource&(amp;){0,1}path=([a-zA-z0-9\.\/]+)"/',
- array($this, 'update_source_url'), $html);
-
- return $html;
- }
-
- protected function update_source_url($matches)
- {
- $page = $matches[2];
- $file = str_replace('/', '_',$page).'.html';
-
- if(!isset($this->_viewed[$page]))
- {
- $this->_viewed[$page]=true;
- $this->view_source_page($page);
- }
- return 'href="'.$file.'"';
- }
-
- protected function view_source_page($page)
- {
- $_GET['page'] = 'ViewSource';
- $_GET['path'] = $page;
- $_GET['lines'] = 'false';
-
- $html = $this->parseHtmlContent($this->getApplicationContent());
- $file = str_replace('/', '_',$page).'.html';
-// echo 'writing file '.$file."\n";
- file_put_contents($this->output_dir.'/'.$file, $html);
- }
-
- protected function update_page_url($matches)
- {
- $bits = explode('#',str_replace('.','_',$matches[1]));
- $anchor = isset($bits[1]) ? '#'.$bits[1] : '';
- return 'href="'.$bits[0].'.html'.$anchor.'"';
- }
-
- protected function update_run_url($matches)
- {
- return 'href="'.self::DEMO_URL.'?page='.$matches[1].'"';
- }
-}
-
-class HTMLHelpTOCBuilder
-{
-
- public function buildToc($file,$output,$classes)
- {
- $contents = file_get_contents($file);
- $content = $this->prepareContent($contents);
- $ul = $this->parseUl($content);
- $toc = $this->header();
- $toc .= $this->to_string($ul);
- $toc .= $this->footer();
- $toc = $this->appendApiToc($output,$toc);
- $toc = $this->appendClassesToc($classes,$toc);
- file_put_contents($output.'/toc.hhc', $toc);
- file_put_contents($output.'/prado3_manual.hhp', $this->getHHP());
- file_put_contents($output.'/manual.html', $this->getIndexPage());
- $index = $output.'/manual/CHMdefaultConverter/index.hhk';
- file_put_contents($index, $this->updateIndex($index));
- }
-
- protected function updateIndex($file)
- {
- $content = file_get_contents($file);
- return preg_replace('/"Local" value="/', '"Local" value="manual\\CHMdefaultConverter\\', $content);
- }
-
- protected function appendClassesToc($classes, $toc)
- {
- $version = Prado::getVersion();
- $ul['classes']['params'][] = array('Name' => "Prado {$version} Class Index");
- foreach($classes as $class)
- {
- $ul['classes']['ul'][0]['params'][] =
- array('Name'=>$class, 'Local'=>'classdoc/'.$class.'.html');
- }
- $ul['wiki']['params'][] = array('Name' => "Prado Wiki", 'Local'=>'wiki\\index.html');
- $content = $this->to_string($ul);
- $toc = preg_replace('!(</BODY></HTML>)!', $content.'$1', $toc);
- return $toc;
- }
-
- protected function appendApiToc($output,$toc)
- {
- $content = file_get_contents($output.'/manual/CHMdefaultConverter/contents.hhc');
- $content = preg_replace('/"Local" value="/', '"Local" value="manual\\CHMdefaultConverter\\', $content);
- $toc = preg_replace('!(API Manual">\s*</OBJECT>)\s*(</UL>\s*</BODY></HTML>)!', '$1'."\n".$content.'$2', $toc);
- return preg_replace("/\r/","\n",$toc);
- }
-
- protected function getIndexPage()
- {
- $version = Prado::getVersion();
- $date = date('d M Y', time());
- $year = date('Y',time());
-$content = <<<EOD
-<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Prado Manual</title>
- <style type="text/css">
- /*<![CDATA[*/
- body
- {
- font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif;
- font-weight:normal;
- }
- h1
- {
- color: #600;
- }
- /*]]>*/
- </style>
-</head>
-
-<body style="text-align:center">
-
-<h1>Prado {$version} Manual</h1>
-
-<div>Created On: {$date}</div>
-
-<div style="margin-top:3em;margin-bottom:0.75em"><strong>Written By:</strong> Qiang Xue, Wei Zhuo</div>
-<div style="margin-bottom:3em;"><strong>Edited By:</strong> Wei Zhuo</div>
-
-<div id="footer">
-Copyright &copy; 2005-{$year} <a href="http://www.pradosoft.com">PradoSoft</a>.</div>
-
-</body>
-</html>
-EOD;
- return $content;
- }
-
- protected function getHHP()
- {
- $version = Prado::getVersion();
-$content = <<<EOD
-[OPTIONS]
-Binary TOC=Yes
-Compatibility=1.1 or later
-Compiled File=prado3_manual.chm
-Contents File=toc.hhc
-Default Window=main
-Default Topic=manual.html
-Display compile progress=Yes
-Error log file=_errorlog.txt
-Full-text search=Yes
-Language=0x409 English (United States)
-Title=Prado {$version} Manual
-Binary Index=Yes
-Index file=manual\CHMdefaultConverter\index.hhk
-Default Font=
-Auto Index=Yes
-Create CHI file=No
-Full text search stop list file=
-Display compile notes=Yes
-
-[WINDOWS]
-main="Prado {$version} Manual","toc.hhc","manual\CHMdefaultConverter\index.hhk","manual.html","manual.html",,,,,0x63520,250,0x104e,[10,10,900,700],0xb0000,,,,,,0
-
-EOD;
- return $content;
- }
-
- protected function parseUl($content)
- {
- $ul = array();
- $current = null;
- $ul['index']['params'][] = array('Name'=>'Prado Manual', 'Local'=>'manual.html');
-
- foreach(explode("\n", $content) as $line)
- {
- $line = trim($line);
- if(strlen($line) > 0)
- {
- if(strpos($line,'^')===false)
- {
- $current = $line;
- $ul[$current]['params'][]['Name'] = $current;
- }
- else
- {
- list($page,$title) = explode('^', $line);
- $ul[$current]['ul'][0]['params'][] = array('Name'=>$title, 'Local'=>$this->getFileName($page));
- }
- }
- }
- $version = Prado::getVersion();
- $ul['api']['params'][] = array('Name' => "Prado {$version} API Manual");
-
- return $ul;
- }
-
- protected function getFileName($page)
- {
- return 'quickstart\\'.str_replace('.', '_',$page).'.html';
- }
-
- protected function prepareContent($content)
- {
- $content = preg_replace('/<\/?div[^>]*>/','', $content);
- $content = preg_replace('/<\/?ul>|<\/?li>|<\/a>/ms', '', $content);
- $content = str_replace('<a href="?page=', '', $content);
- $content = str_replace('">', '^', $content);
- return $content;
- }
-
- public function to_string($ul)
- {
- $contents = "<UL>\n";
- foreach($ul as $li)
- {
- if(isset($li['params']))
- {
- $contents .= $this->li_to_string($li);
- }
- if(isset($li['ul']))
- {
- $contents .= $this->to_string($li['ul']);
- }
- }
- $contents .= "</UL>\n";
- return $contents;
- }
-
- protected function li_to_string($li)
- {
- $contents = '';
- foreach($li['params'] as $param)
- {
- $contents .= "\t<LI>";
- $contents .= "<OBJECT type=\"text/sitemap\">\n";
- foreach($param as $name => $value)
- $contents .= "\t\t\t<param name=\"$name\" value=\"$value\">\n";
- $contents .= "\t\t</OBJECT>\n";
- }
- return $contents;
- }
-
- public function header()
- {
- $content = <<<EOD
-<HTML>
-<HEAD>
-</HEAD>
-<BODY>
- <OBJECT type="text/site properties">
- <param name="Window Styles" value="0x800025">
- <param name="FrameName" value="right">
- <param name="ImageType" value="Folder">
- <param name="comment" value="title:Online Help">
- <param name="comment" value="base:index.htm">
- </OBJECT>
-
-EOD;
- return $content;
- }
-
- public function footer()
- {
- return '</BODY></HTML>';
- }
-}
-
-class ClassDocBuilder
-{
- private $output;
- private $base;
-
- function __construct($base, $output)
- {
- $this->base = $base;
- $this->output = $output.'/classdoc';
- if(!is_dir($this->output))
- {
- mkdir($this->output);
- mkdir($this->output.'/assets/');
- }
- Prado::setPathOfAlias('Output', $this->output);
- }
-
- protected function initApp()
- {
- $this->app = new TApplication($this->base);
- $response = new THttpResponse();
- $response->setBufferOutput(false);
- $this->app->setResponse($response);
- $assets = new TAssetManager();
- $assets->setBasePath('Output.assets.*');
- $this->app->setAssetManager($assets);
- }
-
- public function buildDoc($class)
- {
- $this->parsePage($class);
- }
-
- public function parseBasePage()
- {
- $_GET['page'] = 'Classes';
-
- $html = $this->parseHtmlContent($this->getApplicationContent());
- $file = 'Classes.html';
-// echo 'writing file '.$file."\n";
- file_put_contents($this->output.'/'.$file, $html);
- }
-
- public function parsePage($class)
- {
- $_GET['page'] = 'ClassDoc';
- $_GET['class'] = $class;
-
- $html = $this->parseHtmlContent($this->getApplicationContent());
- $file = $class.'.html';
-// echo 'writing file '.$file."\n";
- file_put_contents($this->output.'/'.$file, $html);
- }
-
- protected function getApplicationContent()
- {
- ob_start();
- $this->initApp();
- $this->app->run();
- $content = ob_get_contents();
- ob_end_clean();
- $this->app->completeRequest();
- $this->app=null;
- return $content;
- }
-
- protected function parseHtmlContent($content)
- {
- $html = preg_replace('/<input.*name="PRADO_PAGESTATE" [^>]+\/>/m', '', $content);
- $html = preg_replace('!href="/(\w+)/style.css"!', 'href="assets/$1/style.css"', $html);
- return $html;
- }
-}
-
-
+<?php
+
+class ChmQuickstartBuilder
+{
+ private $base;
+ const DEMO_URL = 'http://www.pradosoft.com/demos/quickstart/';
+ const CSS_URL = 'assets/chm_style.css';
+ private $output_dir;
+ private $app;
+
+ private $_viewed=array();
+
+ public function __construct($base,$output)
+ {
+ $this->base = $base;
+ $this->output_dir = $output;
+
+ if(!is_dir($this->output_dir) || !is_dir($this->output_dir.'/assets'))
+ {
+ @mkdir($this->output_dir);
+ @mkdir($this->output_dir.'/assets/');
+ copy(dirname(__FILE__).'/chm_style.css', $this->output_dir.'/assets/chm_style.css');
+ }
+
+ Prado::setPathOfAlias('Output', realpath($this->output_dir));
+ }
+
+ public function buildDoc($pages)
+ {
+ foreach($pages as $section)
+ {
+ foreach($section as $page)
+ {
+ $this->parsePage($page);
+ }
+ }
+ }
+
+ protected function initApp()
+ {
+ $this->app = new TApplication($this->base);
+ $response = new THttpResponse();
+ $response->setBufferOutput(false);
+ $this->app->setResponse($response);
+ $assets = new TAssetManager();
+ $assets->setBasePath('Output.assets.*');
+ $this->app->setAssetManager($assets);
+ }
+
+ public function parsePage($page)
+ {
+ $_GET['page'] = str_replace(array('/','.page'),array('.',''),$page);
+ $_GET['notheme'] = 'true';
+
+ $html = $this->parseHtmlContent($this->getApplicationContent());
+ $file = str_replace(array('/','.page'), array('_','.html'),$page);
+// echo 'writing file '.$file."\n";
+ file_put_contents($this->output_dir.'/'.$file, $html);
+ }
+
+ public function getApplicationContent()
+ {
+ ob_start();
+ $this->initApp();
+ $this->app->run();
+ $content = ob_get_contents();
+ ob_end_clean();
+ return $content;
+ }
+
+ public function parseHtmlContent($content)
+ {
+ $html = preg_replace('/<input.*name="PRADO_PAGESTATE" [^>]+\/>/m', '', $content);
+$html = str_replace('<div id="header">
+<div class="title">Prado QuickStart Tutorial</div>
+<div class="image"></div>
+</div>', '', $html);
+$html = preg_replace('/<div id="footer">.*?<\/div>/ms', '<div id="footer">
+Copyright &copy; 2005-2007 <a href="http://www.pradosoft.com">PradoSoft</a>.</div>', $html);
+
+
+ $html = str_replace('</head>', '<link rel="stylesheet" type="text/css" href="'.self::CSS_URL.'" /></head>', $html);
+
+ $html = preg_replace_callback('/(?<!RunButton" )href=".*\?page=([a-zA-Z0-9\.#]+)"/',
+ array($this, 'update_page_url'), $html);
+ $html = preg_replace_callback('/(?<=RunButton" )href=".*\?page=([a-zA-Z0-9\.#]+)"/',
+ array($this, 'update_run_url'), $html);
+
+ $html = preg_replace('/(src|href)=("?)\//', '$1=$2assets/',$html);
+ $html = str_replace('http://www.pradosoft.com/docs/manual', '../manual/CHMdefaultConverter', $html);
+ $html = str_replace('target="_blank">View Source', '>View Source', $html);
+ $html = preg_replace('/action="[^"]+"/', '', $html);
+ $html = preg_replace('/<script[^>]+><\/script>/', '', $html); //remove js
+ $html = preg_replace('/href="C:[^"]+"/', 'href="#"', $html);
+
+ $html = preg_replace_callback('/href="\?page=ViewSource&(amp;){0,1}path=([a-zA-z0-9\.\/]+)"/',
+ array($this, 'update_source_url'), $html);
+
+ return $html;
+ }
+
+ protected function update_source_url($matches)
+ {
+ $page = $matches[2];
+ $file = str_replace('/', '_',$page).'.html';
+
+ if(!isset($this->_viewed[$page]))
+ {
+ $this->_viewed[$page]=true;
+ $this->view_source_page($page);
+ }
+ return 'href="'.$file.'"';
+ }
+
+ protected function view_source_page($page)
+ {
+ $_GET['page'] = 'ViewSource';
+ $_GET['path'] = $page;
+ $_GET['lines'] = 'false';
+
+ $html = $this->parseHtmlContent($this->getApplicationContent());
+ $file = str_replace('/', '_',$page).'.html';
+// echo 'writing file '.$file."\n";
+ file_put_contents($this->output_dir.'/'.$file, $html);
+ }
+
+ protected function update_page_url($matches)
+ {
+ $bits = explode('#',str_replace('.','_',$matches[1]));
+ $anchor = isset($bits[1]) ? '#'.$bits[1] : '';
+ return 'href="'.$bits[0].'.html'.$anchor.'"';
+ }
+
+ protected function update_run_url($matches)
+ {
+ return 'href="'.self::DEMO_URL.'?page='.$matches[1].'"';
+ }
+}
+
+class HTMLHelpTOCBuilder
+{
+
+ public function buildToc($file,$output,$classes)
+ {
+ $contents = file_get_contents($file);
+ $content = $this->prepareContent($contents);
+ $ul = $this->parseUl($content);
+ $toc = $this->header();
+ $toc .= $this->to_string($ul);
+ $toc .= $this->footer();
+ $toc = $this->appendApiToc($output,$toc);
+ $toc = $this->appendClassesToc($classes,$toc);
+ file_put_contents($output.'/toc.hhc', $toc);
+ file_put_contents($output.'/prado3_manual.hhp', $this->getHHP());
+ file_put_contents($output.'/manual.html', $this->getIndexPage());
+ $index = $output.'/manual/CHMdefaultConverter/index.hhk';
+ file_put_contents($index, $this->updateIndex($index));
+ }
+
+ protected function updateIndex($file)
+ {
+ $content = file_get_contents($file);
+ return preg_replace('/"Local" value="/', '"Local" value="manual\\CHMdefaultConverter\\', $content);
+ }
+
+ protected function appendClassesToc($classes, $toc)
+ {
+ $version = Prado::getVersion();
+ $ul['classes']['params'][] = array('Name' => "Prado {$version} Class Index");
+ foreach($classes as $class)
+ {
+ $ul['classes']['ul'][0]['params'][] =
+ array('Name'=>$class, 'Local'=>'classdoc/'.$class.'.html');
+ }
+ $ul['wiki']['params'][] = array('Name' => "Prado Wiki", 'Local'=>'wiki\\index.html');
+ $content = $this->to_string($ul);
+ $toc = preg_replace('!(</BODY></HTML>)!', $content.'$1', $toc);
+ return $toc;
+ }
+
+ protected function appendApiToc($output,$toc)
+ {
+ $content = file_get_contents($output.'/manual/CHMdefaultConverter/contents.hhc');
+ $content = preg_replace('/"Local" value="/', '"Local" value="manual\\CHMdefaultConverter\\', $content);
+ $toc = preg_replace('!(API Manual">\s*</OBJECT>)\s*(</UL>\s*</BODY></HTML>)!', '$1'."\n".$content.'$2', $toc);
+ return preg_replace("/\r/","\n",$toc);
+ }
+
+ protected function getIndexPage()
+ {
+ $version = Prado::getVersion();
+ $date = date('d M Y', time());
+ $year = date('Y',time());
+$content = <<<EOD
+<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Prado Manual</title>
+ <style type="text/css">
+ /*<![CDATA[*/
+ body
+ {
+ font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Helvetica, Arial, sans-serif;
+ font-weight:normal;
+ }
+ h1
+ {
+ color: #600;
+ }
+ /*]]>*/
+ </style>
+</head>
+
+<body style="text-align:center">
+
+<h1>Prado {$version} Manual</h1>
+
+<div>Created On: {$date}</div>
+
+<div style="margin-top:3em;margin-bottom:0.75em"><strong>Written By:</strong> Qiang Xue, Wei Zhuo</div>
+<div style="margin-bottom:3em;"><strong>Edited By:</strong> Wei Zhuo</div>
+
+<div id="footer">
+Copyright &copy; 2005-{$year} <a href="http://www.pradosoft.com">PradoSoft</a>.</div>
+
+</body>
+</html>
+EOD;
+ return $content;
+ }
+
+ protected function getHHP()
+ {
+ $version = Prado::getVersion();
+$content = <<<EOD
+[OPTIONS]
+Binary TOC=Yes
+Compatibility=1.1 or later
+Compiled File=prado3_manual.chm
+Contents File=toc.hhc
+Default Window=main
+Default Topic=manual.html
+Display compile progress=Yes
+Error log file=_errorlog.txt
+Full-text search=Yes
+Language=0x409 English (United States)
+Title=Prado {$version} Manual
+Binary Index=Yes
+Index file=manual\CHMdefaultConverter\index.hhk
+Default Font=
+Auto Index=Yes
+Create CHI file=No
+Full text search stop list file=
+Display compile notes=Yes
+
+[WINDOWS]
+main="Prado {$version} Manual","toc.hhc","manual\CHMdefaultConverter\index.hhk","manual.html","manual.html",,,,,0x63520,250,0x104e,[10,10,900,700],0xb0000,,,,,,0
+
+EOD;
+ return $content;
+ }
+
+ protected function parseUl($content)
+ {
+ $ul = array();
+ $current = null;
+ $ul['index']['params'][] = array('Name'=>'Prado Manual', 'Local'=>'manual.html');
+
+ foreach(explode("\n", $content) as $line)
+ {
+ $line = trim($line);
+ if(strlen($line) > 0)
+ {
+ if(strpos($line,'^')===false)
+ {
+ $current = $line;
+ $ul[$current]['params'][]['Name'] = $current;
+ }
+ else
+ {
+ list($page,$title) = explode('^', $line);
+ $ul[$current]['ul'][0]['params'][] = array('Name'=>$title, 'Local'=>$this->getFileName($page));
+ }
+ }
+ }
+ $version = Prado::getVersion();
+ $ul['api']['params'][] = array('Name' => "Prado {$version} API Manual");
+
+ return $ul;
+ }
+
+ protected function getFileName($page)
+ {
+ return 'quickstart\\'.str_replace('.', '_',$page).'.html';
+ }
+
+ protected function prepareContent($content)
+ {
+ $content = preg_replace('/<\/?div[^>]*>/','', $content);
+ $content = preg_replace('/<\/?ul>|<\/?li>|<\/a>/ms', '', $content);
+ $content = str_replace('<a href="?page=', '', $content);
+ $content = str_replace('">', '^', $content);
+ return $content;
+ }
+
+ public function to_string($ul)
+ {
+ $contents = "<UL>\n";
+ foreach($ul as $li)
+ {
+ if(isset($li['params']))
+ {
+ $contents .= $this->li_to_string($li);
+ }
+ if(isset($li['ul']))
+ {
+ $contents .= $this->to_string($li['ul']);
+ }
+ }
+ $contents .= "</UL>\n";
+ return $contents;
+ }
+
+ protected function li_to_string($li)
+ {
+ $contents = '';
+ foreach($li['params'] as $param)
+ {
+ $contents .= "\t<LI>";
+ $contents .= "<OBJECT type=\"text/sitemap\">\n";
+ foreach($param as $name => $value)
+ $contents .= "\t\t\t<param name=\"$name\" value=\"$value\">\n";
+ $contents .= "\t\t</OBJECT>\n";
+ }
+ return $contents;
+ }
+
+ public function header()
+ {
+ $content = <<<EOD
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+ <OBJECT type="text/site properties">
+ <param name="Window Styles" value="0x800025">
+ <param name="FrameName" value="right">
+ <param name="ImageType" value="Folder">
+ <param name="comment" value="title:Online Help">
+ <param name="comment" value="base:index.htm">
+ </OBJECT>
+
+EOD;
+ return $content;
+ }
+
+ public function footer()
+ {
+ return '</BODY></HTML>';
+ }
+}
+
+class ClassDocBuilder
+{
+ private $output;
+ private $base;
+
+ function __construct($base, $output)
+ {
+ $this->base = $base;
+ $this->output = $output.'/classdoc';
+ if(!is_dir($this->output))
+ {
+ mkdir($this->output);
+ mkdir($this->output.'/assets/');
+ }
+ Prado::setPathOfAlias('Output', $this->output);
+ }
+
+ protected function initApp()
+ {
+ $this->app = new TApplication($this->base);
+ $response = new THttpResponse();
+ $response->setBufferOutput(false);
+ $this->app->setResponse($response);
+ $assets = new TAssetManager();
+ $assets->setBasePath('Output.assets.*');
+ $this->app->setAssetManager($assets);
+ }
+
+ public function buildDoc($class)
+ {
+ $this->parsePage($class);
+ }
+
+ public function parseBasePage()
+ {
+ $_GET['page'] = 'Classes';
+
+ $html = $this->parseHtmlContent($this->getApplicationContent());
+ $file = 'Classes.html';
+// echo 'writing file '.$file."\n";
+ file_put_contents($this->output.'/'.$file, $html);
+ }
+
+ public function parsePage($class)
+ {
+ $_GET['page'] = 'ClassDoc';
+ $_GET['class'] = $class;
+
+ $html = $this->parseHtmlContent($this->getApplicationContent());
+ $file = $class.'.html';
+// echo 'writing file '.$file."\n";
+ file_put_contents($this->output.'/'.$file, $html);
+ }
+
+ protected function getApplicationContent()
+ {
+ ob_start();
+ $this->initApp();
+ $this->app->run();
+ $content = ob_get_contents();
+ ob_end_clean();
+ $this->app->completeRequest();
+ $this->app=null;
+ return $content;
+ }
+
+ protected function parseHtmlContent($content)
+ {
+ $html = preg_replace('/<input.*name="PRADO_PAGESTATE" [^>]+\/>/m', '', $content);
+ $html = preg_replace('!href="/(\w+)/style.css"!', 'href="assets/$1/style.css"', $html);
+ return $html;
+ }
+}
+
+
?> \ No newline at end of file
diff --git a/buildscripts/chmbuilder/build.php b/buildscripts/chmbuilder/build.php
index aeef4ad5..b6ea6c7b 100644
--- a/buildscripts/chmbuilder/build.php
+++ b/buildscripts/chmbuilder/build.php
@@ -1,80 +1,80 @@
-<?php
-
-$ROOT = dirname(__FILE__);
-
-//page root location
-$base = realpath($ROOT.'/../../demos/quickstart/protected/');
-$output_dir = realpath($ROOT.'/../../build/docs');
-$classData = realpath($ROOT.'/../classtree/classes.data');
-$classDocBase = realpath($ROOT.'/classes/');
-
-//-------------- END CONFIG ------------------
-
-if(!isset($isChild))
- $isChild = false;
-
-$toc_file = $base.'/controls/TopicList.tpl';
-
-$pages = include($ROOT.'/../texbuilder/quickstart/pages.php');
-
-include($ROOT.'/ChmQuickstartBuilder.php');
-include($ROOT.'/../../framework/PradoBase.php');
-class Prado extends PradoBase
-{
- protected static $app;
-
- public static function setApplication($application)
- {
- self::$app=$application;
- }
-
- public static function getApplication()
- {
- return self::$app;
- }
-
- public static function setPathOfAlias($alias,$path)
- {
- $aliases = self::getPathAliases();
- if(!isset($aliases[$alias]))
- parent::setPathOfAlias($alias,$path);
- }
-}
-
-include($ROOT.'/../../framework/prado.php');
-
-if($isChild)
-{
- $classBuilder = new ClassDocBuilder($classDocBase,$output_dir);
- $classBuilder->buildDoc($argv[1]);
-}
-else
-{
- $pages['Control Reference : Standard Controls'][] = 'Controls/Standard.page';
-
-
- $quickstart= new ChmQuickstartBuilder($base,$output_dir.'/quickstart');
- $quickstart->buildDoc($pages);
-
- //move class data to protected data directory for prado app.
- $classFile = $ROOT.'/classes/Data/classes.data';
- if(is_file($classData) && !is_file($classFile))
- copy($classData, $classFile);
- $classes = unserialize(file_get_contents($classFile));
-
- $classBuilder = new ClassDocBuilder($classDocBase,$output_dir);
-
- //use child process to build doc, otherwise it consumes too much memory
- $child_builder = realpath($ROOT.'/build_child.php');
- foreach($classes as $class =>$data)
- {
- passthru('php '.$child_builder.' '.$class);
- }
-
-// $classBuilder->parseBasePage();
-
- $toc = new HTMLHelpTOCBuilder();
- $toc->buildToc($toc_file,$output_dir,array_keys($classes));
-}
-
+<?php
+
+$ROOT = dirname(__FILE__);
+
+//page root location
+$base = realpath($ROOT.'/../../demos/quickstart/protected/');
+$output_dir = realpath($ROOT.'/../../build/docs');
+$classData = realpath($ROOT.'/../classtree/classes.data');
+$classDocBase = realpath($ROOT.'/classes/');
+
+//-------------- END CONFIG ------------------
+
+if(!isset($isChild))
+ $isChild = false;
+
+$toc_file = $base.'/controls/TopicList.tpl';
+
+$pages = include($ROOT.'/../texbuilder/quickstart/pages.php');
+
+include($ROOT.'/ChmQuickstartBuilder.php');
+include($ROOT.'/../../framework/PradoBase.php');
+class Prado extends PradoBase
+{
+ protected static $app;
+
+ public static function setApplication($application)
+ {
+ self::$app=$application;
+ }
+
+ public static function getApplication()
+ {
+ return self::$app;
+ }
+
+ public static function setPathOfAlias($alias,$path)
+ {
+ $aliases = self::getPathAliases();
+ if(!isset($aliases[$alias]))
+ parent::setPathOfAlias($alias,$path);
+ }
+}
+
+include($ROOT.'/../../framework/prado.php');
+
+if($isChild)
+{
+ $classBuilder = new ClassDocBuilder($classDocBase,$output_dir);
+ $classBuilder->buildDoc($argv[1]);
+}
+else
+{
+ $pages['Control Reference : Standard Controls'][] = 'Controls/Standard.page';
+
+
+ $quickstart= new ChmQuickstartBuilder($base,$output_dir.'/quickstart');
+ $quickstart->buildDoc($pages);
+
+ //move class data to protected data directory for prado app.
+ $classFile = $ROOT.'/classes/Data/classes.data';
+ if(is_file($classData) && !is_file($classFile))
+ copy($classData, $classFile);
+ $classes = unserialize(file_get_contents($classFile));
+
+ $classBuilder = new ClassDocBuilder($classDocBase,$output_dir);
+
+ //use child process to build doc, otherwise it consumes too much memory
+ $child_builder = realpath($ROOT.'/build_child.php');
+ foreach($classes as $class =>$data)
+ {
+ passthru('php '.$child_builder.' '.$class);
+ }
+
+// $classBuilder->parseBasePage();
+
+ $toc = new HTMLHelpTOCBuilder();
+ $toc->buildToc($toc_file,$output_dir,array_keys($classes));
+}
+
?> \ No newline at end of file
diff --git a/buildscripts/chmbuilder/build_child.php b/buildscripts/chmbuilder/build_child.php
index 91662373..a466d03a 100644
--- a/buildscripts/chmbuilder/build_child.php
+++ b/buildscripts/chmbuilder/build_child.php
@@ -1,7 +1,7 @@
-<?php
-
-$isChild = true;
-
-include(dirname(__FILE__).'/build.php');
-
+<?php
+
+$isChild = true;
+
+include(dirname(__FILE__).'/build.php');
+
?> \ No newline at end of file
diff --git a/buildscripts/chmbuilder/classes/pages/ClassDoc.php b/buildscripts/chmbuilder/classes/pages/ClassDoc.php
index 733cfc5b..fc239890 100644
--- a/buildscripts/chmbuilder/classes/pages/ClassDoc.php
+++ b/buildscripts/chmbuilder/classes/pages/ClassDoc.php
@@ -1,228 +1,228 @@
-<?php
-
-class ClassDoc extends TPage
-{
- public $Class;
- private $_classes;
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- $dataFile=Prado::getPathOfNamespace('Application.Data.classes','.data');
- $this->_classes=unserialize(file_get_contents($dataFile));
-
- if(($className=$this->Request['class'])!==null && isset($this->_classes[$className]))
- {
- $this->Class=$this->_classes[$className];
- $this->Class['Name']=$className;
- $this->Title='PRADO - Documentation of '.$className;
- }
- else
- $this->Response->redirect('/docs/classdoc/');
- }
-
- public function getAncestors()
- {
- $ancestors=array();
- $thisClass=$this->Class;
- while(true)
- {
- $parentClass=$thisClass['ParentClass'];
- if(isset($this->_classes[$parentClass]))
- {
- $ancestors[]=$parentClass;
- $thisClass=$this->_classes[$parentClass];
- }
- else
- break;
- }
- $ancestors=array_reverse($ancestors);
- $s='';
- foreach($ancestors as $ancestor)
- $s.="<a href=\"$ancestor.html\">$ancestor</a> &raquo;\n";
- if($s!=='')
- $s="<div class=\"doc-ancestors\">\nInheritance: $s</div>\n";
- return $s;
- }
-
- public function getProperties()
- {
- $class=$this->Class;
- $className=$this->Class['Name'];
- $s='';
- foreach($class['Properties'] as $name=>$property)
- {
- $inherited=strcasecmp($property['class'],$className)!==0;
- $rowclass=$inherited?'doc-inherited':'doc-native';
- $s.="<tr class=\"$rowclass\">\n";
- $access='';
- if($property['readonly'])
- $access.='R';
- if($property['protected'])
- $access.='P';
- if($access==='')
- $access='&nbsp;';
- $s.="<td width=\"1\" nowrap=\"nowrap\" align=\"center\">$access</td>\n";
-
- if($inherited)
- {
- $parentClass=$property['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#methodget{$name}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
- else
- $s.="<td>$name</td>\n";
- }
- else
- {
- $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#methodget{$name}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
-
- $type=$property['type'];
- if(isset($this->_classes[$type]))
- {
- $url="$type.html";
- $s.="<td><a href=\"$url\">$type</a></td>\n";
- }
- else
- $s.="<td>$type</td>\n";
-
- $comments=rtrim($property['comments'],'.').'.';
- if($inherited)
- {
- $parentClass=$property['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="$parentClass.html";
- $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
- }
- else
- $comments.=" (inherited from {$parentClass})";
- }
- $s.="<td>$comments</td>\n";
- $s.="</tr>\n";
- }
-
- $header="<tr>\n<th>&nbsp;</th><th>Name</th><th>Type</th><th>Description</th>\n</tr>\n";
- return $s===''?'':"<div class=\"doc-properties\">\n<table>\n$header$s</table>\n</div>\n";
- }
-
- public function getEvents()
- {
- $class=$this->Class;
- $className=$this->Class['Name'];
- $s='';
- foreach($class['Events'] as $name=>$event)
- {
- $inherited=strcasecmp($event['class'],$className)!==0;
- $rowclass=$inherited?'doc-inherited':'doc-native';
- $s.="<tr class=\"$rowclass\">\n";
-
- $methodName=$name;
- $methodName[0]='o';
- if($inherited)
- {
- $parentClass=$event['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$methodName}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
- else
- $s.="<td>$name</td>\n";
- }
- else
- {
- $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$methodName}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
-
- $comments=rtrim($event['comments'],'.').'.';
- if($inherited)
- {
- $parentClass=$event['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="$parentClass.html";
- $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
- }
- else
- $comments.=" (inherited from {$parentClass})";
- }
- $s.="<td>$comments</td>\n";
- $s.="</tr>\n";
- }
- $header="<tr>\n<th>Name</th><th>Description</th>\n</tr>\n";
- return $s===''?'':"<div class=\"doc-events\">\n<table>\n$header$s</table>\n</div>\n";
- }
-
- public function getMethods()
- {
- $class=$this->Class;
- $className=$this->Class['Name'];
- $s='';
- foreach($class['Methods'] as $name=>$method)
- {
- $inherited=strcasecmp($method['class'],$className)!==0;
- $rowclass=$inherited?'doc-inherited':'doc-native';
- $s.="<tr class=\"$rowclass\">\n";
- $access='';
- if($method['static'])
- $access.='S';
- if($method['protected'])
- $access.='P';
- if($access==='')
- $access='&nbsp;';
- $s.="<td nowrap=\"nowrap\" width=\"1\" align=\"center\">$access</td>\n";
-
- if($inherited)
- {
- $parentClass=$method['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$name}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
- else
- $s.="<td>$name</td>\n";
- }
- else
- {
- $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$name}";
- $s.="<td><a href=\"$url\">$name</a></td>\n";
- }
-
- $comments=rtrim($method['comments'],'.').'.';
- if($inherited)
- {
- $parentClass=$method['class'];
- if(isset($this->_classes[$parentClass]))
- {
- $url="$parentClass.html";
- $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
- }
- else
- $comments.=" (inherited from {$parentClass})";
- }
- $s.="<td>$comments</td>\n";
- $s.="</tr>\n";
- }
- $header="<tr>\n<th>&nbsp;</th><th>Name</th><th>Description</th>\n</tr>\n";
- return $s===''?'':"<div class=\"doc-methods\">\n<table>\n$header$s</table>\n</div>\n";
- }
-
- public function getDerived()
- {
- $class=$this->Class;
- $s='';
- foreach($class['ChildClasses'] as $childName)
- $s.="<li><a href=\"$childName.html\">$childName</a></li>\n";
- return $s===''?'':"<div class=\"doc-derived\">\n<ul>\n$s</ul>\n</div>\n";
- }
-
-}
-
-?>
+<?php
+
+class ClassDoc extends TPage
+{
+ public $Class;
+ private $_classes;
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $dataFile=Prado::getPathOfNamespace('Application.Data.classes','.data');
+ $this->_classes=unserialize(file_get_contents($dataFile));
+
+ if(($className=$this->Request['class'])!==null && isset($this->_classes[$className]))
+ {
+ $this->Class=$this->_classes[$className];
+ $this->Class['Name']=$className;
+ $this->Title='PRADO - Documentation of '.$className;
+ }
+ else
+ $this->Response->redirect('/docs/classdoc/');
+ }
+
+ public function getAncestors()
+ {
+ $ancestors=array();
+ $thisClass=$this->Class;
+ while(true)
+ {
+ $parentClass=$thisClass['ParentClass'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $ancestors[]=$parentClass;
+ $thisClass=$this->_classes[$parentClass];
+ }
+ else
+ break;
+ }
+ $ancestors=array_reverse($ancestors);
+ $s='';
+ foreach($ancestors as $ancestor)
+ $s.="<a href=\"$ancestor.html\">$ancestor</a> &raquo;\n";
+ if($s!=='')
+ $s="<div class=\"doc-ancestors\">\nInheritance: $s</div>\n";
+ return $s;
+ }
+
+ public function getProperties()
+ {
+ $class=$this->Class;
+ $className=$this->Class['Name'];
+ $s='';
+ foreach($class['Properties'] as $name=>$property)
+ {
+ $inherited=strcasecmp($property['class'],$className)!==0;
+ $rowclass=$inherited?'doc-inherited':'doc-native';
+ $s.="<tr class=\"$rowclass\">\n";
+ $access='';
+ if($property['readonly'])
+ $access.='R';
+ if($property['protected'])
+ $access.='P';
+ if($access==='')
+ $access='&nbsp;';
+ $s.="<td width=\"1\" nowrap=\"nowrap\" align=\"center\">$access</td>\n";
+
+ if($inherited)
+ {
+ $parentClass=$property['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#methodget{$name}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+ else
+ $s.="<td>$name</td>\n";
+ }
+ else
+ {
+ $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#methodget{$name}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+
+ $type=$property['type'];
+ if(isset($this->_classes[$type]))
+ {
+ $url="$type.html";
+ $s.="<td><a href=\"$url\">$type</a></td>\n";
+ }
+ else
+ $s.="<td>$type</td>\n";
+
+ $comments=rtrim($property['comments'],'.').'.';
+ if($inherited)
+ {
+ $parentClass=$property['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="$parentClass.html";
+ $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
+ }
+ else
+ $comments.=" (inherited from {$parentClass})";
+ }
+ $s.="<td>$comments</td>\n";
+ $s.="</tr>\n";
+ }
+
+ $header="<tr>\n<th>&nbsp;</th><th>Name</th><th>Type</th><th>Description</th>\n</tr>\n";
+ return $s===''?'':"<div class=\"doc-properties\">\n<table>\n$header$s</table>\n</div>\n";
+ }
+
+ public function getEvents()
+ {
+ $class=$this->Class;
+ $className=$this->Class['Name'];
+ $s='';
+ foreach($class['Events'] as $name=>$event)
+ {
+ $inherited=strcasecmp($event['class'],$className)!==0;
+ $rowclass=$inherited?'doc-inherited':'doc-native';
+ $s.="<tr class=\"$rowclass\">\n";
+
+ $methodName=$name;
+ $methodName[0]='o';
+ if($inherited)
+ {
+ $parentClass=$event['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$methodName}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+ else
+ $s.="<td>$name</td>\n";
+ }
+ else
+ {
+ $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$methodName}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+
+ $comments=rtrim($event['comments'],'.').'.';
+ if($inherited)
+ {
+ $parentClass=$event['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="$parentClass.html";
+ $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
+ }
+ else
+ $comments.=" (inherited from {$parentClass})";
+ }
+ $s.="<td>$comments</td>\n";
+ $s.="</tr>\n";
+ }
+ $header="<tr>\n<th>Name</th><th>Description</th>\n</tr>\n";
+ return $s===''?'':"<div class=\"doc-events\">\n<table>\n$header$s</table>\n</div>\n";
+ }
+
+ public function getMethods()
+ {
+ $class=$this->Class;
+ $className=$this->Class['Name'];
+ $s='';
+ foreach($class['Methods'] as $name=>$method)
+ {
+ $inherited=strcasecmp($method['class'],$className)!==0;
+ $rowclass=$inherited?'doc-inherited':'doc-native';
+ $s.="<tr class=\"$rowclass\">\n";
+ $access='';
+ if($method['static'])
+ $access.='S';
+ if($method['protected'])
+ $access.='P';
+ if($access==='')
+ $access='&nbsp;';
+ $s.="<td nowrap=\"nowrap\" width=\"1\" align=\"center\">$access</td>\n";
+
+ if($inherited)
+ {
+ $parentClass=$method['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="../manual/CHMdefaultConverter/{$this->_classes[$parentClass]['Package']}/{$parentClass}.html#method{$name}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+ else
+ $s.="<td>$name</td>\n";
+ }
+ else
+ {
+ $url="../manual/CHMdefaultConverter/{$class['Package']}/{$className}.html#method{$name}";
+ $s.="<td><a href=\"$url\">$name</a></td>\n";
+ }
+
+ $comments=rtrim($method['comments'],'.').'.';
+ if($inherited)
+ {
+ $parentClass=$method['class'];
+ if(isset($this->_classes[$parentClass]))
+ {
+ $url="$parentClass.html";
+ $comments.=" (inherited from <a href=\"$url\">$parentClass</a>)";
+ }
+ else
+ $comments.=" (inherited from {$parentClass})";
+ }
+ $s.="<td>$comments</td>\n";
+ $s.="</tr>\n";
+ }
+ $header="<tr>\n<th>&nbsp;</th><th>Name</th><th>Description</th>\n</tr>\n";
+ return $s===''?'':"<div class=\"doc-methods\">\n<table>\n$header$s</table>\n</div>\n";
+ }
+
+ public function getDerived()
+ {
+ $class=$this->Class;
+ $s='';
+ foreach($class['ChildClasses'] as $childName)
+ $s.="<li><a href=\"$childName.html\">$childName</a></li>\n";
+ return $s===''?'':"<div class=\"doc-derived\">\n<ul>\n$s</ul>\n</div>\n";
+ }
+
+}
+
+?>
diff --git a/buildscripts/chmbuilder/classes/pages/Classes.php b/buildscripts/chmbuilder/classes/pages/Classes.php
index ee2672b4..aeaf0a0a 100644
--- a/buildscripts/chmbuilder/classes/pages/Classes.php
+++ b/buildscripts/chmbuilder/classes/pages/Classes.php
@@ -1,19 +1,19 @@
-<?php
-
-class Classes extends TPage
-{
- public function onLoad($param)
- {
- parent::onLoad($param);
- $dataFile=Prado::getPathOfNamespace('Application.Data.classes','.data');
- $classes=unserialize(file_get_contents($dataFile));
- $data=array();
- $baseUrl=$this->Request->ApplicationUrl;
- foreach(array_keys($classes) as $className)
- $data["$className.html"]=$className;
- $this->ClassList->DataSource=$data;
- $this->ClassList->dataBind();
- }
-}
-
-?>
+<?php
+
+class Classes extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $dataFile=Prado::getPathOfNamespace('Application.Data.classes','.data');
+ $classes=unserialize(file_get_contents($dataFile));
+ $data=array();
+ $baseUrl=$this->Request->ApplicationUrl;
+ foreach(array_keys($classes) as $className)
+ $data["$className.html"]=$className;
+ $this->ClassList->DataSource=$data;
+ $this->ClassList->dataBind();
+ }
+}
+
+?>
diff --git a/buildscripts/chmbuilder/classes/pages/MainLayout.php b/buildscripts/chmbuilder/classes/pages/MainLayout.php
index e536e71d..163c1c9f 100644
--- a/buildscripts/chmbuilder/classes/pages/MainLayout.php
+++ b/buildscripts/chmbuilder/classes/pages/MainLayout.php
@@ -1,8 +1,8 @@
-<?php
-
-class MainLayout extends TTemplateControl
-{
-
-}
-
+<?php
+
+class MainLayout extends TTemplateControl
+{
+
+}
+
?> \ No newline at end of file
diff --git a/buildscripts/chmbuilder/index.php b/buildscripts/chmbuilder/index.php
index 4330e1a9..359a53e1 100644
--- a/buildscripts/chmbuilder/index.php
+++ b/buildscripts/chmbuilder/index.php
@@ -1,7 +1,7 @@
-<?php
-include('../../framework/prado.php');
- $app = new TApplication("classes");
- $app->run();
-
-
+<?php
+include('../../framework/prado.php');
+ $app = new TApplication("classes");
+ $app->run();
+
+
?> \ No newline at end of file