From 28f361a63740e6ba09a1d3b7a2724ef185452222 Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 21 Feb 2007 19:46:47 +0000 Subject: [PATCH] --- manual/content.php | 155 ++++++++++++++++++++++++++++++++++++++ manual/documentation2.php | 136 +-------------------------------- manual/highlight.php | 6 +- manual/styles/basic.css | 25 +++++- 4 files changed, 185 insertions(+), 137 deletions(-) create mode 100644 manual/content.php diff --git a/manual/content.php b/manual/content.php new file mode 100644 index 000000000..3d679db95 --- /dev/null +++ b/manual/content.php @@ -0,0 +1,155 @@ + + + + + + +
+ $v) { + $indexes = explode('.', $v['index']); + $level = count($indexes); + $e = explode(' - ', $v['name']); + + print '
 '. $v['index'] . '. " . end($e) ."
"; + } + } else { + + + $e = explode(' - ', $_GET['chapter']); + $subchapters = false; + $found = false; + + foreach ($i as $k => $v) { + if ($found) { + if (strncmp($v['name'], $_GET['chapter'], strlen($_GET['chapter'])) === 0) { + $subchapters = true; + } + break; + } + $parts = explode(' - ', $v['name']); + $indexes = explode('.', $v['index']); + + if ($v['name'] === $_GET['chapter']) { + if (isset($i[($k - 1)])) { + $prev = $i[($k - 1)]; + } + if (isset($i[($k + 1)])) { + $next = $i[($k + 1)]; + } + + $foundKey = ($k + 1); + $found = $v; + } + } + ?> + + + + + + + + + + + + +
+ + + +
+ + >Prev + + + + >Next
+ + + + + +
+ + $v) { + $stack[] = $v; + $links[] = "' . $v . ''; + } + print implode(' - ', $links); + ?> +
+
+
+ + +
Table of contents
+
+ '; + ?> + + ' . end($p); ?> + + renderBlock($found['name']); + } + ?> +
+
+ +
+   -- index
+ $v) { + $indexes = explode('.', $v['index']); + $level = count($indexes); + $e = explode(' - ', $v['name']); + if($level === 1) { + $level++; + print ' '. $v['index'] . '. " . end($e) ."
"; + } + } + ?> +
+
diff --git a/manual/documentation2.php b/manual/documentation2.php index 7680e2ff9..db91b0ab2 100644 --- a/manual/documentation2.php +++ b/manual/documentation2.php @@ -65,41 +65,7 @@ class DocTool } return $ret; } - /** - if ($indent == $i) { - $path[$i] = $v; - } else { - */ - public function parseIndex($index, $path = array(), $counters = array()) - { - $ret = array(); - foreach ($index as $k => $v) { - $i = count($path) - 1; - - $counters[$i]++; - - if (is_array($v)) { - if ( ! is_numeric($k)) { - $tmp = $path; - $tmp[] = $k; - - $chapterName = ( ! empty($path)) ? implode(' - ', $path) . ' - ' . $k : $k; - - $ret[] = array('index' => implode('.', $counters), - 'name' => $chapterName); - } - - $ret = array_merge($ret, $this->parseIndex($v, $tmp, $counters)); - } else { - $chapterName = ( ! empty($path)) ? implode(' - ', $path) . ' - ' . $v : $v; - - $ret[] = array('index' => implode('.', $counters), - 'name' => $chapterName); - } - } - return $ret; - } public function renderBlock($name) { if(file_exists("docs/$name.php")) { @@ -122,7 +88,7 @@ class DocTool $this->highlighter->loadString($code); - print ""; + print "
"; print "
"; $this->highlighter->toHtml(); @@ -152,112 +118,16 @@ $i = $doc->parseIndex2($a); - diff --git a/manual/highlight.php b/manual/highlight.php index 8ab0aa1e5..7cdfeb242 100644 --- a/manual/highlight.php +++ b/manual/highlight.php @@ -299,7 +299,7 @@ class PHP_Highlight } elseif ($blocks === true && in_array($i, $this->_plaintextkeys)) { $out .= $line; } else { - $out .= "$line"; + $out .= "$line"; } $out .= "\n"; @@ -339,7 +339,7 @@ class PHP_Highlight // Format code $source = $this->toArray($funcref); - $out = "\n"; + $out = "
\n"; foreach ($source as $i => $line) { $out .= ' '; @@ -350,7 +350,7 @@ class PHP_Highlight $out .= empty($line) ? ' ' : $line; $out .= "
\n"; } - $out .= "
\n"; + $out .= "
\n"; if ($return === true) { return $out; diff --git a/manual/styles/basic.css b/manual/styles/basic.css index e0067c677..e10eca15b 100644 --- a/manual/styles/basic.css +++ b/manual/styles/basic.css @@ -69,12 +69,31 @@ background: #F5F5F5; div.level5 { } -div.index { +table.index { border-style: solid; border-color: #A0A0A0; border-shadow: none; border-width: thin; } +td.bordered { +border-style: solid; +border-color: #A0A0A0; +border-shadow: none; +border-width: thin; +} +div.content { +margin: 5,5,5,5 px; +} +div.code { +font-family: monospace; +} +div.smallmenu { +border-style: solid; +border-color: #A0A0A0; +border-shadow: none; +border-width: thin; +background: #E9E9E9; +} b.title { color: #A50A3D; } @@ -108,3 +127,7 @@ font.level4 { font-size: 11 px; margin-left: 90px; } +font.smallmenu { +font-size: 13 px; +font-weight: bold; +}
+ Doctrine - PHP Data Persistence and ORM Tool
-
$v) { - $indexes = explode('.', $v['index']); - $level = count($indexes); - $e = explode(' - ', $v['name']); - - print '
 '. $v['index'] . '. " . end($e) ."
"; - } - } else { - - - $e = explode(' - ', $_GET['chapter']); - $subchapters = false; - $found = false; - - foreach ($i as $k => $v) { - if ($found) { - if (strncmp($v['name'], $_GET['chapter'], strlen($_GET['chapter'])) === 0) { - $subchapters = true; - } - break; - } - $parts = explode(' - ', $v['name']); - $indexes = explode('.', $v['index']); - - if ($v['name'] === $_GET['chapter']) { - $prev = $i[($k - 1)]; - $next = $i[($k + 1)]; - $foundKey = ($k + 1); - $found = $v; - } - - } - + include('content.php'); ?> - - - - - - -
- -
>Prev>Next
 
- - - - - -
- - - Table of contents
-
- - ' . implode(' - ', $p); ?>
- - - - -
- - renderBlock($found['name']); - } - - - ?> -