Changeset 2963 for trunk/vendor/Sensei
- Timestamp:
- 10/21/07 07:23:59 (15 months ago)
- Location:
- trunk/vendor/Sensei
- Files:
-
- 5 modified
-
Sensei.php (modified) (4 diffs)
-
Sensei/Doc/Renderer/Pdf.php (modified) (1 diff)
-
Sensei/Doc/Renderer/Xhtml.php (modified) (3 diffs)
-
Sensei/Doc/Section.php (modified) (22 diffs)
-
Sensei/Doc/Toc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/vendor/Sensei/Sensei.php
r1651 r2963 37 37 */ 38 38 private static $path; 39 39 40 /** 40 41 * getPath … … 45 46 public static function getPath() 46 47 { 47 if ( !self::$path) {48 if ( ! self::$path) { 48 49 self::$path = dirname(__FILE__); 49 50 } 50 51 return self::$path; 51 52 } 53 52 54 /** 53 55 * simple autoload function … … 92 94 return false; 93 95 } 94 if ( !self::$path) {96 if ( ! self::$path) { 95 97 self::$path = dirname(__FILE__); 96 98 } … … 106 108 . 'be loaded.'); 107 109 } 110 108 111 /** 109 112 * Create a new instance of a class. -
trunk/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php
r2320 r2963 59 59 } 60 60 } 61 61 62 62 /** 63 63 * Deletes temporary files generated during LaTeX to PDF conversion. -
trunk/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php
r2622 r2963 53 53 $this->_wiki->setRenderConf('xhtml', 'Doclink', 'url_callback', array(&$this, 'makeUrl')); 54 54 } 55 55 56 56 /** 57 57 * Renders table of contents as nested unordered lists. … … 104 104 return $output; 105 105 } 106 106 107 107 /** 108 108 * Renders section defined by 'section' option. If 'section' option is not … … 139 139 return $output; 140 140 } 141 141 142 142 /** 143 143 * Renders a sections and its children -
trunk/vendor/Sensei/Sensei/Doc/Section.php
r2624 r2963 40 40 */ 41 41 private $_name; 42 42 43 43 /** 44 44 * The index of this section among the subsections of its parent. The index … … 48 48 */ 49 49 private $_index; 50 50 51 51 /** 52 52 * Array containing the subsections of this section. … … 55 55 */ 56 56 private $_children = array(); 57 57 58 58 /** 59 59 * The parent of this section. … … 62 62 */ 63 63 private $_parent; 64 64 65 65 /** 66 66 * Level of this section in section hierarchy. … … 69 69 */ 70 70 private $_level = 0; 71 71 72 72 /** 73 73 * Text contents of this section. … … 94 94 } 95 95 } 96 96 97 97 /** 98 98 * Adds a subsection to this section. … … 105 105 $this->_children[] = $child; 106 106 } 107 107 108 108 /** 109 109 * Returns the index of this section. … … 120 120 } 121 121 } 122 122 123 123 /** 124 124 * Returns the path of this section. … … 135 135 } 136 136 } 137 137 138 138 /** 139 139 * Returns the name of this section. … … 151 151 } 152 152 } 153 153 154 154 /** 155 155 * Returns how many subsections this section has. … … 161 161 return count($this->_children); 162 162 } 163 163 164 164 /** 165 165 * Returns the subsection that has the given index. … … 175 175 return $this->_children[$index]; 176 176 } 177 177 178 178 /** 179 179 * Returns the parent of this section. … … 189 189 } 190 190 } 191 191 192 192 /** 193 193 * Returns the next section. … … 218 218 } else { 219 219 220 if (( !$maxLevel || ($this->_level < $maxLevel))220 if (( ! $maxLevel || ($this->_level < $maxLevel)) 221 221 && (count($this) > 0)) { 222 222 return $this->getChild(0); 223 223 } 224 224 225 if (( !$maxLevel || ($this->_level <= $maxLevel) )225 if (( ! $maxLevel || ($this->_level <= $maxLevel) ) 226 226 && ($this->_index < count($this->_parent) - 1)) { 227 227 return $this->_parent->getChild($this->_index + 1); … … 232 232 } 233 233 } 234 234 235 235 /** 236 236 * Returns the previous section. … … 255 255 } 256 256 } 257 257 258 258 /** 259 259 * Finds the last child or grand child of this section. … … 268 268 public function findLastChild($maxLevel = 0) 269 269 { 270 if (( !$maxLevel || $this->_level < $maxLevel) && count($this) > 0) {270 if (( ! $maxLevel || $this->_level < $maxLevel) && count($this) > 0) { 271 271 return $this->getChild(count($this) - 1)->findLastChild(); 272 272 } else { … … 274 274 } 275 275 } 276 276 277 277 /** 278 278 * Returns true, if this section is the root section. … … 284 284 return $this->_parent === null; 285 285 } 286 286 287 287 /** 288 288 * Returns the level of this section in section hierarchy. … … 294 294 return $this->_level; 295 295 } 296 296 297 297 /** 298 298 * Returns the text contents of this section. … … 326 326 // The current section did not have any text in this file. 327 327 // Let's assume that the text is defined in another file. 328 if ( !$current->isRoot() && $current->_text === '') {328 if ( ! $current->isRoot() && $current->_text === '') { 329 329 330 330 $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; … … 371 371 // The last section did not have any text in this file. 372 372 // Let's assume that the text is defined in another file. 373 if ( !$current->isRoot() && $current->_text === '') {373 if ( ! $current->isRoot() && $current->_text === '') { 374 374 375 375 $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; -
trunk/vendor/Sensei/Sensei/Doc/Toc.php
r1651 r2963 53 53 $this->_toc->parse(dirname($filename), basename($filename)); 54 54 } 55 55 56 56 /** 57 57 * Finds the section that matches the given path. … … 109 109 return $currentSection; 110 110 } 111 111 112 112 /** 113 113 * Returns a root section with the given index. … … 120 120 return $this->_toc->getChild($index); 121 121 } 122 122 123 123 /** 124 124 * Returns the number of sections (excluding their subsections).