PHP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1545

phpDocumentor Manual

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Contents
phpDocumentor Guide to Creating Fantastic Documentation
phpDocumentor Quickstart Source code for sample1.php Source code for sample2.php Source code for sample3.php phpDocumentor Tutorial Documentable PHP Elements phpDocumentor Tutorials phpDocumentor Manual phpDocumentor tags @abstract @access @author @category @copyright @deprecated @example @final @filesource @global @ignore @internal @license @link @method @name @package @param @property @return @see @since @static @staticvar @subpackage @todo @tutorial @uses @var @version phpDocumentor Inline tags inline {@example} inline {@id} 1 3 10 12 15 16 36 41 47 49 51 52 54 55 56 57 58 60 61 62 65 66 67 68 69 70 71 73 76 78 80 82 83 85 86 88 89 91 94 95 96 97 99

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

inline {@internal}} inline {@inheritdoc} inline {@link} inline {@source} inline {@toc} inline {@tutorial}

101 102 104 106 109 111 113 117 122 128 131 133 134 135 136 137 143 143 144 145 145 145 146 146 146 146 147 147 147 147 147 148 148 148 148 149 149 149 150 150 150 151 151 151 151 152

Writing a New Converter


Converter Default Template Variables Writing a Converter, Methods

Converter Manual Using the PDFParser XML templating language Writing templates for the PDFdefault Converter Writing templates for the CHMdefault Converter Writing templates for the XMLDocBook Converter Writing templates for the HTMLSmarty Converter Writing templates for the HTMLframes Converter Package Converters Procedural Elements
Converter.inc Function adv_htmlentities

Package Converters Classes


Class Converter Var $all_packages Var $class Var $classes Var $class_contents Var $class_data Var $class_elements Var $curfile Var $curpage Var $define_elements Var $elements Var $function_elements Var $global_elements Var $highlightingSource Var $leftindex Var $outputformat Var $package Var $packagecategories Var $package_elements Var $package_output Var $package_parents Var $page Var $page_contents Var $page_data Var $page_elements Var $parseprivate

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $path Var $pkg_elements Var $processSpecialRoots Var $quietmode Var $smarty_dir Var $sort_absolutely_everything Var $sort_page_contents_by_type Var $sourcePaths Var $subpackage Var $targetDir Var $templateDir Var $templateName Var $template_options Var $title Var $todoList Constructor Converter Method AttrToString Method Bolden Method Br Method checkState Method cleanup Method Convert Method convertClass Method convertConst Method convertDefine Method ConvertErrorLog Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPage Method ConvertTitle Method ConvertTodoList Method convertTutorial Method convertVar Method Convert_RIC Method copyFile Method createParentDir Method EncloseList Method EncloseParagraph Method endClass Method endPage Method exampleProgramExample Method flushHighlightCache Method formatIndex Method formatLeftIndex Method formatPkgIndex Method formatTutorialTOC Method generateChildClassList

152 152 152 152 153 153 153 153 153 154 154 154 154 154 155 155 155 156 156 156 157 157 157 158 158 158 159 159 160 160 160 161 161 161 162 162 162 163 163 163 163 164 164 164 165 165 165 165 166

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method generateFormattedClassTree Method getClassesOnPage Method getClassLink Method getConstLink Method getConverterDir Method getCurrentPageLink Method getCurrentPageURL Method getDefineLink Method getFileSourceName Method getFileSourcePath Method getFormattedConflicts Method getFormattedDescMethods Method getFormattedDescVars Method getFormattedImplements Method getFormattedInheritedConsts Method getFormattedInheritedMethods Method getFormattedInheritedVars Method getFormattedMethodImplements Method getFormattedOverrides Method getFunctionLink Method getGlobalLink Method getGlobalValue Method getHighlightState Method getId Method getIncludeValue Method getLink Method getMethodLink Method getPageLink Method getSortedClassTreeFromClass Method getSourceLink Method getState Method getTutorialId Method getTutorialLink Method getTutorialTree Method getVarLink Method hasSourceCode Method hasTutorial Method highlightDocBlockSource Method highlightSource Method highlightTutorialSource Method Italicize Method Kbdize Method ListItem Method newSmarty Method Output Method postProcess Method prepareDocBlock Method PreserveWhiteSpace Method ProgramExample

166 167 167 167 168 168 168 168 169 169 169 169 170 170 170 171 171 172 172 172 173 173 173 173 174 174 175 176 176 178 178 178 179 180 180 181 181 181 181 182 182 182 183 183 183 184 184 184 185

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method returnLink Method returnSee Method Sampize Method setSourcePaths Method setTargetDir Method setTemplateBase Method setTemplateDir Method sortPageContentsByElementType Method sourceLine Method startHighlight Method TranslateEntity Method TranslateTag Method TutorialExample Method type_adjust Method unmangle Method vardump_tree Method Varize Method walk Method walk_everything Method writeExample Method writeFile Method writeSource Method _rmdir Method _setHighlightCache Method _tutorial_path CHMdefaultConverter.inc Class CHMdefaultConverter Var $base_dir Var $class_dir Var $current Var $currentclass Var $juststarted Var $KLinks Var $leftindex Var $name Var $outputformat Var $package_pages Var $page_dir Var $ric_set Var $sort_page_contents_by_type Var $wrote Constructor CHMdefaultConverter Method addHHP Method addKLink Method addSourceTOC Method addTOC Method convertClass Method convertConst Method convertDefine

185 185 186 186 186 187 187 187 188 188 188 188 189 189 189 190 190 190 191 191 192 192 193 193 193 194 194 195 195 195 195 196 196 196 196 196 196 197 197 197 197 197 198 198 198 199 199 199 200

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method ConvertErrorLog Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagepage Method convertPage Method ConvertTodoList Method convertTutorial Method convertVar Method Convert_RIC Method copyMediaRecursively Method endClass Method endPage Method formatIndex Method formatLeftIndex Method formatPkgIndex Method formatTutorialTOC Method generateElementIndex Method generateFormattedClassTree Method generateFormattedClassTrees Method generateFormattedInterfaceTrees Method generateKLinks Method generatePkgElementIndex Method generatePkgElementIndexes Method generateTOC Method getCData Method getClassLink Method getConstLink Method getCurrentPageLink Method getDefineLink Method getExampleLink Method getFunctionLink Method getGlobalLink Method getId Method getIndexInformation Method getMethodLink Method getPageLink Method getPageName Method getRootTree Method getSourceAnchor Method getSourceLink Method getTutorialId Method getVarLink Method Output Method postProcess Method ProgramExample Method rcNatCmp Method rcNatCmp1

200 200 201 201 201 201 202 202 202 202 203 203 203 203 203 204 204 205 205 205 205 206 206 206 207 207 207 207 207 208 208 208 208 209 209 209 210 210 210 211 211 211 211 212 212 213 213 213 213

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method returnLink Method returnSee Method setTargetDir Method setTemplateDir Method SmartyInit Method sourceLine Method TutorialExample Method unmangle Method writeExample Method writefile Method writeNewPPage Method writeSource HTMLframesConverter.inc HTMLSmartyConverter.inc Class HTMLframesConverter Var $base_dir Var $class_dir Var $current Var $currentclass Var $juststarted Var $leftindex Var $name Var $outputformat Var $package_pages Var $page_dir Var $processSpecialRoots Var $ric_set Var $sort_page_contents_by_type Var $wrote Constructor HTMLframesConverter Method convertClass Method convertConst Method convertDefine Method ConvertErrorLog Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagepage Method convertPage Method ConvertTodoList Method convertTutorial Method convertVar Method Convert_RIC Method copyMediaRecursively Method endClass Method endPage Method formatIndex Method formatLeftIndex

214 214 214 214 214 215 215 215 215 216 216 216 217 218 219 219 219 219 219 220 220 220 220 220 220 221 221 221 221 221 222 222 222 223 223 223 224 224 224 224 225 225 225 225 226 226 226 226 227

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method formatPkgIndex Method formatTutorialTOC Method generateElementIndex Method generateFormattedClassTree Method generateFormattedClassTrees Method generateFormattedInterfaceTrees Method generatePkgElementIndex Method generatePkgElementIndexes Method getCData Method getClassLink Method getConstLink Method getCurrentPageLink Method getDefineLink Method getExampleLink Method getFunctionLink Method getGlobalLink Method getId Method getIndexInformation Method getMethodLink Method getPageLink Method getPageName Method getRootTree Method getSourceAnchor Method getSourceLink Method getTutorialId Method getTutorialTree Method getVarLink Method makeLeft Method Output Method postProcess Method ProgramExample Method rcNatCmp Method rcNatCmp1 Method returnLink Method returnSee Method setTargetDir Method SmartyInit Method sourceLine Method TutorialExample Method unmangle Method writeExample Method writeNewPPage Method writeSource Class HTMLSmartyConverter Var $base_dir Var $class_dir Var $current Var $currentclass Var $juststarted

227 227 228 228 228 228 229 229 229 229 230 230 230 231 231 231 232 232 232 232 233 233 233 234 234 234 234 235 235 235 235 235 235 236 236 236 236 237 237 237 237 237 238 238 238 239 239 239 239

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $leftindex Var $name Var $outputformat Var $package_pages Var $page_dir Var $processSpecialRoots Var $ric_set Var $sort_page_contents_by_type Var $wrote Constructor HTMLSmartyConverter Method convertClass Method convertConst Method convertDefine Method ConvertErrorLog Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagepage Method convertPage Method ConvertTodoList Method convertTutorial Method convertVar Method Convert_RIC Method copyMediaRecursively Method endClass Method endPage Method formatIndex Method formatLeftIndex Method formatPkgIndex Method formatTutorialTOC Method generateElementIndex Method generateFormattedClassTree Method generateFormattedClassTrees Method generateFormattedInterfaceTrees Method generatePkgElementIndex Method generatePkgElementIndexes Method getCData Method getClassContents Method getClassLeft Method getClassLink Method getConstLink Method getCurrentPageLink Method getDefineLink Method getExampleLink Method getFunctionLink Method getGlobalLink Method getId Method getIndexInformation

239 239 239 239 240 240 240 240 240 240 241 241 241 242 242 242 243 243 243 244 244 244 244 245 245 245 245 245 246 246 247 247 247 247 248 248 248 249 249 249 249 249 249 250 250 250 250 251 251

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method getMethodLink Method getPageContents Method getPageLeft Method getPageLink Method getPageName Method getRootTree Method getSourceAnchor Method getSourceLink Method getTutorialId Method getTutorialList Method getTutorialTree Method getVarLink Method makeLeft Method Output Method postProcess Method ProgramExample Method rcNatCmp Method rcNatCmp1 Method returnLink Method returnSee Method setTargetDir Method SmartyInit Method sourceLine Method TutorialExample Method unmangle Method writeExample Method writeNewPPage Method writeRIC Method writeSource class.phpdocpdf.php ParserPDF.inc Define PHPDOCUMENTOR_PDF_EVENT_CONTENT Define PHPDOCUMENTOR_PDF_EVENT_FONT Define PHPDOCUMENTOR_PDF_EVENT_NEWPAGE Define PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION Define PHPDOCUMENTOR_PDF_EVENT_TEXT Define PHPDOCUMENTOR_PDF_STATE_CONTENT Define PHPDOCUMENTOR_PDF_STATE_FONT Define PHPDOCUMENTOR_PDF_STATE_NEWPAGE Define PHPDOCUMENTOR_PDF_STATE_PDFFUNCTION Define PHPDOCUMENTOR_PDF_STATE_TEXT PDFdefaultConverter.inc Class PDFdefaultConverter Var $classpackage_pagenums Var $curclasspackage Var $curpagepackage Var $leftindex Var $name Var $outputformat

251 252 252 252 252 252 253 253 253 253 253 253 254 254 254 254 254 255 255 255 255 256 256 256 256 257 257 257 257 258 259 259 259 260 260 260 260 260 260 260 260 261 262 262 262 262 262 262 262

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $pagepackage_pagenums Var $pdf Var $ric_set Var $smarty_dir Var $sort_absolutely_everything Var $_sourcecode Constructor PDFdefaultConverter Method convertClass Method convertConst Method convertDefine Method convertDocBlock Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagepage Method convertPage Method convertParams Method convertTutorial Method convertVar Method Convert_RIC Method generateFormattedClassTrees Method getCData Method getClassLink Method getConstLink Method getDefineLink Method getExampleLink Method getFileSourceName Method getFunctionLink Method getGlobalLink Method getGlobalValue Method getMethodLink Method getPageLink Method getPageName Method getRootTree Method getSourceAnchor Method getSourceLink Method getState Method getTutorialId Method getVarLink Method mystrnatcasecmp Method Output Method postProcess Method returnLink Method returnSee Method setTemplateDir Method TranslateTag Method unmangle Method writeExample

263 263 263 263 263 263 263 264 264 264 264 264 265 265 265 265 265 265 266 266 266 266 266 267 267 267 268 268 268 268 269 269 269 270 270 270 270 270 270 271 271 271 271 272 272 272 272 272 273

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method writeSource Class PDFParser Constructor PDFParser Method getParserEventName Method parse Method setupStates Class phpdocpdf Var $converter Var $font_dir Var $indents Var $indexContents Var $listType Var $reportContents Var $set_pageNumbering Var $_colorStack Var $_save Constructor phpdocpdf Method addMessage Method bullet Method dots Method ezNewPage Method ezOutput Method ezProcessText Method ezText Method getColor Method getYPlusOffset Method indent Method index Method IndexLetter Method orderedBullet Method rf Method setColorArray Method setHTMLColor Method setupTOC Method textcolor Method validHTMLColor Method _ezText XMLDocBookpeardoc2Converter.inc XMLDocBookConverter.inc Class XMLDocBookConverter Var $base_dir Var $category Var $class Var $class_data Var $class_dir Var $current Var $currentclass Var $function_data Var $juststarted

273 273 273 274 274 274 274 275 275 275 275 275 275 275 275 275 275 276 276 276 276 276 276 277 277 277 277 277 277 278 278 278 278 278 278 278 278 280 281 281 281 282 282 282 282 282 282 282 283

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $leftindex Var $local Var $method_data Var $name Var $outputformat Var $package_pages Var $page Var $page_data Var $page_dir Var $path Var $sort_page_contents_by_type Var $sourceloc Var $template_options Constructor XMLDocBookConverter Method convertClass Method convertDefine Method ConvertErrorLog Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagePage Method convertPage Method convertTutorial Method convertVar Method endClass Method endPage Method formatIndex Method formatLeftIndex Method formatPkgIndex Method generateElementIndex Method generateFormattedClassTree Method generateFormattedClassTrees Method generatePkgElementIndex Method generatePkgElementIndexes Method getCData Method getClassLink Method getDefineLink Method getFunctionLink Method getGlobalLink Method getId Method getLink Method getMethodLink Method getPageLink Method getPageName Method getRootTree Method getTutorialId Method getVarLink Method makeLeft

283 283 283 283 283 283 284 284 284 284 284 284 284 285 285 286 286 286 287 287 287 288 288 288 288 289 289 289 289 290 290 290 291 291 292 292 292 292 293 293 293 294 294 294 295 295 295 295 296

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method Output Method postProcess Method prepareDocBlock Method rcNatCmp Method rcNatCmp1 Method returnLink Method returnSee Method setTargetDir Method setTemplateDir Method SmartyInit Method type_adjust Method unmangle Method writeNewPPage Class XMLDocBookpeardoc2Converter Var $base_dir Var $category Var $class Var $class_data Var $class_dir Var $current Var $currentclass Var $function_data Var $juststarted Var $leftindex Var $local Var $method_data Var $name Var $outputformat Var $packagexml Var $package_pages Var $page Var $page_data Var $page_dir Var $path Var $processSpecialRoots Var $sort_absolutely_everything Var $sort_page_contents_by_type Var $sourceloc Var $template_options Var $_peardoc2_constants Var $_peardoc2_globals Var $_write_constants_xml Var $_write_globals_xml Constructor XMLDocBookpeardoc2Converter Method addSummaryToPackageXml Method Br Method convertClass Method convertDefine Method ConvertErrorLog

296 296 296 296 296 297 297 297 297 298 298 298 298 298 299 299 299 299 299 300 300 300 300 300 300 300 301 301 301 301 301 301 301 301 302 302 302 302 302 303 303 303 303 303 303 304 304 304 304

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method convertFunction Method convertGlobal Method convertInclude Method convertMethod Method convertPackagePage Method convertPage Method convertTutorial Method convertVar Method endClass Method exampleProgramExample Method flushPackageXml Method formatIndex Method formatLeftIndex Method formatPkgIndex Method generateChildClassList Method generateElementIndex Method generateFormattedClassTree Method generateFormattedClassTrees Method generateFormattedInterfaceTrees Method generatePkgElementIndex Method generatePkgElementIndexes Method getCData Method getClassLink Method getDefineLink Method getExampleLink Method getFunctionLink Method getGlobalLink Method getId Method getLink Method getMethodLink Method getPageLink Method getPageName Method getRootTree Method getSourceAnchor Method getTutorialId Method getVarLink Method makeLeft Method Output Method postProcess Method prepareDocBlock Method ProgramExample Method rcNatCmp Method rcNatCmp1 Method returnLink Method returnSee Method setTemplateDir Method type_adjust Method unmangle Method wordwrap

305 305 305 305 306 306 306 307 307 307 308 308 308 308 308 308 309 309 309 310 310 310 310 311 311 311 312 312 312 313 313 313 313 314 314 314 315 315 315 315 315 316 316 316 316 316 317 317 317

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method writeExample Method writeFile Method writeNewPPage Method writeSource

317 317 318 318 320 320 321 321 321 321 321 321 321 322 322 322 322 322 322 322 323 323 323 323 323 323 323 323 324 324 324 324 324 325 325 325 325 325 326 326 326 326 326 327 327 327 327 327

Package Cpdf Procedural Elements


class.ezpdf.php

Package Cpdf Classes


Class Cezpdf Var $ez Var $ezPageCount Var $ezPages Var $y Constructor Cezpdf Method alink Method execTemplate Method ezColumnsStart Method ezColumnsStop Method ezGetCurrentPageNumber Method ezImage Method ezInsertMode Method ezNewPage Method ezOutput Method ezProcessText Method ezPRVTaddPageNumbers Method ezPRVTcleanUp Method ezPrvtGetTextWidth Method ezPRVTpageNumberSearch Method ezPrvtTableColumnHeadings Method ezPrvtTableDrawLines Method ezSetCmMargins Method ezSetDy Method ezSetMargins Method ezSetY Method ezStartPageNumbers Method ezStopPageNumbers Method ezStream Method ezTable Method ezText Method ezWhatPageNumber Method ilink Method loadTemplate Method uline Class Cpdf Var $addLooseObjects Var $arc4 Var $arc4_objnum Var $callback Var $catalogId

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $checkpoint Var $currentBaseFont Var $currentColour Var $currentContents Var $currentFont Var $currentFontNum Var $currentLineStyle Var $currentNode Var $currentPage Var $currentStrokeColour Var $currentTextState Var $destinations Var $encrypted Var $encryptionKey Var $fileIdentifier Var $firstPageId Var $fontFamilies Var $fonts Var $infoObject Var $looseObjects Var $messages Var $nCallback Var $nStack Var $nStateStack Var $numFonts Var $numImages Var $numObj Var $numPages Var $objects Var $options Var $procsetObjectId Var $stack Var $stateStack Var $wordSpaceAdjust Constructor Cpdf Method addDestination Method addImage Method addInfo Method addInternalLink Method addJpegFromFile Method addLink Method addMessage Method addObject Method addPngFromFile Method addText Method addTextWrap Method ARC4 Method ARC4_init Method checkAllHere

327 328 328 328 328 328 328 328 329 329 329 329 329 329 329 330 330 330 330 330 330 330 331 331 331 331 331 331 331 332 332 332 332 332 332 333 333 333 334 334 334 334 335 335 335 335 336 336 336

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method closeObject Method curve Method ellipse Method encryptInit Method filledEllipse Method filledRectangle Method getFirstPageId Method getFontDecender Method getFontHeight Method getTextWidth Method line Method md5_16 Method newPage Method openHere Method openObject Method output Method o_action Method o_annotation Method o_catalog Method o_contents Method o_destination Method o_encryption Method o_font Method o_fontDescriptor Method o_fontEncoding Method o_image Method o_info Method o_outlines Method o_page Method o_pages Method o_procset Method o_viewerPreferences Method partEllipse Method polygon Method rectangle Method reopenObject Method restoreState Method saveState Method selectFont Method setColor Method setEncryption Method setFontFamily Method setLineStyle Method setPreferences Method setStrokeColor Method stopObject Method stream Method transaction

336 336 337 337 338 338 338 338 339 339 339 339 339 340 340 340 340 341 341 341 341 342 342 342 342 343 343 343 343 344 344 344 344 345 345 345 345 346 346 346 347 347 347 348 348 348 348 349 351

Package HTML_TreeMenu Procedural Elements


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

file_dialog.php Define PHPDOC_WEBROOT_DIR

351 352 353 353 353 353 354 354 354 354 355 355 355 356 356 356 356 356 357 357 357 357 358 358 358 358 358 359 359 359 360 360 360 360 360 360 361 361 361 361 361 361 362 362 365 365 365 367

Package HTML_TreeMenu Classes


Class DirNode Var $path Constructor DirNode Class HTML_TreeMenu Var $items Constructor HTML_TreeMenu Method addItem Class HTML_TreeMenu_DHTML Var $defaultClass Var $images Var $isDynamic Var $linkTarget Var $noTopLevelImages Var $userPersistence Constructor HTML_TreeMenu_DHTML Method toHTML Class HTML_TreeMenu_Listbox Var $indentChar Var $indentNum Var $linkTarget Var $promoText Constructor HTML_TreeMenu_Listbox Method toHTML Class HTML_TreeMenu_Presentation Var $menu Constructor HTML_TreeMenu_Presentation Method printMenu Class HTML_TreeNode Var $cssClass Var $ensureVisible Var $events Var $expanded Var $icon Var $isDynamic Var $items Var $link Var $parent Var $text Constructor HTML_TreeNode Method addItem Method setOption

Package org-phpdoc Procedural Elements


bug-904820.php Define element

Package Smarty Procedural Elements


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Config_File.class.php Smarty.class.php Define DIR_SEP Define SMARTY_DIR Define SMARTY_PHP_ALLOW Define SMARTY_PHP_PASSTHRU Define SMARTY_PHP_QUOTE Define SMARTY_PHP_REMOVE Smarty_Compiler.class.php

367 368 368 368 369 369 369 369 370 371 371 371 371 371 372 372 372 372 372 373 373 373 373 373 374 374 374 375 375 375 375 375 376 376 376 376 376 377 377 377 377 377 377 378 378 378 378 379 379

Package Smarty Classes


Class Config_File Var $booleanize Var $fix_newlines Var $overwrite Var $read_hidden Var $_config_data Constructor Config_File Method clear Method get Method get_file_names Method get_key Method get_section_names Method get_var_names Method load_file Method set_path Class Smarty Var $autoload_filters Var $cache_dir Var $cache_handler_func Var $cache_lifetime Var $cache_modified_check Var $caching Var $compiler_class Var $compiler_file Var $compile_check Var $compile_dir Var $compile_id Var $config_booleanize Var $config_class Var $config_dir Var $config_fix_newlines Var $config_overwrite Var $config_read_hidden Var $debugging Var $debugging_ctrl Var $debug_tpl Var $default_modifiers Var $default_resource_type Var $default_template_handler_func

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $force_compile Var $global_assign Var $left_delimiter Var $php_handling Var $plugins_dir Var $request_use_auto_globals Var $request_vars_order Var $right_delimiter Var $secure_dir Var $security Var $security_settings Var $template_dir Var $trusted_dir Var $undefined Var $use_sub_dirs Constructor Smarty Method append Method append_by_ref Method assign Method assign_by_ref Method clear_all_assign Method clear_all_cache Method clear_assign Method clear_cache Method clear_compiled_tpl Method clear_config Method config_load Method display Method fetch Method get_config_vars Method get_registered_object Method get_template_vars Method is_cached Method load_filter Method register_block Method register_compiler_function Method register_function Method register_modifier Method register_object Method register_outputfilter Method register_postfilter Method register_prefilter Method register_resource Method template_exists Method trigger_error Method unregister_block Method unregister_compiler_function Method unregister_function Method unregister_modifier

379 379 380 380 380 380 381 381 381 381 381 382 382 382 382 382 383 383 383 383 384 384 384 384 384 385 385 385 385 386 386 386 386 386 387 387 387 388 388 388 388 388 389 389 389 389 390 390 390

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method unregister_object Method unregister_outputfilter Method unregister_postfilter Method unregister_prefilter Method unregister_resource Method _compile_resource Method _compile_source Method _dequote Method _eval Method _fetch_resource_info Method _get_auto_filename Method _get_auto_id Method _get_compile_path Method _get_plugin_filepath Method _include Method _is_compiled Method _parse_resource_name Method _process_compiled_include_callback Method _read_file Method _run_mod_handler Method _smarty_cache_attrs Method _smarty_include Method _trigger_fatal_error Method _unlink Class Smarty_Compiler Constructor Smarty_Compiler Method _add_plugin Method _compile_arg_list Method _compile_block_tag Method _compile_capture_tag Method _compile_compiler_tag Method _compile_custom_tag Method _compile_file Method _compile_foreach_start Method _compile_if_tag Method _compile_include_php_tag Method _compile_include_tag Method _compile_insert_tag Method _compile_plugin_call Method _compile_registered_object_tag Method _compile_section_start Method _compile_smarty_ref Method _compile_tag Method _expand_quoted_text Method _load_filters Method _parse_attrs Method _parse_conf_var Method _parse_is_expr Method _parse_modifiers

390 390 391 391 391 391 391 392 392 392 393 393 393 393 394 394 394 394 395 395 395 395 396 396 396 396 397 397 397 397 398 398 398 398 399 399 399 399 399 400 400 400 400 401 401 401 401 401 402

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method _parse_parenth_args Method _parse_section_prop Method _parse_var Method _parse_vars_props Method _parse_var_props Method _pop_cacheable_state Method _push_cacheable_state Method _quote_replace Method _syntax_error core.assemble_plugin_filepath.php Function smarty_core_assemble_plugin_filepath core.assign_smarty_interface.php Function smarty_core_assign_smarty_interface core.create_dir_structure.php Function smarty_core_create_dir_structure core.display_debug_console.php Function smarty_core_display_debug_console core.get_include_path.php Function smarty_core_get_include_path core.get_microtime.php Function smarty_core_get_microtime core.get_php_resource.php Function smarty_core_get_php_resource core.is_secure.php Function smarty_core_is_secure core.is_trusted.php Function smarty_core_is_trusted core.load_plugins.php Function smarty_core_load_plugins core.load_resource_plugin.php Function smarty_core_load_resource_plugin core.process_cached_inserts.php Function smarty_core_process_cached_inserts core.process_compiled_include.php Function smarty_core_process_compiled_include core.read_cache_file.php Function smarty_core_read_cache_file core.rmdir.php Function smarty_core_rmdir core.rm_auto.php Function smarty_core_rm_auto core.run_insert_handler.php Function smarty_core_run_insert_handler core.smarty_include_php.php Function smarty_core_smarty_include_php core.write_cache_file.php Function smarty_core_write_cache_file core.write_compiled_include.php Function smarty_core_write_compiled_include

402 402 402 403 403 403 403 403 404 405 405 406 406 407 407 408 408 409 409 410 410 411 411 412 412 413 413 414 414 415 415 416 416 417 417 418 418 419 419 420 420 421 421 422 422 423 423 424 424

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

core.write_compiled_resource.php Function smarty_core_write_compiled_resource core.write_file.php Function smarty_core_write_file block.strip.php Function smarty_block_strip block.textformat.php Function smarty_block_textformat function.assign.php Function smarty_function_assign function.assign_debug_info.php Function smarty_function_assign_debug_info function.config_load.php Function smarty_function_config_load function.counter.php Function smarty_function_counter function.cycle.php Function smarty_function_cycle function.debug.php Function smarty_function_debug function.eval.php Function smarty_function_eval function.fetch.php Function smarty_function_fetch function.html_checkboxes.php Function smarty_function_html_checkboxes Function smarty_function_html_checkboxes_output function.html_image.php Function smarty_function_html_image function.html_options.php Function smarty_function_html_options Function smarty_function_html_options_optgroup Function smarty_function_html_options_optoutput function.html_radios.php Function smarty_function_html_radios Function smarty_function_html_radios_output function.html_select_date.php Function smarty_function_html_select_date function.html_select_time.php Function smarty_function_html_select_time function.html_table.php Function smarty_function_html_table Function smarty_function_html_table_cycle function.mailto.php Function smarty_function_mailto function.math.php Function smarty_function_math function.popup.php Function smarty_function_popup

425 425 426 426 427 427 428 428 429 429 430 430 431 431 432 432 433 433 435 435 436 436 437 437 438 438 439 440 440 442 442 442 443 444 444 445 446 446 448 448 449 449 450 451 451 453 453 454 454

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

function.popup_init.php Function smarty_function_popup_init function.var_dump.php Function smarty_function_var_dump modifier.capitalize.php Function smarty_modifier_capitalize modifier.cat.php Function smarty_modifier_cat modifier.count_characters.php Function smarty_modifier_count_characters modifier.count_paragraphs.php Function smarty_modifier_count_paragraphs modifier.count_sentences.php Function smarty_modifier_count_sentences modifier.count_words.php Function smarty_modifier_count_words modifier.date_format.php Function smarty_modifier_date_format modifier.debug_print_var.php Function smarty_modifier_debug_print_var modifier.default.php Function smarty_modifier_default modifier.escape.php Function smarty_modifier_escape modifier.htmlentities.php Function smarty_modifier_htmlentities modifier.indent.php Function smarty_modifier_indent modifier.lower.php Function smarty_modifier_lower modifier.nl2br.php Function smarty_modifier_nl2br modifier.rawurlencode.php Function smarty_modifier_rawurlencode modifier.regex_replace.php Function smarty_modifier_regex_replace modifier.replace.php Function smarty_modifier_replace modifier.spacify.php Function smarty_modifier_spacify modifier.string_format.php Function smarty_modifier_string_format modifier.strip.php Function smarty_modifier_strip modifier.strip_tags.php Function smarty_modifier_strip_tags modifier.truncate.php Function smarty_modifier_truncate modifier.upper.php

455 455 456 456 457 457 458 458 459 459 460 460 461 461 462 462 463 463 464 464 465 465 466 466 467 467 468 468 469 469 470 470 471 471 472 472 473 473 474 474 475 475 476 476 477 477 478 478 479

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Function smarty_modifier_upper modifier.wordwrap.php Function smarty_modifier_wordwrap outputfilter.trimwhitespace.php Function smarty_outputfilter_trimwhitespace Function smarty_outputfilter_trimwhitespace_replace shared.escape_special_chars.php Function smarty_function_escape_special_chars shared.make_timestamp.php Function smarty_make_timestamp

479 480 480 481 481 481 483 483 484 484 486 486 486 486 487 487 488 488 488 489 489 489 489 489 489 489 490 490 490 490 491 491 491 492 492 493 493 494 494 495 495 496 496 497 497 497 498 498 499

Package tests Procedural Elements


bug-441275.php Function test2_441275 Function test_441275 bug-441278.php Function test_441278 bug-441287.php Function test_441287 Function test_4412872 bug-441289.php Function test6 Function test7 Function test8 Function test_441289 Function test_4412892 Function test_4412893 Function test_4412894 Function test_4412895 Function test_bug_567455 Function test_bug_567455_2 bug-441433.php Function SendEMail Function test_441433 bug-443153.php Function test_443153 bug-445298.php Function test_445298 bug-445305.php Function test_445305 bug-445820.php Function test_445820 bug-540368.php Function blah bug-542586.php Function func Define testie bug-550489.php Define thisisdumbbutworks bug-551120.php

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

bug-553137.php Function func1 Function func2 Function func3 bug-554712.php Function passbyref Function returnsme bug-557861.php bug-558031.php Function test_558031 bug-558051.php Function one bug-559467.php Define CONSTANT1 Define CONSTANT2 bug-559494.php bug-559668.php Config Global Variable $_MLIB_GLOBAL_DSN Define MLIB_GLOBAL_DEBUG Define MLIB_INCLUDE_PATH Define MLIB_LOG_FILE Define MLIB_SYSLOG_PRIORITY Define MLIB_TEMPLATE_PATH Define MLIB_USE_SYSLOG bug-560578.php bug-560595.php Define one bug-562997.php Define PDERROR_MULTIPLE_PARENT bug-566200.php Function ezStartPageNumbers bug-566600.php Function a bug-567059.php Function aa_567059 bug-645588.php Function globalGetVar Function globalSetVar bug-698356.php Function bug698356_Output bug-authoremail.php Function test_authoremail bug-defineparse.php Define SMART_PATH_DELIMITER bug-eofquotes.php Function test_eofquotes bug-escaping.php Function test_escape

500 500 500 500 501 501 501 502 503 503 504 504 505 505 505 506 507 508 508 508 509 509 509 509 510 513 514 514 515 515 516 516 517 517 518 518 519 519 519 521 521 522 522 523 523 524 524 525 525

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Function test_escape2 bug-loseprocedural.php Function test Function test2 bug-pageleveldocsblocks.php Function dummy bug-quote_new_parser.php Global Variable $bqnp_tester Define bqnp_tester Function bqnp_testie bug-shortdesc.php Define testContantBlah Define testContantBlah2 Define testContantBlah3 Define testContantBlah4 Define testContantBlah5

525 526 526 526 527 527 528 528 528 528 529 529 529 529 529 529 530 530 530 530 530 530 531 531 531 531 531 531 532 532 532 532 533 533 533 533 533 534 534 534 534 535 535 535 536 536 536 536 537

Package tests Classes


Class a Var $a Var $c Method b Class b553607_Parser Class baby Var $oopsieindexing Class brokenlinkstovars Var $broken Constructor brokenlinkstovars Class bug540341 Method get_header2 Class bug557861 Class bug_489398 Var $test_01 Var $test_02 Var $test_03 Var $test_04 Var $test_05 Class childofpriv Class ClubBase Var $_bPrintFlush Constructor ClubBase Method getAllProperties Method getProperty Method getPropType Method loadClass Method printFlush Method printVar Method setDebug Method setProperty Method _ERROR

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method _PHPDOCUMENTOR_DEBUG Class ctest Var $t1 Var $t3 Constructor ctest Method btest Class few Var $pfh Class functionincomment Method process Class iConverter Method walk Class iHTMLConverter Method Convert Class iiparserBase Var $type Var $value Method getType Method getValue Method setValue Class iNewRender Var $classpackage Var $classpackages Var $classsubpackage Var $classtree Var $class_children Var $data Var $elements Var $event_handlers Var $links Var $methods Var $packageoutput Var $pages Var $parsePrivate Var $pkg_elements Var $private_class Var $quietMode Var $targetDir Var $vars Class iParser Class iparserElement Class kiddie_b587733 Constructor kiddie_b587733 Class mama Class metoo Var $mine Class multipl Var $manyvars Method func

537 538 538 538 538 538 538 539 539 539 539 540 540 541 541 542 542 542 542 542 542 542 543 543 543 543 544 544 544 544 545 545 545 546 546 546 546 546 547 547 547 548 548 548 548 548 549 549 549

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Class parent_b587733 549 Class priv1 549 Class RecordWarning 550 Class summary_form 550 Var $dp 550 Method blah 550 Method get_header2 550 Class test 551 Class test2 551 Class testarraybug 551 Var $arrayType 552 Var $arrayType1 552 Var $myarrayName 552 Var $myarrayName1 552 Class testClass 552 Constructor testClass 552 Class testme 552 Var $me 553 bug-541886.php 554 Class test_541886 554 Class notseen 554 HighlightParserGetInlineTagsTests.php 555 IntermediateParserAddPrivatePageTests.php 557 ParserClassGetSourceLocationTests.php 559 ParserPageGetSourceLocationTests.php 561 phpDocumentorSetupCleanConverterNamePieceTests.php 563 phpDocumentorSetupDecideOnOrOffTests.php 565 Define PHPDOCUMENTOR_BASE 565 Define PHPUnit_MAIN_METHOD 565 phpDocumentorTParserGetInlineTagsTests.php 567 Class tests_HighlightParserGetInlineTagsTests 568 Method main 568 Method setUp 568 Method tearDown 569 Method testShowCorrectBehaviorWhenGivenOneEmptyArg 569 Method testShowCorrectBehaviorWhenGivenOneEmptyArgAndFalse 569 Method testShowCorrectBehaviorWhenGivenOneEmptyArgAndTrue 569 Class tests_IntermediateParserAddPrivatePageTests 570 Method main 570 Method setUp 570 Method tearDown 571 Method testShowCorrectBehaviorWhenPrivatePageArrayIsEmpty 571 Method testShowCorrectBehaviorWhenPrivatePageArrayIsNotAlreadyEmpty 571 Class tests_ParserClassGetSourceLocationTests 572 Method main 572 Method setUp 572 Method tearDown 572 Method testWhenLocationNotSetAndPearizeFalse 573 Method testWhenLocationNotSetAndPearizeNull 573

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method testWhenLocationNotSetAndPearizeTrue Method testWhenNonPearLocationSetAndPearizeFalse Method testWhenNonPearLocationSetAndPearizeNull Method testWhenNonPearLocationSetAndPearizeTrue Method testWhenNonPearLocationSetIncludingDotsAndPearizeFalse Method testWhenNonPearLocationSetIncludingDotsAndPearizeNull Method testWhenNonPearLocationSetIncludingDotsAndPearizeTrue Method testWhenNonPearRelativeLocationSetAndPearizeFalse Method testWhenNonPearRelativeLocationSetAndPearizeNull Method testWhenNonPearRelativeLocationSetAndPearizeTrue Method testWhenPearLocationSetAndPearizeFalse Method testWhenPearLocationSetAndPearizeNull Method testWhenPearLocationSetAndPearizeTrue Method testWhenPearLocationSetIncludingDotsAndPearizeFalse Method testWhenPearLocationSetIncludingDotsAndPearizeNull Method testWhenPearLocationSetIncludingDotsAndPearizeTrue Method testWhenPearRelativeLocationSetAndPearizeFalse Method testWhenPearRelativeLocationSetAndPearizeNull Method testWhenPearRelativeLocationSetAndPearizeTrue Class tests_ParserPageGetSourceLocationTests Method main Method setUp Method tearDown Method testWhenLocationNotSetAndPearizeFalse Method testWhenLocationNotSetAndPearizeNull Method testWhenLocationNotSetAndPearizeTrue Method testWhenNonPearLocationSetAndPearizeFalse Method testWhenNonPearLocationSetAndPearizeNull Method testWhenNonPearLocationSetAndPearizeTrue Method testWhenNonPearLocationSetIncludingDotsAndPearizeFalse Method testWhenNonPearLocationSetIncludingDotsAndPearizeNull Method testWhenNonPearLocationSetIncludingDotsAndPearizeTrue Method testWhenNonPearRelativeLocationSetAndPearizeFalse Method testWhenNonPearRelativeLocationSetAndPearizeNull Method testWhenNonPearRelativeLocationSetAndPearizeTrue Method testWhenPearLocationSetAndPearizeFalse Method testWhenPearLocationSetAndPearizeNull Method testWhenPearLocationSetAndPearizeTrue Method testWhenPearLocationSetIncludingDotsAndPearizeFalse Method testWhenPearLocationSetIncludingDotsAndPearizeNull Method testWhenPearLocationSetIncludingDotsAndPearizeTrue Method testWhenPearRelativeLocationSetAndPearizeFalse Method testWhenPearRelativeLocationSetAndPearizeNull Method testWhenPearRelativeLocationSetAndPearizeTrue Class tests_phpDocumentorSetupCleanConverterNamePieceTests Method main Method setUp Method tearDown Method testDoNotAllowTruePathingOnPrimaryWithOneArg

573 574 574 574 575 575 575 575 576 576 576 577 577 577 578 578 578 578 579 579 579 580 580 580 580 581 581 581 582 582 582 583 583 583 584 584 584 585 585 585 585 586 586 586 587 587 587 588 588

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method testDoNotAllowTruePathingOnPrimaryWithTwoArgs Method testDoNotAllowTruePathingOnSecondary Method testDoNotAllowTruePathingOnTertiary Method testExtremeExampleAndInvalidSecondary Method testExtremeExampleAndInvalidTertiaryA Method testExtremeExampleAndInvalidTertiaryB Method testExtremeExampleButValidPrimaryWithOneArg Method testExtremeExampleButValidPrimaryWithTwoArgs Method testExtremeExampleButValidSecondary Method testNormalSecondaryDefault Method testNormalSecondaryDocbookPeardoc2 Method testNormalSecondaryFrames Method testNormalSecondarySmarty Method testNormalTertiaryDefault Method testNormalTertiaryDomDefault Method testNormalTertiaryDomEarthli Method testNormalTertiaryDomL0l33t Method testNormalTertiaryDomPhpdocde Method testNormalTertiaryDomPhphtmllib Method testNormalTertiaryEarthli Method testNormalTertiaryHands Method testNormalTertiaryL0l33t Method testNormalTertiaryPear Method testNormalTertiaryPhp Method testNormalTertiaryPhpdocde Method testNormalTertiaryPhphtmllib Method testNormalWithOneArgPrimaryCHM Method testNormalWithOneArgPrimaryHTML Method testNormalWithOneArgPrimaryPDF Method testNormalWithOneArgPrimaryXML Method testNormalWithTwoArgsPrimaryCHM Method testNormalWithTwoArgsPrimaryHTML Method testNormalWithTwoArgsPrimaryPDF Method testNormalWithTwoArgsPrimaryXML Method testPreventUpToParentPathingOnPrimaryWithOneArg Method testPreventUpToParentPathingOnPrimaryWithTwoArgs Method testPreventUpToParentPathingOnSecondary Method testPreventUpToParentPathingOnTertiary Method testUserDefinedTertiaryValue Class tests_phpDocumentorSetupDecideOnOrOffTests Method main Method setUp Method tearDown Method testBasicOff Method testBasicOn Method testFuzzyEmpty Method testFuzzyFalseA Method testFuzzyFalseB Method testFuzzyFalseC

588 589 589 589 590 590 590 591 591 591 591 592 592 592 593 593 593 594 594 594 595 595 595 595 596 596 596 597 597 597 598 598 598 599 599 599 600 600 600 601 601 601 601 602 602 602 602 603 603

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method testFuzzyNoA Method testFuzzyNoB Method testFuzzyNoC Method testFuzzyOffA Method testFuzzyOffB Method testFuzzyOnA Method testFuzzyOnB Method testFuzzyOne Method testFuzzyTrueA Method testFuzzyTrueB Method testFuzzyTrueC Method testFuzzyYesA Method testFuzzyYesB Method testFuzzyYesC Method testFuzzyYesD Method testFuzzyYesE Method testFuzzyZero Method testUnexpectedGreatLiterature Method testUnexpectedLargeNumber Method testUnexpectedNegative Method testUnexpectedNull Method testUnexpectedSpaces Class tests_phpDocumentorTParserGetInlineTagsTests Method main Method setUp Method tearDown Method testShowCorrectBehaviorInlineExampleWhenParsePrivateOff Method testShowCorrectBehaviorInlineExampleWhenParsePrivateOn Method testShowCorrectBehaviorInlineInternalWhenParsePrivateOff Method testShowCorrectBehaviorInlineInternalWhenParsePrivateOn Method testShowCorrectBehaviorInlineLinkWhenParsePrivateOff Method testShowCorrectBehaviorInlineLinkWhenParsePrivateOn Method testShowCorrectBehaviorInlineSourceWhenParsePrivateOff Method testShowCorrectBehaviorInlineSourceWhenParsePrivateOn Method testShowCorrectBehaviorInlineTutorialWhenParsePrivateOff Method testShowCorrectBehaviorInlineTutorialWhenParsePrivateOn Class bug_556894_base Var $test Method test Class bug_556894_sub1 Class bug_556894_sub2

603 603 604 604 604 604 605 605 605 605 605 606 606 606 606 607 607 607 607 608 608 608 608 609 609 609 610 610 610 611 611 611 611 612 612 612 613 613 613 613 614 616 616 617 617 617 619 619

Package XML_Beautifier Procedural Elements


Plain.php

Package XML_Beautifier Classes


Class PHPDoc_XML_Beautifier_Renderer_Plain Method serialize

Package phpDocumentor Procedural Elements


actions.php

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

builder.php config.php utilities.php Function getDir Function htmlArraySelect Function recurseDir Function showImage Function switchDirTree Function vdump_par top.php new_phpdoc.php phpdoc.php Classes.inc clone.inc.php Function phpDocumentor_clone clone5.inc.php common.inc.php Function debug Function fancy_debug Define PATH_DELIMITER Function phpDocumentor_ConfigFileList Function phpDocumentor_get_class Function phpDocumentor_parse_ini_file Define PHPDOCUMENTOR_VER Define PHPDOCUMENTOR_WEBSITE Define PHPDOCUMENTOR_WINDOWS Define SMART_PATH_DELIMITER Define tokenizer_ext Define _IN_PHP5 EventStack.inc IntermediateParser.inc Io.inc Function get_include_path Function Ioinc_mystrucsort Function Ioinc_sortfiles Function setup_dirs Function set_dir ParserDescCleanup.inc Define PHPDOCUMENTOR_PDP_EVENT_B Define PHPDOCUMENTOR_PDP_EVENT_BR Define PHPDOCUMENTOR_PDP_EVENT_CODE Define PHPDOCUMENTOR_PDP_EVENT_DOUBLECR Define PHPDOCUMENTOR_PDP_EVENT_ESCAPE Define PHPDOCUMENTOR_PDP_EVENT_ESCAPE_CODE Define PHPDOCUMENTOR_PDP_EVENT_ESCAPE_PRE Define PHPDOCUMENTOR_PDP_EVENT_I Define PHPDOCUMENTOR_PDP_EVENT_KBD Define PHPDOCUMENTOR_PDP_EVENT_LIST Define PHPDOCUMENTOR_PDP_EVENT_P

621 623 625 625 625 626 626 626 626 628 629 630 631 632 632 634 635 635 636 636 636 636 637 637 637 637 637 637 637 638 639 640 640 640 641 641 641 643 643 644 644 644 644 644 644 644 644 645 645

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define PHPDOCUMENTOR_PDP_EVENT_PRE Define PHPDOCUMENTOR_PDP_EVENT_SAMP Define PHPDOCUMENTOR_PDP_EVENT_SIMLIST Define PHPDOCUMENTOR_PDP_EVENT_VAR Define PHPDOCUMENTOR_PDP_STATE_B Define PHPDOCUMENTOR_PDP_STATE_BR Define PHPDOCUMENTOR_PDP_STATE_CODE Define PHPDOCUMENTOR_PDP_STATE_DOUBLECR Define PHPDOCUMENTOR_PDP_STATE_ESCAPE Define PHPDOCUMENTOR_PDP_STATE_ESCAPE_CODE Define PHPDOCUMENTOR_PDP_STATE_ESCAPE_PRE Define PHPDOCUMENTOR_PDP_STATE_I Define PHPDOCUMENTOR_PDP_STATE_KBD Define PHPDOCUMENTOR_PDP_STATE_LIST Define PHPDOCUMENTOR_PDP_STATE_P Define PHPDOCUMENTOR_PDP_STATE_PRE Define PHPDOCUMENTOR_PDP_STATE_SAMP Define PHPDOCUMENTOR_PDP_STATE_SIMLIST Define PHPDOCUMENTOR_PDP_STATE_VAR phpdoc.inc ProceduralPages.inc Publisher.inc Setup.inc.php Global Variable $interface Global Variable $phpDocumentor_DefaultCategoryName Global Variable $phpDocumentor_DefaultPackageName Global Variable $_phpDocumentor_setting Function checkForBugCondition Function decideOnOrOff Function phpDocumentor_out HighlightParserTests.php IntermediateParserTests.php ParserClassTests.php ParserPageTests.php phpDocumentorSetupTests.php phpDocumentorTParserTests.php Define PHPUnit_MAIN_METHOD

645 645 645 645 645 645 645 646 646 646 646 646 646 646 646 647 647 647 647 648 649 650 651 651 651 652 652 652 652 654 655 656 657 658 659 660 660 661 661 661 662 662 662 663 663 663 664 664 664

Package phpDocumentor Classes


Class bug_772441 Class Classes Method addClass Method addConst Method addMethod Method addPackageToFile Method addVar Method getClass Method getClassByPackage Method getClassesInPath Method getConflicts

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method getDefiniteChildren Method getParentClass Method getRoots Method Inherit Method nextFile Method processChild Method setClassParent Class EventStack Var $num Var $stack Method getEvent Method popEvent Method pushEvent Class Io Var $ignore Var $phpDocOptions Var $valid_booleans Constructor Io Method checkIgnore Method dirList Method displayHelpMsg Method getAllFiles Method getBase Method getDirTree Method getReadmeInstallChangelog Method getRegExpableSearchString Method getTutorials Method isIncludeable Method parseArgv Method readPhpFile Method removeNonMatches Method _setupIgnore Class phpDocumentor_IntermediateParser Var $all_packages Var $classes Var $converters Var $cur_class Var $data Var $db_template Var $event_handlers Var $last Var $lasttype Var $packagecategories Var $packageoutput Var $package_pages Var $package_parents Var $pages Var $parsePrivate Var $privatepages

664 665 665 665 666 666 667 667 668 668 668 668 668 668 669 669 669 669 670 670 670 670 671 671 672 672 672 672 673 673 673 674 674 675 675 675 676 676 676 676 677 677 677 678 678 678 679 679 679

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $private_class Var $proceduralpages Var $quietMode Var $ric Var $targetDir Var $templateBase Var $title Var $type Var $undocumentedElementWarnings Var $uses Constructor phpDocumentor_IntermediateParser Method addConverter Method addElementToPage Method addPackageParent Method addPage Method addPageIfNecessary Method addPrivatePage Method addUses Method ClasselementCmp Method Convert Method elementCmp Method handleClass Method handleConst Method handleDefine Method handleDocBlock Method HandleEvent Method handleFunction Method handleGlobal Method handleInclude Method handleMethod Method handlePackagePage Method handlePage Method handleTutorial Method handleVar Method Output Method parsePackagePage Method setParsePrivate Method setQuietMode Method setTargetDir Method setTemplateBase Method setUndocumentedElementWarningsMode Method _guessPackage Class phpDocumentor_setup Var $dirs Var $files Var $hidden Var $ignoresymlinks Var $ignore_files Var $packages

679 680 680 680 681 681 681 681 682 682 682 682 683 683 683 684 684 684 685 685 686 686 686 687 687 688 688 689 689 689 690 690 690 691 691 692 692 692 692 693 693 693 694 694 694 695 695 695 695

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $parse Var $render Var $setup Constructor phpDocumentor_setup Method checkIgnoreTag Method createDocs Method parseHiddenFiles Method parseIni Method readCommandLineSettings Method readConfigFile Method setDirectoriesToParse Method setFilesToParse Method setIgnore Method setJavadocDesc Method setMemoryLimit Method setPackageOutput Method setParsePrivate Method setQuietMode Method setTargetDir Method setTemplateBase Method setTitle Method setUndocumentedElementWarnings Class ProceduralPages Var $curfile Var $defineconflicts Var $definesbyfile Var $definesbynamefile Var $functionconflicts Var $functionsbyfile Var $functionsbynamefile Var $globalconflicts Var $globalsbyfile Var $globalsbynamefile Var $ignorepages Var $includesbyfile Var $pageclasspackages Var $pageconflicts Var $pagepackages Var $pages Var $pathpages Method addClassPackageToFile Method addDefine Method addFunction Method addGlobal Method addInclude Method addPage Method addPagePackage Method getPathInfo Method getRealPath

695 695 696 696 696 696 696 696 697 697 697 697 697 697 697 698 698 698 698 698 698 698 699 699 699 700 700 700 701 701 701 702 702 702 702 703 703 703 704 704 704 704 705 705 705 705 705 706 706

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method ignorePage Method pathMatchesParsedFile Method replaceElement Method setName Method setParseBase Method setupPagePackages Method setupPages Class Publisher Var $popEvent Var $pushEvent Var $subscriber Var $tokens Method publishEvent Method subscribe Class tests_HighlightParserTests Method main Method suite Class tests_IntermediateParserTests Method main Method suite Class tests_ParserClassTests Method main Method suite Class tests_ParserPageTests Method main Method suite Class tests_phpDocumentorSetupTests Method main Method suite Class tests_phpDocumentorTParserTests Method main Method suite DescHTML.inc Class parserB Method Convert Class parserBr Method Convert Class parserCode Method Convert Class parserDescVar Method Convert Class parserI Method Convert Class parserKbd Method Convert Class parserList Var $items Var $numbered Constructor parserList

706 707 707 707 707 707 708 708 709 709 709 709 709 709 710 710 710 711 711 711 711 711 712 712 712 712 712 713 713 713 713 713 715 716 716 717 717 718 718 718 719 719 720 720 721 721 721 722 722

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method addItem Method addList Method Convert Class parserPre Method Convert Class parserSamp Method Convert DocBlockTags.inc Class parserAccessTag Var $isvalid Var $keyword Constructor parserAccessTag Method Convert Method getString Class parserExampleTag Var $keyword Constructor parserExampleTag Method ConvertSource Method getSourceLink Class parserFileSourceTag Var $keyword Var $path Var $source Constructor parserFileSourceTag Method Convert Method ConvertSource Method getSourceLink Method writeSource Class parserLicenseTag Var $keyword Constructor parserLicenseTag Class parserLinkTag Var $keyword Constructor parserLinkTag Class parserMethodTag Var $keyword Var $returnType Class parserNameTag Var $keyword Constructor parserNameTag Method Convert Class parserParamTag Var $keyword Class parserPropertyReadTag Var $keyword Class parserPropertyTag Var $keyword Var $returnType Constructor parserPropertyTag

722 722 722 723 723 724 724 725 726 726 726 726 727 727 727 728 728 728 729 729 729 730 730 730 730 730 731 731 732 732 732 732 733 733 733 734 734 734 735 735 735 735 736 736 736 737 737 737 737

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Class parserPropertyWriteTag Var $keyword Class parserReturnTag Var $converted_returnType Var $keyword Var $returnType Constructor parserReturnTag Method Convert Class parserSeeTag Var $keyword Constructor parserSeeTag Method Convert Class parserStaticvarTag Var $keyword Class parserTag Var $keyword Var $type Constructor parserTag Method Convert Method getString Method HandleEvent Class parserTutorialTag Var $keyword Method Convert Class parserUsedByTag Var $keyword Constructor parserUsedByTag Method Convert Class parserUsesTag Var $keyword Constructor parserUsesTag Method Convert Method getDescription Class parserVarTag Var $keyword Var $returnType Errors.inc Global Variable $phpDocumentor_errors Global Variable $phpDocumentor_error_descrip Global Variable $phpDocumentor_warning_descrip Function addError Function addErrorDie Function addWarning Define PDERROR_ACCESS_WRONG_PARAM Define PDERROR_BEAUTIFYING_FAILED Define PDERROR_CANNOT_EXTEND_SELF Define PDERROR_CANT_HAVE_INLINE_IN_TAGNAME Define PDERROR_CANT_NEST_IN_B Define PDERROR_CHILD_TUTORIAL_NOT_FOUND

738 738 738 739 739 739 740 740 740 741 741 741 741 742 742 743 743 743 743 744 744 744 745 745 746 746 746 746 747 747 747 748 748 748 749 749 750 750 754 756 756 756 757 757 757 757 758 758 758

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define PDERROR_CLASS_CONFLICT Define PDERROR_CLASS_EXISTS Define PDERROR_CLASS_NOT_IN_PACKAGE Define PDERROR_CLASS_PARENT_NOT_FOUND Define PDERROR_CONVERTER_NOT_FOUND Define PDERROR_CONVERTER_OVR_GFCT Define PDERROR_DANGEROUS_PHP_BUG_EXISTS Define PDERROR_DB_TEMPLATE_UNTERMINATED Define PDERROR_DOCBLOCK_CONFLICT Define PDERROR_DOCBLOCK_GOES_CLASS Define PDERROR_DUMB_USES Define PDERROR_ELEMENT_IGNORED Define PDERROR_EMPTY_EXAMPLE_TITLE Define PDERROR_EXAMPLE_NOT_FOUND Define PDERROR_FUNCTION_HAS_NONAME Define PDERROR_GLOBAL_NOT_FOUND Define PDERROR_ID_MUST_BE_INLINE Define PDERROR_IGNORE_TAG_IGNORED Define PDERROR_ILLEGAL_PACKAGENAME Define PDERROR_INHERITANCE_CONFLICT Define PDERROR_INHERITDOC_DONT_WORK_HERE Define PDERROR_INLINETAG_IN_SEE Define PDERROR_INTERNAL_NOT_CLOSED Define PDERROR_INVALID_VALUES Define PDERROR_LOOP_RECURSION_LIMIT_REACHED Define PDERROR_MALFORMED_GLOBAL_TAG Define PDERROR_MALFORMED_TAG Define PDERROR_MISSING_PROPERTY_TAG_NAME Define PDERROR_MULTIPLE_ACCESS_TAGS Define PDERROR_MULTIPLE_CATEGORY_TAGS Define PDERROR_MULTIPLE_GLOBAL_TAGS Define PDERROR_MULTIPLE_NAME_TAGS Define PDERROR_MULTIPLE_PACKAGE_TAGS Define PDERROR_MULTIPLE_PARENT Define PDERROR_MULTIPLE_RETURN_TAGS Define PDERROR_MULTIPLE_SUBPACKAGE_TAGS Define PDERROR_MULTIPLE_VAR_TAGS Define PDERROR_NAME_ALIAS_SAME_AS_TARGET Define PDERROR_NEED_WHITESPACE Define PDERROR_NESTED_INTERNAL Define PDERROR_NOTODO_INCLUDE Define PDERROR_NO_CONVERTERS Define PDERROR_NO_CONVERTER_HANDLER Define PDERROR_NO_DOCBOOK_ID Define PDERROR_NO_PACKAGE_TAG Define PDERROR_NO_PAGE_LEVELDOCBLOCK Define PDERROR_OVERRIDDEN_PACKAGE_TAGS Define PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS Define PDERROR_PACKAGECAT_SET

758 758 758 758 758 758 759 759 759 759 759 759 759 759 759 760 760 760 760 760 760 760 760 761 761 761 761 761 761 761 761 761 762 762 762 762 762 762 762 762 762 762 763 763 763 763 763 763 763

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE Define PDERROR_PARENT_NOT_FOUND Define PDERROR_PARSEPRIVATE Define PDERROR_PDFFUNCTION_NO_FUNC Define PDERROR_PDF_METHOD_DOESNT_EXIST Define PDERROR_PDF_TEMPVAR_DOESNT_EXIST Define PDERROR_PRIVATE_ASSUMED Define PDERROR_SOURCECODE_IGNORED Define PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND Define PDERROR_SOURCE_TAG_IGNORED Define PDERROR_TAG_NOT_HANDLED Define PDERROR_TEMPLATEDIR_DOESNT_EXIST Define PDERROR_TEXT_OUTSIDE_LI Define PDERROR_TUTORIAL_IS_OWN_CHILD Define PDERROR_TUTORIAL_IS_OWN_GRANDPA Define PDERROR_TUTORIAL_NOT_FOUND Define PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND Define PDERROR_UL_IN_UL Define PDERROR_UNCLOSED_TAG Define PDERROR_UNDOCUMENTED_ELEMENT Define PDERROR_UNKNOWN_COMMANDLINE Define PDERROR_UNKNOWN_TAG Define PDERROR_UNMATCHED_LIST_TAG Define PDERROR_UNMATCHED_TUTORIAL_TAG Define PDERROR_UNTERMINATED_ATTRIB Define PDERROR_UNTERMINATED_ENTITY Define PDERROR_UNTERMINATED_INLINE_TAG Class ErrorTracker Var $curfile Var $errors Var $lasterror Var $lastwarning Var $linenum Var $warnings Method addError Method addErrorReturn Method addWarning Method handleEvent Method returnErrors Method returnLastError Method returnLastWarning Method returnWarnings Class RecordError Var $type Method output Class RecordWarning Var $data Var $file Var $linenum

763 763 764 764 764 764 764 764 764 764 764 764 765 765 765 765 765 765 765 765 765 766 766 766 766 766 766 766 767 767 767 767 767 767 767 768 768 768 769 769 769 769 769 770 770 770 770 771 771

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $num Var $type Constructor RecordWarning Method output InlineTags.inc Class parserExampleInlineTag Constructor parserExampleInlineTag Method arrayConvert Method getProgramListing Method setSource Class parserIdInlineTag Var $category Var $id Var $inlinetype Var $package Var $subpackage Var $tutorial Constructor parserIdInlineTag Method Convert Class parserInheritdocInlineTag Var $inlinetype Constructor parserInheritdocInlineTag Method Convert Class parserInlineTag Var $inlinetype Var $type Constructor parserInlineTag Method getString Method Strlen Class parserLinkInlineTag Var $linktext Constructor parserLinkInlineTag Method Convert Method ConvertPart Class parserSourceInlineTag Var $end Var $inlinetype Var $source Var $start Constructor parserSourceInlineTag Method arrayConvert Method Convert Method getString Method setSource Method stringConvert Method Strlen Class parserTocInlineTag Var $inlinetype Constructor parserTocInlineTag

771 771 771 772 773 773 774 774 775 775 775 776 776 776 776 776 776 776 777 777 778 778 778 778 779 779 779 779 779 780 780 780 781 781 781 782 782 782 782 783 783 783 784 784 784 784 785 785 785

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method Convert Method setPath Method setTOC Class parserTutorialInlineTag Constructor parserTutorialInlineTag Method Convert LinkClasses.inc Class abstractLink Var $category Var $fileAlias Var $name Var $package Var $path Var $subpackage Var $type Method addLink Class classLink Var $type Class constLink Var $type Class defineLink Var $type Class functionLink Var $type Class globalLink Var $type Class methodLink Var $class Var $type Method addLink Class pageLink Var $type Class tutorialLink Var $section Var $title Var $type Method addLink Class varLink Var $type ParserData.inc Class parserBase Var $type Var $value Method getType Method getValue Method setValue Class parserData Var $classelements Var $clean

785 786 786 786 787 787 788 789 789 789 789 789 789 789 789 790 790 790 791 791 791 791 792 792 792 793 793 793 793 793 794 794 794 795 795 795 795 795 796 797 797 798 798 798 798 798 799 799 799

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $docblock Var $elements Var $links Var $parent Var $privateclasselements Var $privateelements Var $tutorial Var $type Method addElement Method addLink Method addTutorial Method explicitDocBlock Method getClasses Method getLink Method getName Method getTutorial Method hasClasses Method hasExplicitDocBlock Method hasInterfaces Method isClean Method setDocBlock Method setParent Class parserPage Var $category Var $file Var $id Var $modDate Var $name Var $origName Var $package Var $packageOutput Var $parserVersion Var $path Var $source Var $sourceLocation Var $subpackage Var $type Constructor parserPage Method getFile Method getName Method getPackageOutput Method getParseData Method getPath Method getSourceLocation Method getType Method setFile Method setName Method setPackageOutput Method setPath

800 800 800 800 800 800 801 801 801 801 801 802 802 802 802 802 802 802 802 802 803 803 803 804 804 804 804 804 804 804 804 805 805 805 805 805 805 806 806 806 806 806 806 806 807 807 807 807 808

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method setSource Method setSourceLocation Class parserStringWithInlineTags Var $type Var $value Method add Method Convert Method getString Method hasInlineTag Method setSource Method trimmedStrlen ParserDocBlock.inc Class parserDesc Var $type Method add Method hasInheritDoc Method hasSource Method replaceInheritDoc Class parserDocBlock Var $category Var $desc Var $endlinenumber Var $explicitcategory Var $explicitpackage Var $funcglobals Var $hasaccess Var $hasname Var $linenumber Var $package Var $packagedescrip Var $params Var $processed_desc Var $processed_sdesc Var $properties Var $return Var $sdesc Var $statics Var $subpackage Var $subpackagedescrip Var $tags Var $unknown_tags Var $var Constructor parserDocBlock Method addAccess Method addExample Method addFileSource Method addFuncGlobal Method addKeyword Method addLink

808 808 809 809 809 809 809 810 810 810 811 812 812 813 813 813 813 813 814 814 814 814 814 815 815 815 815 815 815 816 816 816 816 816 816 817 817 817 817 817 817 817 817 818 818 818 818 819 819

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method addName Method addPackage Method addParam Method addProperty Method addReturn Method addSee Method addStaticVar Method addTag Method addUnknownTag Method addUses Method addVar Method canSource Method cantSource Method changeGlobal Method changeParam Method changeStatic Method getDesc Method getEndLineNumber Method getExplicitCategory Method getExplicitPackage Method getKeyword Method getLineNumber Method getSDesc Method getType Method hasInheritDoc Method listParams Method listProperties Method listTags Method overridePackage Method postProcess Method replaceInheritDoc Method resetParams Method setDesc Method setEndLineNumber Method setExplicitCategory Method setExplicitPackage Method setLineNumber Method setShortDesc Method setSource Method updateGlobals Method updateModifiers Method updateParams Method updateStatics ParserElements.inc Class parserClass Var $curfile Var $extends Var $ignore Var $parent

819 819 820 820 820 820 821 821 821 821 822 822 822 822 822 823 823 823 823 823 823 823 823 823 823 824 824 824 824 824 824 825 825 825 825 825 825 826 826 826 827 827 827 828 828 829 829 829 829

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $sourceLocation Var $tutorial Var $type Var $_implements Method addImplements Method addTutorial Method getChildClassList Method getConflicts Method getConstNames Method getConsts Method getExtends Method getImplements Method getInheritedConsts Method getInheritedMethods Method getInheritedVars Method getLink Method getMethod Method getMethodNames Method getMethods Method getModifiers Method getParent Method getParentClassTree Method getSourceLocation Method getTutorial Method getVar Method getVarNames Method getVars Method hasConst Method hasMethod Method hasVar Method isInterface Method setAccessModifiers Method setExtends Method setInterface Method setModifiers Method setParent Method setParentNoClass Method setSourceLocation Class parserConst Var $class Var $type Constructor parserConst Method getClass Method getLink Class parserDefine Var $type Method getConflicts Method getLink Class parserElement

830 830 830 830 830 831 831 831 831 832 832 832 832 832 832 833 833 833 833 833 833 834 834 834 835 835 835 835 835 835 835 836 836 836 836 836 837 837 837 837 838 838 838 838 839 839 839 839 840

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Var $conflicts Var $docblock Var $endlinenumber Var $file Var $linenumber Var $name Var $path Method getEndLineNumber Method getFile Method getLineNumber Method getName Method getPackage Method getPath Method setDocBlock Method setEndLineNumber Method setFile Method setLineNumber Method setName Method setPath Class parserFunction Var $globals Var $params Var $returnsreference Var $source Var $statics Var $type Method addGlobals Method addParam Method addSource Method addStatics Method getConflicts Method getFunctionCall Method getIntricateFunctionCall Method getLink Method getParam Method getReturnsReference Method getSource Method hasSource Method listGlobals Method listParams Method listStatics Method setReturnsReference Class parserGlobal Var $datatype Var $type Method getConflicts Method getDataType Method getLink Method setDataType

840 840 841 841 841 841 841 841 841 841 841 841 841 842 842 842 842 842 842 843 843 843 844 844 844 844 844 845 845 845 845 846 846 846 846 846 846 846 847 847 847 847 847 847 847 847 848 848 848

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Class parserInclude Var $type Class parserMethod Var $class Var $isConstructor Var $isDestructor Var $type Var $_modifiers Constructor parserMethod Method addParam Method getClass Method getFunctionCall Method getImplements Method getIntricateFunctionCall Method getLink Method getModifiers Method getOverrides Method getOverridingMethods Method getOverridingMethodsForClass Method setConstructor Method setDestructor Method setModifiers Class parserPackagePage Var $package Var $type Constructor parserPackagePage Method Convert Class parserTutorial Var $children Var $ini Var $linked_element Var $name Var $next Var $package Var $parent Var $path Var $prev Var $tutorial_type Var $type Var $_xml Constructor parserTutorial Method Convert Method getLink Method getNext Method getParent Method getPrev Method getTitle Method isChildOf Method setNext

849 849 849 850 850 850 850 851 851 851 851 851 851 851 852 852 852 852 852 853 853 853 853 853 853 854 854 854 854 854 855 855 855 855 855 856 856 856 856 856 857 857 857 857 857 858 858 858 858

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method setParent Method setPrev Class parserVar Var $class Var $type Var $_modifiers Constructor parserVar Method getClass Method getLink Method getModifiers Method getOverrides Method getOverridingVars Method getOverridingVarsForClass Method setModifiers Beautifier.php Tokenizer.php Define PHPDOC_BEAUTIFIER_CDATA Define PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE Define PHPDOC_XMLTOKEN_EVENT_CDATA Define PHPDOC_XMLTOKEN_EVENT_CLOSETAG Define PHPDOC_XMLTOKEN_EVENT_COMMENT Define PHPDOC_XMLTOKEN_EVENT_DEF Define PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE Define PHPDOC_XMLTOKEN_EVENT_ENTITY Define PHPDOC_XMLTOKEN_EVENT_IN_CDATA Define PHPDOC_XMLTOKEN_EVENT_NOEVENTS Define PHPDOC_XMLTOKEN_EVENT_OPENTAG Define PHPDOC_XMLTOKEN_EVENT_PI Define PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE Define PHPDOC_XMLTOKEN_EVENT_XML Define STATE_XMLTOKEN_ATTRIBUTE Define STATE_XMLTOKEN_CDATA Define STATE_XMLTOKEN_CLOSETAG Define STATE_XMLTOKEN_COMMENT Define STATE_XMLTOKEN_DEF Define STATE_XMLTOKEN_DOUBLEQUOTE Define STATE_XMLTOKEN_ENTITY Define STATE_XMLTOKEN_IN_CDATA Define STATE_XMLTOKEN_NOEVENTS Define STATE_XMLTOKEN_OPENTAG Define STATE_XMLTOKEN_PI Define STATE_XMLTOKEN_SINGLEQUOTE Define STATE_XMLTOKEN_XML HighlightParser.inc Parser.inc Define PARSER_EVENT_ACCESS_MODIFIER Define PARSER_EVENT_ARRAY Define PARSER_EVENT_CLASS Define PARSER_EVENT_CLASS_CONSTANT

859 859 860 860 860 860 860 860 861 861 861 861 861 861 863 864 864 864 865 865 865 865 865 865 865 865 865 865 865 865 866 866 866 866 866 866 866 866 866 866 866 866 867 868 870 870 870 870 871

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define PARSER_EVENT_CLASS_MEMBER Define PARSER_EVENT_COMMENT Define PARSER_EVENT_COMMENTBLOCK Define PARSER_EVENT_DEFINE Define PARSER_EVENT_DEFINE_GLOBAL Define PARSER_EVENT_DEFINE_PARAMS Define PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS Define PARSER_EVENT_DESC Define PARSER_EVENT_DOCBLOCK Define PARSER_EVENT_DOCBLOCK_TEMPLATE Define PARSER_EVENT_DOCKEYWORD Define PARSER_EVENT_DOCKEYWORD_EMAIL Define PARSER_EVENT_END_DOCBLOCK_TEMPLATE Define PARSER_EVENT_END_STATEMENT Define PARSER_EVENT_EOFQUOTE Define PARSER_EVENT_ESCAPE Define PARSER_EVENT_FUNCTION Define PARSER_EVENT_FUNCTION_PARAMS Define PARSER_EVENT_FUNCTION_PARAM_VAR Define PARSER_EVENT_FUNC_GLOBAL Define PARSER_EVENT_GLOBAL_VALUE Define PARSER_EVENT_IMPLEMENTS Define PARSER_EVENT_INCLUDE Define PARSER_EVENT_INCLUDE_PARAMS Define PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS Define PARSER_EVENT_INLINE_DOCKEYWORD Define PARSER_EVENT_LOGICBLOCK Define PARSER_EVENT_METHOD Define PARSER_EVENT_METHOD_LOGICBLOCK Define PARSER_EVENT_NOEVENTS Define PARSER_EVENT_OUTPHP Define PARSER_EVENT_PHPCODE Define PARSER_EVENT_QUOTE Define PARSER_EVENT_QUOTE_VAR Define PARSER_EVENT_SINGLEQUOTE Define PARSER_EVENT_STATIC_VAR Define PARSER_EVENT_STATIC_VAR_VALUE Define PARSER_EVENT_TAGS Define PARSER_EVENT_VAR Define PARSER_EVENT_VAR_ARRAY Define PARSER_EVENT_VAR_ARRAY_COMMENT Define PHPDOCUMENTOR_EVENT_CLASS Define PHPDOCUMENTOR_EVENT_CONST Define PHPDOCUMENTOR_EVENT_DEFINE Define PHPDOCUMENTOR_EVENT_DOCBLOCK Define PHPDOCUMENTOR_EVENT_DOCBLOCK_TEMPLATE Define PHPDOCUMENTOR_EVENT_END_DOCBLOCK_TEMPLATE Define PHPDOCUMENTOR_EVENT_END_PAGE Define PHPDOCUMENTOR_EVENT_FUNCTION

871 871 871 871 871 871 871 871 871 871 871 872 872 872 872 872 872 872 872 872 872 872 872 872 873 873 873 873 873 873 873 873 873 873 873 873 874 874 874 874 874 874 874 874 874 874 874 874 875

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define PHPDOCUMENTOR_EVENT_GLOBAL Define PHPDOCUMENTOR_EVENT_INCLUDE Define PHPDOCUMENTOR_EVENT_MESSAGE Define PHPDOCUMENTOR_EVENT_NEWFILE Define PHPDOCUMENTOR_EVENT_NEWLINENUM Define PHPDOCUMENTOR_EVENT_NEWSTATE Define PHPDOCUMENTOR_EVENT_PACKAGEPAGE Define PHPDOCUMENTOR_EVENT_PAGE Define PHPDOCUMENTOR_EVENT_README_INSTALL_CHANGELOG Define PHPDOCUMENTOR_EVENT_TUTORIAL Define PHPDOCUMENTOR_EVENT_VAR Define STATE_ACCESS_MODIFIER Define STATE_ARRAY Define STATE_CLASS Define STATE_CLASS_CONSTANT Define STATE_CLASS_MEMBER Define STATE_COMMENT Define STATE_COMMENTBLOCK Define STATE_DEFINE Define STATE_DEFINE_PARAMS Define STATE_DEFINE_PARAMS_PARENTHESIS Define STATE_DESC Define STATE_DOCBLOCK Define STATE_DOCBLOCK_TEMPLATE Define STATE_DOCKEYWORD Define STATE_DOCKEYWORD_EMAIL Define STATE_END_CLASS Define STATE_END_DOCBLOCK_TEMPLATE Define STATE_EOFQUOTE Define STATE_ESCAPE Define STATE_FUNCTION Define STATE_FUNCTION_PARAMS Define STATE_FUNCTION_PARAM_VAR Define STATE_FUNC_GLOBAL Define STATE_GLOBAL Define STATE_GLOBAL_VALUE Define STATE_IMPLEMENTS Define STATE_INCLUDE Define STATE_INCLUDE_PARAMS Define STATE_INCLUDE_PARAMS_PARENTHESIS Define STATE_INLINE_DOCKEYWORD Define STATE_LOGICBLOCK Define STATE_METHOD Define STATE_METHOD_LOGICBLOCK Define STATE_NOEVENTS Define STATE_OUTPHP Define STATE_PHPCODE Define STATE_QUOTE Define STATE_QUOTE_VAR

875 875 875 875 875 875 875 875 875 876 876 876 876 876 876 876 876 876 876 876 876 877 877 877 877 877 877 877 877 877 877 877 877 878 878 878 878 878 878 878 878 878 878 878 878 878 879 879 879

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Define STATE_SINGLEQUOTE Define STATE_STATIC_VAR Define STATE_STATIC_VAR_VALUE Define STATE_TAGS Define STATE_VAR Define STATE_VAR_ARRAY Define STATE_VAR_ARRAY_COMMENT Define T_ABSTRACT Define T_CONST Define T_DOC_COMMENT Define T_FINAL Define T_IMPLEMENTS Define T_INTERFACE Define T_ML_COMMENT Define T_PRIVATE Define T_PROTECTED Define T_PUBLIC phpDocumentorTParser.inc TutorialHighlightParser.inc Define STATE_TUTORIAL_ATTRIBUTE Define STATE_TUTORIAL_CLOSETAG Define STATE_TUTORIAL_COMMENT Define STATE_TUTORIAL_DOUBLEQUOTE Define STATE_TUTORIAL_ENTITY Define STATE_TUTORIAL_ITAG Define STATE_TUTORIAL_NOEVENTS Define STATE_TUTORIAL_OPENTAG Define STATE_TUTORIAL_SINGLEQUOTE Define TUTORIAL_EVENT_ATTRIBUTE Define TUTORIAL_EVENT_CLOSETAG Define TUTORIAL_EVENT_COMMENT Define TUTORIAL_EVENT_DOUBLEQUOTE Define TUTORIAL_EVENT_ENTITY Define TUTORIAL_EVENT_ITAG Define TUTORIAL_EVENT_NOEVENTS Define TUTORIAL_EVENT_OPENTAG Define TUTORIAL_EVENT_SINGLEQUOTE XMLpackagePageParser.inc Define PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES Define PHPDOCUMENTOR_PDP_EVENT_CDATA Define PHPDOCUMENTOR_PDP_EVENT_ENTITY Define PHPDOCUMENTOR_PDP_EVENT_PROGRAMLISTING Define PHPDOCUMENTOR_PDP_EVENT_TAG Define PHPDOCUMENTOR_PDP_STATE_ATTRIBUTES Define PHPDOCUMENTOR_PDP_STATE_CDATA Define PHPDOCUMENTOR_PDP_STATE_ENTITY Define PHPDOCUMENTOR_PDP_STATE_PROGRAMLISTING Define PHPDOCUMENTOR_PDP_STATE_TAG Class Parser

879 879 879 879 879 879 879 879 879 879 879 879 879 879 879 879 880 881 882 883 883 883 883 883 883 883 883 883 883 883 883 884 884 884 884 884 884 885 885 885 886 886 886 886 886 886 886 886 886

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Constructor Parser Method categoryTagHandler Method checkEventPop Method checkEventPush Method configWordParser Method defaultTagHandler Method endTag Method exampleTagHandler Method getParserEventName Method globalTagHandler Method invalidTagHandler Method packageTagHandler Method paramTagHandler Method parse Method propertyTagHandler Method returnTagHandler Method setupStates Method staticvarTagHandler Method usesTagHandler Method varTagHandler Class parserDescParser Constructor parserDescParser Method doSimpleList Method getParserEventName Method parse Method setupStates Class phpDocumentorTParser Var $eventHandlers Var $inlineTagHandlers Var $source_location Constructor phpDocumentorTParser Method parse Class phpDocumentor_HighlightParser Constructor phpDocumentor_HighlightParser Method configWordParser Method newLineNum Method parse Method setLineNum Method setupStates Class phpDocumentor_HighlightWordParser Method backupPos Method getWord Method nextToken Method setup Class phpDocumentor_peardoc2_XML_Beautifier Method formatFile Method formatString Class phpDocumentor_TutorialHighlightParser Constructor phpDocumentor_TutorialHighlightParser

887 887 887 887 888 888 888 888 889 889 889 890 890 890 891 891 891 892 892 892 893 893 893 894 894 894 895 896 896 896 896 896 897 897 897 898 898 899 899 899 900 900 900 900 901 901 901 902 902

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method checkEventPop Method checkEventPush Method configWordParser Method getParserEventName Method newLineNum Method parse Method setLineNum Method setupStates Class phpDocumentor_XML_Beautifier_Tokenizer Var $eventHandlers Constructor phpDocumentor_XML_Beautifier_Tokenizer Method checkEventPop Method checkEventPush Method configWordParser Method getParserEventName Method incdataHandler Method parseString Method setupStates Class ppageParser Var $package Var $subpackage Constructor ppageParser Method defaultHandler Method handleInlineDockeyword Method parse Method setupStates Class XMLPackagePageParser Var $context Var $eventHandlers Var $pars Var $refsect1id Var $refsect2id Var $refsect3id Constructor XMLPackagePageParser Method getParserEventName Method parse Method setupStates find_phpdoc.php PackagePageElements.inc Class parserCData Method Convert Class parserEntity Constructor parserEntity Method Convert Class parserXMLDocBookTag Var $attributes Var $name Constructor parserXMLDocBookTag Method add

902 903 903 904 904 904 905 905 905 906 906 906 906 907 907 907 907 908 909 909 909 909 909 910 910 910 910 911 911 911 911 911 911 911 912 913 913 914 915 916 916 917 917 917 918 918 919 919 919

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Method addAttribute Method addCData Method Convert Method endCData Method getId Method getSubsection Method getTitle Method getTOC Method hasTitle Method setId Method setTitle Method setTOC Method startCData phpDocumentorTWordParser.inc WordParser.inc Class ObjectWordParser Constructor ObjectWordParser Method getWord Method nextIsObjectOrNonNL Method setup Class phpDocumentorTWordParser Method addFileSource Method addSource Method backupPos Method concatTokens Method findGlobal Method getFileSource Method getSource Method getWord Method setup Method tokenEquals Class WordParser Method backupPos Method getBlock Method getPos Method getSource Method getWord Method setPos Method setSeperator Method setup Method setWhitespace

919 920 920 920 920 921 921 921 921 921 922 922 922 923 924 924 925 925 925 925 925 926 926 926 927 927 927 928 928 928 928 928 929 929 929 929 930 930 930 931 931 932 933 933 939 939 945 945 946

Appendices
Appendix A - Class Trees phpDocumentor HTML_TreeMenu tests org-phpdoc Converters XML_Beautifier

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Cpdf Smarty Appendix B - README/CHANGELOG/INSTALL README ChangeLog INSTALL FAQ Appendix C - Source Code Package phpDocumentor source code: Converter.inc source code: CHMdefaultConverter.inc source code: HTMLframesConverter.inc source code: HTMLSmartyConverter.inc source code: class.phpdocpdf.php source code: ParserPDF.inc source code: PDFdefaultConverter.inc source code: XMLDocBookpeardoc2Converter.inc Package phpDocumentor source code: file_dialog.php Package phpDocumentor source code: builder.php source code: config.php source code: top.php source code: new_phpdoc.php source code: phpdoc.php source code: Classes.inc source code: clone.inc.php source code: clone5.inc.php source code: common.inc.php source code: EventStack.inc source code: IntermediateParser.inc source code: Io.inc source code: phpdoc.inc source code: DescHTML.inc source code: DocBlockTags.inc source code: Errors.inc source code: InlineTags.inc source code: LinkClasses.inc source code: Beautifier.php source code: Tokenizer.php source code: HighlightParser.inc source code: find_phpdoc.php Appendix D - Todo List

946 947 948 949 952 952 954 958 959 960 1034 1060 1086 1113 1118 1126 1140 1163 1164 1168 1169 1171 1181 1183 1184 1185 1203 1204 1205 1210 1212 1238 1252 1253 1259 1277 1292 1306 1311 1313 1323 1356 1357

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

phpDocumentor Guide to Creating Fantastic Documentation


What makes good documentation? This is unanswerable, but there are a few things to keep in mind

Why write good documentation for open source code?


Writing good documentation is essential to the success of any software project. The quality of documentation can be even more important than the quality of the code itself, as a good first impression will prompt developers to look further into your code. phpDocumentor is designed to make it easier to create documentation. phpDocumentor even makes it possible to generate separate sets of documentation from the same source!

Writing Great Documentation


Consider the audience
The first question any writer must ask is "Who is my audience?" This will answer many questions. For most software, such as any MS product, the software is intended only to be used. The programmers are the only people who have access to the source code. The challenge in this case is to write good documentation for end-users.

When writing documentation for an open-source project intending to be both used and extended, this challenge is magnified by the fact that many people will also intend to extend the source, or even find obscure bugs and fix them. These two audiences tend to be opposed to each other in their needs.

An end-user generally wants: Instruction-style writing, that explains and describes general concepts more than how a particular variable is used Interface information only, no low-level details Examples of how to use, and tutorials Whereas a programmer may want in addition: Details on how program elements interact, which elements use others Where in the source code an action or series of actions occurs How to extend the code to add new functionality

These two kinds of users can not be serviced by just API documentation or just tutorials, but a subtle blend of the two.

Using phpDocumentor to make documentation for two separate audiences


In essence, there may need to be two separate sets of documentation! phpDocumentor can be used to create this

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1 of 1382

option using a few things. First, using the command-line file-selection options, one can write two sets of documentation, one for end-users, and the other for programmers, and put them in different subdirectories. For instance, one could put enduser docs in "enduser/tutorials" and programmer docs in "programmer/tutorials." In addition, using the @access tag, one can mark programmer-level elements with @access private, and they will be ignored by default. The @internal tag and inline {@internal}} inline tag construct can be used to mark documentation that is low-level or internal to a smaller audience of developers. When creating programmer documentation, turn on the parse private option (see -pp, --parseprivate), and the low-level detail will be generated.

More important, the in-code documents in your DocBlocks must be written for both end-users and programmers wherever possible.

phpDocumentor uses the chaining feature of tutorials to link together related documentation like chapters in a book, and this is another way to organize documentation. Experiment, and find what's best for your project's needs.

Tips on Revising
There are many ways of creating good documentation, but perhaps the best is to read what you have written from different perspectives. Open up your documentation, and try to use it to figure out your software project. If this is difficult, go back and edit or rewrite. Remove anything that is confusing or unnecessary, make sure everything is there that is needed, and then when it seems good, ask a php user that doesn't know your project, or even a nonprogrammer to read it and use their reactions to tailor the documentation.

Conclusion
The use of phpDocumentor will definitely improve the look and feel of your documentation, but don't stop there, let it help you to create truly dynamic documents that are easily maintained and kept up-to-date. After all, great docs for great programs will help to secure PHP's rightful throne as the best out there!

References for learning how to use phpDocumentor


phpDocumentor Quickstart

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 2 of 1382

phpDocumentor Quickstart
phpDocumentor for newbies

What is phpDocumentor? What can it do?


phpDocumentor is a tool written in PHP designed to create complete documentation directly from both PHP code and external documentation. The truth is, PHP source code is so lucid, it can practically serve as its own documentation. phpDocumentor taps into this fact by parsing out all kinds of logical structures already found in PHP, such as files, classes, functions, define constants, global variables, and class variables/methods and organizes them into a traditional manual format. In addition, new with version 1.3.0, source code elements introduced in PHP 5 (class constants, interfaces, and others) can also be parsed, if phpDocumentor is run through PHP 5. Output can be created for remote web browsing, print, and integration into IDE help systems through converters for HTML, PDF, and CHM (windows help files).

phpDocumentor generates manual-format documentation by reading it from special PHP comments called DocBlocks. DocBlocks are where you as the author of a software project should document helpful information that can be used by others (or your future self) to determine how to use and extend your PHP package.

Although the ability to add succinct documentation in the source code is essential, it cannot replace the importance of verbose documentation that is not in the source code, such as a user manual, or tutorials such as the one you are reading now. If the text you see here were placed in the source code for phpDocumentor, it would serve little useful purpose, clutter up the code, and be difficult to locate. However, the ability to hyperlink between documentation in the source code and external documentation is essential. External documentation for function foo must be able to reference the generated in-code documentation, and with phpDocumentor this is finally possible. To learn more, read about phpDocumentor Tutorials.

Installation
There are two official installation methods for phpDocumentor. The first is through downloading and extracting one of the available archives downloadable through pear.php.net and sourceforge.net, and the other is through the PEAR installer. There is planning for a Phing task and for distribution through other new and promising installation frameworks like the ZZ/OSS installer. However, only the two official installation methods are supported by phpDocumentor's developers.

Download from Pear.Php.net or Sourceforge.net


To install phpDocumentor from a .zip or tarball downloaded directly from pear.php.net or

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 3 of 1382

sourceforge.net, first determine whether you will be using phpDocumentor's web or command-line interface (see the Basic usage of phpDocumentor tool section for help in making this decision).

If you wish to use the command-line interface, unzip the archive into any directory, say /home/myuser/phpdoc or C:\Program Files\phpdoc, and add that directory to your path statement. To use, run the "phpdoc" command. In windows, you will need to edit the phpdoc.bat file, and change the first line to the path of the CLI version of PHP (usually C:\php4\cli\php.exe by default).

To use the web interface, you must have a web server such as Apache installed, and must have a working PHP sapi for that webserver. To test, save the code below as phpinfo.php in your document root and browse to http://localhost/phpinfo.php

phpinfo.php: 1 2 3 <?php phpinfo(); ?>

If you see a beautiful purple display of PHP information, then your PHP setup is working. To use phpDocumentor's web interface, simply unzip the archive into a subdirectory of your document root (such as phpdoc) and browse to that location (http://localhost/phpdoc).

Caution A Javascript-enabled browser such as Netscape, Mozilla, Internet Explorer, Opera, or Konqueror is required to view the newer web interface. If you wish to use a non-javascript browser such as links/lynx, use the old web interface, phpdoc.php at http://localhost/phpdoc/phpdoc.php.

Installation through PEAR


To install phpDocumentor through PEAR, you must first have a working installation of PEAR. Instructions for properly installing PEAR are located at the official PEAR website, http://pear.php.net. phpDocumentor developers do not support installation issues with PEAR, instead seek help from PEAR developers.

Installing phpDocumentor for use on the command-line is simple. Simply run: $ pear install PhpDocumentor and you then have full access to the phpdoc command, both in windows and unix, without further configuration.

To install phpDocumentor to use the web interface, you must first change one of PEAR's configuration variables, data_dir, to be a sub-directory of your web server's document root. The simplest way to do this is through PEAR's command-line interface with the command: $ pear config-set data_dir /path/to/document_root/pear

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 4 of 1382

Configuring this value through the web interface is also simple. Click on the configuration icon in the left-hand frame, and type in the path in the data_dir text box.

Once this configuration is complete, simply install phpDocumentor as described in the second paragraph above, and you can then browse to http://localhost/pear/PhpDocumentor to have access to the web interface. Once this configuration step has been taken, there is never any need to change, and you can easily upgrade to future phpDocumentor versions by using pear's upgrade command.

How to document your code for use with phpDocumentor


Documenting your code projects is straightforward and intuitive for the most part. Before you begin, you may wish to download the sample documentation project and try running phpDocumentor on them as you read along, found at Source code for sample1.php, Source code for sample2.php, Source code for sample3.php or found bundled in the tutorials/ directory of your phpDocumentor distribution. Before parsing, copy the examples to another directory.

First of all, run phpDocumentor on the blank file sample1.php. If you are using the command-line interface, run this command from the tutorials/sample directory:

$ phpdoc -o HTML:frames:earthli -f sample1.php -t docs

If you are using the web interface, click the "Files" tab, and type in the full path to tutorials/sample/sample1.php. Then click the "Output" tab and type in the full path to tutorials/sample/docs, and finally click the "Create" button in the lower right-hand corner.

With a web browser, open the newly created tutorials/sample/docs/index.html file and you will see the rich array of information that phpDocumentor can parse from the source code even without any documentation comments. Inheritance information, polymorphism and constants are all recognized automatically. Note that the only element that is not automatically documented is the global variable - to do this, you must use a phpDocumentor DocBlock as described in the next section of this quickstart manual. Also note that although the include_once specifies a file within the include_path, phpDocumentor will not automatically parse sample2.php, you must manually specify the files or directories to parse.

If you're feeling adventurous, experiment with the parse options available and parse the sample files a few times to see how they affect the documentation output. To find out options in the command-line interface, type $ phpdoc -h

Documenting your PHP source code with comments


Now open sample2.php. This is the same code content as sample1.php, but it contains a full array of phpDocumentor DocBlock comments.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 5 of 1382

Note that every DocBlock comment is a C-style comment with two leading asterisks (*), like so:

1 2 3

/** * */

All other comments are ignored by the documentation parser. Note that although most of the documentation is plain English, there are a few "@" characters floating around the source code. This symbol is used to pass a special command to the parser, and is called a tag. If the symbol is at the beginning of a line, it is a standard tag, and if it is enclosed in {curly brackets}, it is an inline tag. You can read more about tags at phpDocumentor tags and phpDocumentor Inline tags.

1 2 3 4 5 6

/** * {@inlinetag} * this is @not a standardtag - must begin a line. * this is a valid {@inlinetag} also * @standardtag */

Documenting global variables


Notice this code from sample2.php:

1 2 3 4 5 6

/** * Special global variable declaration DocBlock * @global integer $GLOBALS['_myvar'] * @name $_myvar */ $GLOBALS '_myvar'] = 6; [

In this segment, we can see the two important tags used for documenting global variables. The @global tag is used to tell the parser how to find a global variable declaration. Without this tag, no documentation would be generated for $_myvar. The @global tag can take many forms - be sure to specify the type and global name, with no description, or the parser will generate a warning and fail to document the variable.

Now, parse sample3.php and observe the generated documentation. The @name tag is used to tell the parser how the global variable would be referenced by a global statement in a function.

1 2 3 4 5 6

/** * @global integer this is a function-based @global tag, * because the variable name is missing */ function someFunction() {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 6 of 1382

7 8

global$_myvar ; }

The @global tag here will associate the information with the declared global statements in the function body in the same order of their declaration.

Page-level DocBlock warnings


The single most commonly asked question about using phpDocumentor involves warnings about Page-level DocBlocks. This section will answer any questions about this warning once and for all.

phpDocumentor organizes procedural elements and classes into special groupings called packages. In earlier versions of phpDocumentor, if package was not specified explicitly using the @package tag, the program would make an educated guess as to which package a source element belongs to.

Over time, it became apparent that in many cases, source elements were incorrectly grouped into a package due to the guesswork phpDocumentor uses. Finally, the decision was made to require an explicit @package tag, and to raise a warning any time this tag was missing from a top-level source element.

The greatest confusion comes from the documenting of files. phpDocumentor documents all source elements by reading the DocBlock that immediately precedes the element, like so:

1 2 3 4 5 6 7 8

<?php /** * Documents the class following * @package SomePackage */ class SomeClass { } ?>

phpDocumentor also can document the contents of a file. But how can a DocBlock immediately precede the file that contains it? The easy answer is to assume the first DocBlock in a file documents the file that contains it, and this works well, but can be deceptive:

1 2 3 4 5 6 7 8

<?php /** * Documents the class following or the file? * @package SomePackage */ class SomeClass { } ?>

The same example shows the ambiguity - does this DocBlock document the class, or the file? To resolve this ambiguity, phpDocumentor uses a simple algorithm to make its decision.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 7 of 1382

1.

If the first DocBlock in a file contains a @package tag, it documents the file unless it precedes a class declaration If the first DocBlock in a file precedes another DocBlock, it documents the file

Writing external documentation and linking to source code documentation


Although documentation parsed directly from source code is tremendously useful, it cannot stand on its own. In addition, truly useful in-code documentation must be succinct enough so that the code is not completely obscured by the documentation. External documentation is a must for a complete documentation solution. However, external documentation must be able to link to API source documentation to be useful. With a constantly changing API documentation, it is very easy for external documentation to become out of date. In addition, external documentation must be in a format that can be converted into other formats such as HTML, PDF and XML.

phpDocumentor provides a simple and elegant solution to all of these problems. External documentation in DocBook format can be easily converted to other formats. Using inline tags, phpDocumentor can generate a consistent manual in many different formats by combining the output from parsing the source and parsing external documentation. The words you read at this moment are in a DocBook-based file located in tutorials/phpDocumentor/phpDocumentor.quickstart.pkg

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

<refentry id=" {@id}" > <refnamediv> <refname> Simple Tutorial</refname> <refpurpose> The simplest Tutorial Possible</refpurpose> </refnamediv> <refsynopsisdiv> <author> Gregory Beaver <authorblurb> {@link mailto:[email protected] [email protected]} </authorblurb> </author> </refsynopsisdiv> <refsect1 id=" {@id intro}" > <para> Hello World</para> </refsect1> </refentry>

Basic usage of phpDocumentor tool


Now that phpDocumentor is installed, how can you use it to document a project? First, you must understand how phpDocumentor divides your code into packages and subpackages. If you haven't already, now would be a good time to read the How to document your code for use with phpDocumentor section of this quickstart.

Command-line tool, phpdoc

docbuilder, the phpDocumentor web interface

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 8 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 9 of 1382

Source code for sample1.php


phpDocumentor for newbies tutorial

sample1.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 <?php // sample file #1 include_once 'sample2.php'; $GLOBALS '_myvar'] = 6; [ define('testing', 6); define('anotherconstant', strlen('hello')); function firstFunc($param1, $param2 = 'optional') { static$staticvar= 7; global$_myvar ; return$staticvar ; } class myclass { var $firstvar= 6; var $secondvar= array( 'stuff' => array( 6, 17, 'armadillo' ), testing => anotherconstant ); function myclass() { $this -> firstvar= }

7;

function parentfunc($paramie ) { if ($paramie { ) return 6; } else { returnnew babyclass; } } } class babyclass extends myclass { var $secondvar= 42;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 10 of 1382

48 49 50 51 52 53 54 55 56 57 58 59 60 61

var $thirdvar ; function babyclass() { parent::myclass(); $this -> firstvar +; + } function parentfunc($paramie ) { returnnew myclass; } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 11 of 1382

Source code for sample2.php


phpDocumentor for newbies tutorial

sample2.php
1 <?php 2 /** 3 * Sample File 2, phpDocumentor Quickstart 4 * 5 * This file demonstrates the rich information that can be included in 6 * in-code documentation through DocBlocks and tags. 7 * @author Greg Beaver <[email protected]> 8 * @version 1.0 9 * @package sample 10 */ 11 // sample file #1 12 /** 13 * Dummy include value, to demonstrate the parsing power of phpDocumentor 14 */ 15 include_once 'sample3.php'; 16 17 /** 18 * Special global variable declaration DocBlock 19 * @global integer $GLOBALS['_myvar'] 20 * @name $_myvar 21 */ 22 $GLOBALS '_myvar'] = 6; [ 23 24 /**#@+ 25 * Constants 26 */ 27 /** 28 * first constant 29 */ 30 define('testing', 6); 31 /** 32 * second constant 33 */ 34 define('anotherconstant', strlen('hello')); 35 36 /** 37 * A sample function docblock 38 * @global string document the fact that this function uses $_myvar 39 * @staticvar integer $staticvar is actually what is returned this 40 * @param string $param1name to declare 41 * @param string $param2value of the name 42 * @return integer 43 */ 44 function firstFunc($param1, $param2 = 'optional') 45 { 46 static$staticvar= 7; 47 global$_myvar ;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 12 of 1382

48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106

return$staticvar ; } /** * The first example class, this is in the same package as the * procedural stuff in the start of the file * @package sample * @subpackage classes */ class myclass { /** * A sample private variable, this can be hidden with the --parseprivate * option * @access private * @var integer|string */ var $firstvar= 6; /** * @link http://www.example.com Example link * @see myclass() * @uses testing, anotherconstant * @var array */ var $secondvar= array( 'stuff' => array( 6, 17, 'armadillo' ), testing => anotherconstant ); /** * Constructor sets up {@link $firstvar} */ function myclass() { $this -> firstvar= 7; } /** * Return a thingie based on $paramie * @param boolean $paramie * @return integer|babyclass */ function parentfunc($paramie ) { if ($paramie { ) return 6; } else { returnnew babyclass; } } } /** * @package sample1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 13 of 1382

107 */ 108 class babyclass extends myclass { 109 /** 110 * The answer to Life, the Universe and Everything 111 * @var integer 112 */ 113 var $secondvar= 42; 114 /** 115 * Configuration values 116 * @var array 117 */ 118 var $thirdvar ; 119 120 /** 121 * Calls parent constructor, then increments {@link $firstvar} 122 */ 123 function babyclass() 124 { 125 parent::myclass(); 126 $this -> firstvar +; + 127 } 128 129 /** 130 * This always returns a myclass 131 * @param ignored $paramie 132 * @return myclass 133 */ 134 function parentfunc($paramie ) 135 { 136 returnnew myclass; 137 } 138 } 139 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 14 of 1382

Source code for sample3.php


phpDocumentor for newbies tutorial

sample3.php
1 <?php 2 /** 3 * Sample File 3, phpDocumentor Quickstart 4 * 5 * This file demonstrates the use of the @name tag 6 * @author Greg Beaver <[email protected]> 7 * @version 1.0 8 * @package sample 9 */ 10 /** 11 * Special global variable declaration DocBlock 12 * @global integer $GLOBALS['_myvar'] 13 */ 14 $GLOBALS '_myvar'] = 6; [ 15 /** 16 * Notice that the @name tag does not validate what you give it! 17 * @global string $GLOBALS['turkey'] 18 * @name $turkify 19 */ 20 $GLOBALS 'turkey'] = 'tester'; [ 21 /** 22 * Sample function @global usage 23 * 24 * Note that the $turkey variable is not linked to its documentation at 25 * {@link $turkify} because of the improper @name tag 26 * @global integer 27 * @global string this one has the optional description 28 */ 29 function testit() 30 { 31 global$_myvar $turkey , ; 32 } 33 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 15 of 1382

phpDocumentor Tutorial
An in-depth look at using phpDocumentor to document PHP Source Code, and phpDocumentor internals

Introduction
phpDocumentor is the most advanced automatic documentation system written for PHP, in PHP. This package has many features: NEW The first auto-documentor with PHP 5 support Extended documentation in docbook format with linking to any element and to other documentation, including sub-sections, from the source code (see phpDocumentor Tutorials) docblock templates to cut down on repetition XML:DocBook:peardoc2 templates for PEAR developers Greater ease of extending a Converter, see Converter Manual ability to parse any PHP file, regardless of documentation format conforms loosely to the JavaDOC protocol, and will be familiar to Java programmers documents all includes, constants, functions, static functions, classes, methods, static variables, class variables, and can document global variables and external tutorials auto-linking to pre-defined PHP functions Output in HTML, CHM, PDF, XML DocBook formats templateable with many bundled templates automatic linking to elements in any documented package documents name conflicts between packages to help avoid PHP errors document CVS repository directly. support for JavaDoc doclet-like output through Converters error/warning tracking system extreme class intelligence: inherits documentation, package complete phpdoc.de DocBlock tag support. Additions include @var, @magic, @deprec, @todo, and phpdoc.de parsing of @param. alphabetical indexing of all elements by package and overall class trees MUCH more than just this short list

phpDocumentor Basics
Starting Out From Scratch
The documentation process begins with the most basic element of phpDocumentor: a Documentation block or DocBlock. A basic DocBlock looks like this:

1 2 3

/** * */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 16 of 1382

A DocBlock is an extended C++-style PHP comment that begins with "/**" and has an "*" at the beginning of every line. DocBlocks precede the element they are documenting.

Caution Any line within a DocBlock that doesn't begin with a * will be ignored. To document function "foo()", place the DocBlock immediately before the function declaration:

1 2 3 4 5 6

/** * Defies imagination, extends boundaries and saves the world ...all before breakfast! */ function foo() { }

This example will apply the DocBlock to "define('me',2);" instead of to "function foo()": 1 2 3 4 5 6 7 8 9 /** * DocBlock for function foo? * * No, this will be for the constant me! */ define('me',2); function foo( param = me) $ { }

define() statements, functions, classes, class methods, and class vars, include() statements, and global variables can all be documented, see Elements of the source code that can be documented

DocBlocks
A DocBlock contains three basic segments in this order: Short Description Long Description Tags

The Short Description starts on the first line, and can be terminated with a blank line or a period. A period inside a word (like example.com or 0.1 %) is ignored. If the Short Description would become more than three lines long, only the first line is taken. The Long Description continues for as many lines as desired and may contain html markup for display formatting. Here is a sample DocBlock with a Short and a Long Description:

1 2

/** * return the date of Easter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 17 of 1382

3 4 5 6 7 8

* * Using the formula from "Formulas that are way too complicated for anyone to * ever understand except for me" by Irwin Nerdy, this function calculates the * date of Easter given a date in the Ancient Mayan Calendar, if you can also * guess the birthday of the author. */

Optionally, you may enclose all paragraphs in a <p></p> tag. Be careful, if the first paragraph does not begin with <p>, phpDocumentor will assume that the DocBlock is using the simple double linebreak to define paragraph breaks as in:

1 2 3 4 5 6 7 8 9 10

/** * Short desc * * Long description first sentence starts here * and continues on this line for a while * finally concluding here at the end of * this paragraph * * The blank line above denotes a paragraph break */

Here is an example of using <p>

1 2 3 4 5 6 7 8 9 10

/** * Short desc * * <p>Long description first sentence starts here * and continues on this line for a while * finally concluding here at the end of * this paragraph</p> * This text is completely ignored! it is not enclosed in p tags * <p>This is a new paragraph</p> */

phpDocumentor also supports JavaDoc's DocBlock format through the command-line option -j, --javadocdesc. Due to the non-xhtml compliant unmatched p tag, we highly recommend you avoid this syntax whenever possible

1 2 3 4 5 6 7 8 9 10 11 12

/** * <p> * Short desc is only to the first period. * This means a sentence like: * "Parses Mr./Mrs. out of $_GET." will * parse a short description of "Parses Mr." * which is rather silly. Long description is * the entire DocBlock description including the * Short desc, and paragraphs begin where p is like: * <p> * The p above denotes a paragraph break */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 18 of 1382

phpDocumentor will convert all whitespace into a single space in the long description, use paragraph breaks to define newlines, or <pre>, as discussed in the next section.

DocBlock Description details


As of phpDocumentor 1.2.0, the long and short description of a DocBlock is parsed for a few select html tags that determine additional formatting. Due to the nature of phpDocumentor's output as multiple-format, straight html is not allowed in a DocBlock, and will be converted into plain text by all of the converters unless it is one of these tags: <b> -- emphasize/bold text <code> -- Use this to surround php code, some converters will highlight it <br> -- hard line break, may be ignored by some converters <i> -- italicize/mark as important <kbd> -- denote keyboard input/screen display <li> -- list item <ol> -- ordered list <p> -- If used to enclose all paragraphs, otherwise it will be considered text <pre> -- Preserve line breaks and spacing, and assume all tags are text (like XML's CDATA) <samp> -- denote sample or examples (non-php) <ul> -- unordered list <var> -- denote a variable name Do not think of these tags as text, they are parsed into objects and converted into the appropriate output format by the converter. So, a b tag may become <emphasis> in DocBook, and a <p> tag might become " " (4 spaces) in the PDF converter! The text output is determined by the template options file options.ini found in the base directory of every template. For instance, the options.ini file for the HTML:frames:default template is in phpDocumentor/Converters/HTML/frames/templates/default/options.ini

For the rare case when the text "<b>" is needed in a DocBlock, use a double delimiter as in <<b>>. phpDocumentor will automatically translate that to the physical text "<b>".

Similarly, if you need an actual "@" in your DocBlock's description parts, you should be careful to either ensure it is not the first character on a line, or else escape it ("\@") to avoid it being interpreted as a PhpDocumentor tag marker.

1 2 3 4 5 6 7 8

/** * Demonstrate an @include file * line in a code block: * * <code> * \@include somefile.php * </code> */

This will parse as if it were:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 19 of 1382

1 2 3 4 5 6 7 8

/** * Demonstrate an @include file * line in a code block: * * <code> * @include somefile.php * </code> */

The <code>, <kbd>, and <pre> tags ignore any html listed above except for their own closing tags (</code> </kbd> </pre>). This is obviously necessary for each of those tag's behavior of controlling the appearance of the text inside their tag blocks, without allowing other nested tags (like <b>) interfering inside them. In general, other tags will allow other tags to be nested in them (i.e. <samp><b>bold_my_sample</b></samp>). New 1.2.0rc1: If you need to use the closing comment "*/" in a DocBlock, use the special escape sequence "{@*}." Here's an example:

1 2 3 4 5 6 7 8 9

/** * Simple DocBlock with a code example containing a docblock * * <code> * /** * * My sample DocBlock in code * {@*} * </code> */

This will parse as if it were:

1 2 3 4 5 6 7 7 8 9

/** * Simple DocBlock with a code example containing a docblock * * <code> * /** * * My sample DocBlock in code * */ * </ code> */

New 1.2.0rc1: The phpEdit tool supports very clever list extraction from DocBlocks, and now phpDocumentor supports the same cleverness. This example:

1 2 3 4 5 6

/** * Simple DocBlock with simple lists * * Here's a simple list: * - item 1 * - item 2, this one

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 20 of 1382

7 8 9 10 11 12 13 14 15

* is multi-line * - item 3 * end of list. Next list is ordered * 1 ordered item 1 * 2 ordered item 2 * end of list. This is also ordered: * 1. ordered item 1 * 2. ordered item 2 */

phpDocumentor recognizes any simple list that begins with "-", "+", "#" and "o", and any ordered list with sequential numbers or numbers followed by "." as above. The list delimiter must be followed by a space (not a tab!) and whitespace must line up exactly, or phpDocumentor will not recognize the list items as being in the same list.

1 2 3 4 5 6 7 8 9 10

/** * Simple DocBlock with screwy lists * * +not a list at all, no space * Here's 3 lists! * - item 1 * - item 2, this one * is multi-line *- item 3 */

Again, you must line up the list iterators in the same vertical column in order for those list items to be considered "on the same list". Also, you cannot create nested lists using the simple list iterators... doing so means it's no longer a "simple" list! Varying the spacing of the list iterators does not create nesting of the lists... it only starts up new simple lists. If you specifically need a nested list, you must use the list tags (<ol>, <ul>):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

/** * DocBlock with nested lists * * Here's the "complex" list: * <ul> * <li>outer item 1</li> * <li>outer item 2, this one * is multi-line</li> * <li>item 3 is a nested inner list * <ul> * <li>inner item 1</li> * <li>inner item 2</li> * </ul> * <li>outer item 4</li> * </ul> */

In some cases, the text description in a doc tag can contain a list, be it simple

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 21 of 1382

or complex. Notice that a title line is needed, with the list items themselves beginning on the next line:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

/** * DocBlock with nested lists * in the tag descriptions * @todo My Simple TODO List * - item 1 * - item 2 * - item 3 * @todo My Complex TODO List * <ol> * <li>item 1.0</li> * <li>item 2.0</li> * <li>item 3.0</li> * <ol> * <li>item 3.1</li> * <li>item 3.2</li> * </ol> * <li>item 4.0</li> * </ol> */

Tagged lists are always a more robust and predictable option for you to use. Simple lists are convenient, but if you find yourself trying to bend a simple list into displaying a certain way in your generated docs, you may be better served by switching to a tagged list instead.

For in-depth information on how phpDocumentor parses the description field, see ParserDescCleanup.inc

DocBlock Templates
New for version 1.2.0, phpDocumentor supports the use of DocBlock templates. The purpose of a DocBlock template is to reduce redundant typing. For instance, if a large number of class variables are private, one would use a DocBlock template to mark them as private. DocBlock templates simply augment any normal DocBlocks found in the template block.

A DocBlock template is distinguished from a normal DocBlock by its header. Here is the most basic DocBlock template:

1 2 3

/**#@+ * */

The text that marks this as a DocBlock template is "/**#@+" - all 6 characters must be present. DocBlock templates are applied to all documentable elements until the ending template marker:

/**#@-*/

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 22 of 1382

Note that all 8 characters must appear as "/**#@-*/" in order for phpDocumentor to recognize them as a template. Here is an example of a DocBlock template in action:

1 class Bob 2 { 3 // beginning of docblock template area 4 /**#@+ 5 * @access private 6 * @var string 7 */ 8 var $_var1 = 'hello'; 9 var $_var2 = 'my'; 10 var $_var3 = 'name'; 11 var $_var4 = 'is'; 12 var $_var5 = 'Bob'; 13 var $_var6 = 'and'; 14 var $_var7 = 'I'; 15 /** 16 * Two words 17 */ 18 var $_var8 = 'like strings'; 19 /**#@-*/ 20 var $publicvar= 'Lookee me!'; 21 }

This example will parse as if it were:

1 class Bob 2 { 3 // beginning of docblock template area 4 /** 5 * @access private 6 * @var string 7 */ 8 var $_var1 = 'hello'; 9 /** 10 * @access private 11 * @var string 12 */ 13 var $_var2 = 'my'; 14 /** 15 * @access private 16 * @var string 17 */ 18 var $_var3 = 'name'; 19 /** 20 * @access private 21 * @var string 22 */ 23 var $_var4 = 'is'; 24 /** 25 * @access private 26 * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 23 of 1382

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

*/ var $_var5 = 'Bob'; /** * @access private * @var string */ var $_var6 = 'and'; /** * @access private * @var string */ var $_var7 = 'I'; /** * Two words * @access private * @var string */ var $_var8 = 'like strings'; var $publicvar= 'Lookee me!'; }

Note that for $_var8 the DocBlock template merged with the DocBlock. The rules for merging are simple: The long description of the docblock template is added to the front of the long description. The short description is ignored. All tags are merged from the docblock template

Tags
Tags are single words prefixed by a "@" symbol. Tags inform phpDocumentor how to present information and modify display of documentation. All tags are optional, but if you use a tag, they do have specific requirements to parse properly.

A list of all possible tags in phpDocumentor follows:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

/** * The short description * * As many lines of extendend description as you want {@link element} * links to an element * {@link http://www.example.com Example hyperlink inline link} links to * a website. The inline * source tag displays function source code in the description: * {@source } * * In addition, in version 1.2+ one can link to extended documentation like this * documentation using {@tutorial phpDocumentor/phpDocumentor.howto.pkg} * In a method/class var, {@inheritdoc may be used to copy documentation from} * the parent method * {@internal * This paragraph explains very detailed information that will only * be of use to advanced developers, and can contain

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 24 of 1382

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

* {@link http://www.example.com Other inline links!} as well as text}}} * * Here are the tags: * * @abstract * @access public or private * @author author name <author@email> * @copyright name date * @deprecated description * @deprec alias for deprecated * @example /path/to/example * @exception Javadoc-compatible, use as needed * @global type $globalvarname or * @global type description of global variable usage in a function * @ignore * @internal private information for advanced developers only * @param type [$varname] description * @return type description * @link URL * @name procpagealias or * @name $globalvaralias * @magic phpdoc.de compatibility * @package package name * @see name of another element that can be documented, * produces a link to it in the documentation * @since a version or a date * @static * @staticvar type description of static variable usage in a function * @subpackage sub package name, groupings inside of a project * @throws Javadoc-compatible, use as needed * @todo phpdoc.de compatibility * @var type a data type for a class variable * @version version */ function if_there_is_an_inline_source_tag_this_must_be_a_function() { // ... }

In addition, tutorials allow two addition inline tags: {@id}, used to allow direct linking to sections in a tutorial, and {@toc}, used to generate a table of contents from {@id}s in the file. Think of {@id} like an <a name="idname"> HTML tag, it serves the same function.

See inline {@id} and inline {@toc} for detailed information

In the example below, {@id} is used to name the refsect1 "mysection" and the refsect2 "mysection.mysubsection" - note that the sub-sections inherit the parent section's id.

Example:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 25 of 1382

role = "xml"<refentry id="{@id}"> <refsect1 id="{@id mysection}"> <refsect2 id="{@id mysubsection}"> </refsect2> </refsect1> </refentry>

For an in-depth look at phpDocumentor tags, read phpDocumentor tags, and for an in-depth look at inline tags, read phpDocumentor Inline tags.

Documenting your PHP project


Where to begin
Before you begin documenting your PHP project, you might want to try a test run on your undocumented source code to see what kind of information phpDocumentor will automatically extract from the source code. phpDocumentor is designed to make the task of documenting minimally redundant. This means less work, and better, up-to-date documentation with less effort than it used to take.

Caution phpDocumentor is a great tool, but it will not write good documentation for you. Please read the phpDocumentor Guide to Creating Fantastic Documentation

Elements of the source code that can be documented


Dividing projects into packages
To understand the role of packages and how to use @package, it is important to know the logic behind packaging in PHP. The quest for structured programming led to the invention of functions, then classes, and finally packages. Traditionally, a re-usable software module was a collection of variables, constants and functions that could be used by another software package. PHP is an example of this model, as their are many extensions that consist of constants and functions like the tokenizer extension. One can think of the tokenizer extension as a package: it is a complete set of data, variables and functions that can be used in other programs. A more structured format of this model is of course objects, or classes. A class contains variables and functions (but no constants in PHP). A single class packages together related functions and variables to be re-used.

phpDocumentor defines package in two ways:

1.

2.

Functions, Constants and Global Variables are grouped into files (by the filesystem), which are in turn grouped into packages using the @package tag in a page-level DocBlock Methods and Class Variables are grouped into classes (by PH),

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 26 of 1382

which are in turn grouped into packages in a Class DocBlock These two definitions of package are exclusive. In other words, it is possible to have classes of a different package of the file that contains it! Here's an example:

Caution It may be possible, but don't put classes into a different package from the file they reside in, that will be very confusing and unnecessary. This behavior is deprecated, in version 2.0, phpDocumentor will halt parsing upon this condition. 1 <?php 2 /** 3 * Pretend this is a file 4 * 5 * Page-level DocBlock is here because it is the first DocBlock 6 * in the file, and is immediately followed by the second 7 * DocBlock before any documentable element is declared 8 * (function, define, class, global variable, include) 9 * @package pagepackage 10 */ 11 /** 12 * Here is the class DocBlock 13 * 14 * The class package is different from the page package! 15 * @package classpackage 16 */ 17 class myclass 18 { 19 } 20 ?>

For more information on page-level versus class-level packaging, see Procedural Elements

Perhaps the best way to organize packages is to put all procedural code into separate files from classes. PEAR recommends putting every class into a separate file. For small, utility classes, this may not be the best solution for all cases, but it is still best to separate packages into different files for consistency.

Advanced phpDocumentor: tutorials and extended Documentation


phpDocumentor developers have received a number of requests to allow linking to external documentation, and to sections of that documentation. If phpDocumentor only could create HTML documents, this would be a simple task, but the presence of PDF and now XML converters as well as future possibilities complicates this question tremendously. What is the solution?

Give phpDocumentor the ability to parse external documentation in a common format and then convert it to the appropriate format for each converter. The implementation of this solution in version 1.2.0 is very versatile. Making use of the standard DocBook XML format, external documentation can be designed and then reformatted for any output. No longer is external documentation tied down to one "look." Here's a short

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 27 of 1382

list of the benefits of this approach:

Benefits of using DocBook as the format: DocBook is very similar to HTML at the basic level and very easy to learn. Each template has its own options.ini file which determines how the DocBook tags will be translated into the output language - no need to learn xslt. Adding in xslt support will be very easy to allow for future customization Benefits of integrating tutorials/external documentation into phpDocumentor: Linking to external documentation from within API docs is possible Linking to API docs from external documentation is also possible Customizable table of contents, both of all tutorials and within a tutorial via inline {@toc} It is possible to create User-level documentation that has direct access to Programmer-level documentation

User-level documentation generally consists of tutorials and information on how to use a package, and avoids extreme detail. On the other hand, programmer-level documentation has all the details a programmer needs to extend and modify a package. phpDocumentor has been assisting the creation of programmer-level documentation since its inception. With the addition of tutorials, it can now ease the creation of user-level documentation.

For an in-depth look at how to use tutorials, read phpDocumentor Tutorials

Running phpDocumentor
There are two bundled ways of invoking phpDocumentor, the command-line phpdoc, or the web interface phpdoc.php/new_phpdoc.php.

Using the new Web Interface docbuilder


The new web interface requires a working installation of PHP with a web server, and must be accessible from the document root. Docbuilder is the creation of Andrew Eddies, and it combines some slick formatting with the functionality of the old web interface. The docbuilder interface can be accessed via index.html in the install directory of phpDocumentor, or the docbuilder subdirectory.

Using the old Web Interface phpdoc.php new_phpdoc.php or


In order to use the web interface, there are a number of factors that must be set up before anything else can occur. First, you need a working web server with php (it had to be said). This manual will not assist with that setup. Next, the phpdoc.php or new_phpdoc.php file needs to be accessible by the webserver. In unix, place a symbolic link using ln -s to the desired interface into the public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 28 of 1382

html directory.

Caution Security is always an issue with the internet. Do not place phpDocumentor into the web server publicly available path on a server connected to the internet. Make sure that phpDocumentor will not have the power to overwrite ANY system or user files. Note that since the webserver runs as user nobody in unix, the generated files will be owned by nobody. The only way to change this is to either run phpDocumentor from the command-line or to add a chuser wrapper around httpd. We do not recommend using a chuser wrapper or running phpDocumentor as root. It is much easier and safer to use a config file (see phpDocumentor's dynamic User-defined config files) from the command line.

Using the Command-line tool


Running the command-line in MS Windows
Running phpDocumentor from the command-line is fairly straightforward, even in windows. It is recommended to use the web interface in windows, from a non-publicly accessible server root, as none of the permissions issues exist that exist in unix. However, to use phpDocumentor from the command line is possible. First, put the location of php into the system path, then type:

C:\>php-cli C:\path\to\phpdoc\phpdoc [commandline]

An alternative is to edit the phpdoc.bat file, and place phpdoc in the path, then you can run phpdoc as a normal command.

Running the command-line in unix


Running the command-line tool phpdoc is very easy in unix:

.\phpdoc [commandline]

-c, --config
Use this option to load a config file (see phpDocumentor's dynamic User-defined config files)

"phpdoc -c default" will load the default.ini file

-cp, --converterparams
This option is only used to pass dynamic parameters to extended converters. The options passed should be separated by commas, and are placed in the global variable $_phpDocumentor_setting['converterparams'], an array. It is the responsibility of the Converter to access this variable, the code included with phpDocumentor does nothing with it.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 29 of 1382

-ct, --customtags
Use this option to specify tags that should be included in the list of valid tags for the current run of phpdoc

"phpdoc -ct mytag,anothertag" will tell phpDocumentor to parse this DocBlock:

1 2 3 4

/** * @mytag this is my tag * @anothertag this is another tag */

without raising any errors, and include the tags in the known tags list for the template to handle. Note that in version 1.2.0+, the unknown_tags array is passed to templates.

-dh, --hidden
Use this option to tell phpDocumentor to parse files and directories that begin with a period (.)

-dc, --defaultcategoryname
This will tell phpDocumentor to group any uncategorized elements into the primary categoryname. If not specified, the primary category is "default." The category should be specified using the @category tag.

1 2 3 4 5 6 7 8

/** * This package has no category and will be grouped into the default * category unless -dc categoryname is used * @package mypackage */ class nocategory { }

-dn, --defaultpackagename
Use this option to tell phpDocumentor what the primary package's name is. This will also tell phpDocumentor to group any unpackaged elements into the primary packagename. If not specified, the primary package is "default"

1 2 3 4 5 6 7

/** * This class has no package and will be grouped into the default * package unless -dn packagename is used */ class nopackage { }

-d, --directory
This or the -f option must be present, either on the command-line or in the config file.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 30 of 1382

Unlike -f, -d does not accept wildcards. Use -d to specify full paths or relative paths to the current directory that phpDocumentor should recursively search for documentable files. phpDocumentor will search through all subdirectories of any directory in the command-line list for tutorials/ and any files that have valid .php extensions as defined in phpDocumentor.ini. For example:

"phpdoc -d relative/path/to/dir1,/fullpath/to/here,.."

-ed, --examplesdir
The -ed option is used to specify the full path to a directory that example files are located in. This commandline setting affects the output of the @example tag.

"phpdoc -ed /fullpath/to/examples"

-f, --filename
This or the -d option must be present, either on the command-line or in the config file.

This option is used to specify individual files or expressions with wildcards * and ?. Use * to match any string, and ? to match any single character. phpdoc -f m*.p* will match myfile.php, mary_who.isthat.phtml, etc. phpdoc -f /path/m* will match /path/my/files/here.php, /path/mommy.php /path/mucho/grande/what.doc, etc. phpdoc -f file?.php will match file1.php, file2.php and will not match file10.php

-i, --ignore
Use the -i option to exclude files and directories from parsing. The -i option recognizes the * and ? wildcards, like -f does. In addition, it is possible to ignore a subdirectory of any directory using "dirname/". phpdoc -i tests/ will ignore /path/to/here/tests/* and /path/tests/* phpdoc -i *.inc will ignore all .inc files phpdoc -i *path/to/* will ignore /path/path/to/my/* as well as /path/to/* phpdoc -i *test* will ignore /path/tests/* and /path/here/my_test.php

Since v1.3.2, the value or pattern you provide will be case-sensitive (OS permitting, anyway), and will be applied relative to the top-level directory in the -d argument. phpdoc -i CVS/ will ignore /path/to/CVS/* but will not ignore /path/to/cvs phpdoc -d /home/myhome/cvs/myproject -i cvs/ will ignore /home/myhome/cvs/myproject/files/cvs/* but will not ignore /home/myhome/cvs/*

-is, --ignoresymlinks
Use the -is option to explicitly ignore any symlinks, whether they be links to directories or links to files.

This only works on a Unix/Linux environment, since Windows doesn't have symlinks.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 31 of 1382

-it, --ignore-tags
Use the -it option to exclude specific tags from output. This is used for creating multiple sets of documentation for different audiences. For instance, to generate documentation for end-users, it may not be desired to output all @todo tags, so --ignore-tags @todo would be used. To ignore inline tags, surround them with brackets {} like --ignore-tags {@internal}.

--ignore-tags will not ignore the core tags @global, @access, @package, @ignore, @name, @param, @return, @staticvar or @var.

Caution The --ignore-tags option requires a full tag name like --ignore-tags @todo. --ignore-tags todo will not work.

-j, --javadocdesc
Use this command-line option to enforce strict compliance with JavaDoc. JavaDoc DocBlocks are much less flexible than phpDocumentor's DocBlocks (see DocBlocks for information).

-o, --output
Use this required option to tell phpDocumentor which Converters and templates to use. In this release, there are several choices: HTML:frames:* - output is HTML with frames. HTML:frames:default - JavaDoc-like template, very plain, minimal formatting HTML:frames:earthli - BEAUTIFUL template written by Marco von Ballmoos HTML:frames:l0l33t - Stylish template HTML:frames:phpdoc.de - Similar to phpdoc.de's PHPDoc output HTML:frames:phphtmllib - Very nice user-contributed template all of the templates listed above are also available with javascripted expandable indexes, as HTML:frames:DOM/name where name is default, l0l33t, phpdoc.de, etcetera HTML:frames:phpedit - Based on output from PHPEdit Help Generator HTML:Smarty:* - output is HTML with no frames. HTML:Smarty:default - Bold template design using css to control layout HTML:Smarty:HandS - Layout is based on PHP, but more refined, with logo image HTML:Smarty:PHP - Layout is identical to the PHP website CHM:default:* - output is CHM, compiled help file format (Windows help). CHM:default:default - Windows help file, based on HTML:frames:l0l33t PDF:default:* - output is PDF, Adobe Acrobat format PDF:default:default - standard, plain PDF formatting XML:DocBook:* - output is XML, in DocBook format XML:DocBook/peardoc2:default - documentation ready for compiling into peardoc for online pear.php.net documentation, 2nd revision

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 32 of 1382

In 1.2.0+, it is possible to generate output for several converters and/or templates at once. Simply specify a comma-delimited list of output:converter:template like:

phpdoc -o HTML:frames:default,HTML:Smarty:PHP,HTML:frames:phpedit,PDF:default:default -t ./docs -d .

-pp, --parseprivate
By default, phpDocumentor does not create documentation for any elements marked @access private. This allows creation of end-user API docs that filter out low-level information that will not be useful to most developers using your code. To create complete documentation of all elements, use this command-line option to turn on parsing of elements marked private with @access private.

-po, --packageoutput
Use this option to remove all elements grouped by @package tags in a comma-delimited list from output. This option is useful for projects that are not organized into separate files for each package. Parsing speed is not affected by this option, use -i, --ignore whenever possible instead of --packageoutput.

phpdoc -o HTML:frames:default -t ./docs -d . -po mypackage,thatotherpackage will only display documentation for elements marked with "@package mypackage" or "@package thatotherpackage"

-p, --pear
Use this option to parse a PEAR-style repository. phpDocumentor will do several "smart" things to make life easier: PEAR-style destructors are automatically parsed If no @package tag is present in a file or class DocBlock, it will guess the package based on subdirectory If a variable or method name begins with "_", it will be assumed to be @access private, unless an @access tag is present. Constructors are also assumed to be @access private in the current version. Warnings will be raised for every case above, as @package should always be explicit, as should @access private. We do not like to assume that phpDocumentor knows better than you what to do with your code, and so will always require explicit usage or raise warnings if phpDocumentor does make any assumptions.

-q, --quiet
This option tells phpDocumentor to suppress output of parsing/conversion information to the console. Use this for cron jobs or other situations where human intervention will not be needed.

-ric, --readmeinstallchangelog
This comma-separated list of files specifies files that should be parsed and included in the documentation. phpDocumentor will automatically grab files listed here if and only if they are located in the top-level directory that is parsed. In other words, if you parse these files: /path/to/files/file1.php /path/to/files/file2.php /path/to/files/README /path/to/files/subdir/file2.php /path/to/files/subdir/README

-s, --sourcecode

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 33 of 1382

This option tells phpDocumentor to generate highlighted cross-referenced source code for every file parsed. The highlighting code is somewhat unstable, so use this option at your own risk.

-t, --target
Use this to tell phpDocumentor where to put generated documentation. Legal values are paths that phpDocumentor will have write access and directory creation priveleges.

-tb, --templatebase
-tb accepts a single pathname as its parameter. The default value of -tb if unspecified is <phpDocumentor install directory>/phpDocumentor. This raises a very important point to understand. The -tb command-line is designed to tell phpDocumentor to look for all templates for all converters in subdirectories of the path specified. By default, templates are located in a special subdirectory structure.

For the hypothetical outputformat:convertername:templatename -o, --output argument, the directory structure is Converters/outputformat/convertname/templates/templatename/. The class file for convertname should be in the convertname/templates directly, right beside your templatename directory/ies. In addition, Smarty expects to find two subdirectories, templates/ (containing the Smarty template files) and templates_c/ (which will contain the compiled template files).

"phpdoc -tb ~/phpdoctemplates -o HTML:frames:default" will only work if the directory ~/phpdoctemplates/Converters/HTML/frames/default/templates contains all the template files, and ~/phpdoctemplates/Converters/HTML/frames/default/templates_c exists.

-ti, --title
Set the global title of the generated documentation

-ue, --undocumentedelements
This option tells phpDocumentor whether or not to suppress warnings about certain objects (classes, methods) that are not documented via a DocBlock comment. Use this to help identify objects that you still need to write documentation for.

phpDocumentor's dynamic User-defined config files


The new -c, --config command-line options heralds a new era of ease in using phpDocumentor. What used to require:

phpdoc -t /path/to/output -d path/to/directory1,/another/path,/third/path\ -f /path/to/anotherfile.php -i *test.php,tests/ -pp on -ti My Title -o HTML:frames:phpedit

Can now be done in a single stroke!

phpdoc -c myconfig

What makes this all possible is the use of config files that contain all of the command-line information. There are two configuration files included in the distribution of phpDocumentor, and both are in the user/ subdirectory. To use a configuration file "myconfig.ini," simply place it in the user directory, and the command-line "phpdoc -c myconfig" will tell phpDocumentor to read all the command-line settings from

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 34 of 1382

that config file. Configuration files may also be placed in another directory, just specify the full path to the configuration file:

phpdoc -c /full/path/to/myconfig.ini

The best way to ensure your config file matches the format expected by phpDocumentor is to copy the default.ini config file, and modify it to match your needs. Lines that begin with a semi-colon (;) are ignored, and can be used for comments.

Be sure to put in your config file all the runtime options you need, because all other command-line arguments are ignored if you use a config file.

phpDocumentor.ini - global configuration options


The phpDocumentor.ini file contains several useful options, most of which will never need to be changed. However, some are useful. The section [_phpDocumentor_options] contains several configuration settings that may be changed to enhance output documentation. For Program Location, the relative path is specified as Program_Root/relativepath/to/file. The prefix "Program_Root" may be changed to any text, including none at all, or "Include ", etc. The [_phpDocumentor_setting] section can be used to specify a config file that should be used by default, so phpDocumentor may be run without any command-line arguments whatsoever! The [_phpDocumentor_phpfile_exts] section tells phpDocumentor which file extensions are php files, add any non-standard extensions, such as "class" to this section.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 35 of 1382

Documentable PHP Elements


Elements of PHP source that phpDocumentor can automatically document
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

Introduction to Documentable Elements


phpDocumentor is capable of automatically documenting include statements, define statements, functions, procedural pages, classes, class variables, and class methods.

Procedural Elements
From phpDocumentor's perspective, the basic container for procedural elements (as in real life) is the file that contains them. To reflect this, it is possible to document information about the entire contents of a file. This is accomplished through the use of a page-level DocBlock (see DocBlocks for basic information on what a DocBlock is). A page-level DocBlock is the only DocBlock that cannot precede the element that it is documenting, as there is no way to precede a file. To solve this issue, the way phpDocumentor finds a page-level DocBlock is to parse the first DocBlock in a file as the page-level DocBlock, with certain conditions.

1 2 3 4 5 6

<?php /** * Page-level DocBlock */ define('oops','Page-level DocBlock it is not!'); ?>

This last example has one DocBlock, and it is the first DocBlock in a file, but it is not a Page-level DocBlock. How can phpDocumentor tell the difference between a Page-level DocBlock and any other DocBlock? Simple:

1 <?php 2 /** 3 * Pretend this is a file 4 * 5 * Page-level DocBlock is here because it is the first DocBlock 6 * in the file, and contains a @package tag 7 * @package pagepackage 8 */ 9 define("almost" ,"Now the Page-level DocBlock is for the page, and the Define has no docblock" );?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 36 of 1382

In phpDocumentor version 1.2.2, a Page-level DocBlock is the first DocBlock in a file if it contains a @package tag. However, this example will raise a warning like WARNING in test.php on line 8: Pagelevel DocBlock precedes "define almost", use another DocBlock to document the source element. You can eliminate the warning by adding documentation to the define as follows:

1 <?php 2 /** 3 * Page-level DocBlock 4 * @package pagepackage 5 */ 6 /** 7 * Define DocBlock 8 */ 9 define("ahhhh" ,"Now the Page-level DocBlock is for the page, and the Define DocBlock for the define" ); 10 ?>

Now, the page has its documentation, and the define has its own documentation.

So, a DocBlock is a page-level DocBlock IF AND ONLY IF it is both:

1. 2. 3. 4.

The first DocBlock in a file One of: Contains a @package tag Immediately followed by another DocBlock for any documentable PHP element this is deprecated, always use a @package tag

A Page-level DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tags: @package @subpackage

Caution phpDocumentor will not document a file like the first example, there must be at least one documentable PHP element in the file.

include/require/include_once/require_once statements
phpDocumentor extracts the filename and attempts to link to documentation for that filename if possible. Include statements may only have any of the Standard phpDocumentor Tags

phpDocumentor will attempt to locate the included file in the list of files parsed, and if found will make a link to that file's documentation.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 37 of 1382

define statements
A define statement's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tag: @name

function declarations
A function's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tags: @global @param @return @staticvar inline {@source}

global variables
A global variable's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tag: @name In addition, the global variable's DocBlock must contain the @global tag.

Class Elements
A class's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tags: @package @subpackage @static

DocBlock inheritance
New in version 1.2.0, DocBlock's are inherited by child classes, variables, and methods. There are a few simple rules for inheritance: tags @author, @version, and @copyright are automatically inherited unless explicitly specified in the DocBlock As in previous versions, @package and @subpackage are inherited unless explicitly specified in the DocBlock. We recommend that you explicitly use @package and @subpackage for every class to avoid problems with name conflicts that may arise If there is no short description, the short description will be inherited. If there is no long description, the long description will be inherited. If there is a long description, and you still want to inherit the parent's description, use inline {@inheritdoc}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 38 of 1382

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

/** * short desc * * long desc * @package test * @author me * @version 1.0 * @abstract * @copyright never */ class parclass { } // inherits entire DocBlock minus @abstract class child1 extends parclass { } // inherits DocBlock minus @abtract, short desc /** * overriding short desc */ class child2 extends parclass { } // inherits @author, @version, @copyright, @package /** * overriding short desc * * overriding long desc */ class child3 extends parclass { } // inherits @version, @copyright, @package /** * overriding short desc * * overriding long desc * @author you */ class child4 extends parclass { }

class variables
A class variable's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tag: @var

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 39 of 1382

class methods
A method's DocBlock may have any of the standard phpDocumentor Tags (see Standard phpDocumentor Tags) plus the following tags: @global @param @return @static @staticvar inline {@source}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 40 of 1382

phpDocumentor Tutorials
Writing User-level documentation/tutorials with phpDocumentor

What are phpDocumentor-style tutorials/extended documentation?


New in version 1.2.0+, tutorials are the missing link in auto-documentation. We've had many requests from developers to be able to include links to external documentation, such as the reference of template tags for a template engine. The source code would be harder to read if this kind of information was spread along the 150-300 lines it would take to describe the usage. phpDocumentor Tutorials solve the problem of including external documentation by leveraging existing tried-and-true XML DocBook format and the power of phpDocumentor's inline tags (see phpDocumentor Inline tags). Now, it is possible to cross-reference between external documentation and generated API documentation through the versatile inline {@link}, inline {@tutorial}, and @tutorial tag.

How to write phpDocumentor-style tutorials/extended documentation


Tutorials may be written as any legal DocBook top-level tag (<book>, <chapter>, <article>, <refentry>), but it is highly recommended for any project that may become a part of PEAR to write with the <refentry> tag as the top-level, as this will automatically translate into peardoc2-ready tutorials. Other projects have no such constraint and may do anything they wish.

Inline Tags that may be used in tutorials


There are several inline tags that may be used in tutorials. The inline {@link} and inline {@tutorial} tags should be used in the same manner as in API source. Inline tags that are specific to tutorials include inline {@id} and inline {@toc}. Inline {@id} is used to mark areas in a similar manner to the way that <a name="section"> in HTML. {@id} will automatically generate an id tag appropriate for the output format. The {@toc} tag is used at the top of a tutorial to generate an internal table of contents for that tutorial. The {@toc} tag extracts all sections that have an {@id} tag and uses the title of that section for the generated table of contents. {@id} is also used to mark subsections to allow linking to a sub-section of a tutorial, much the way that in HTML file.html#subsection is used.

Where to put tutorials/extended documentation so phpDocumentor will find it


To simplify linking of tutorials, all tutorials must be in a subdirectory named "tutorials" and must be passed in a -d, --directory or -f, --filename command-line switch.

In addition, tutorials are grouped by the same packages that group documented elements (see Dividing projects into packages for more information). To associate a tutorial with a package, place it in a subdirectory of tutorials/ named after the package. A tutorial for package "phpDocumentor" goes in "tutorials/phpDocumentor," a tutorial for subpackage "CHMDefault" of package "Converters" goes in "tutorials/Converters/CHMdefault/" - for an example, see the tutorials/ subdirectory of phpDocumentor.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 41 of 1382

At the bare minimum, assuming your one package is named "MyApp", you should create the "tutorials/MyApp/MyApp.pkg" file, with this minimal content: 1 <refentry id=" {@id}" > 2 <refnamediv> 3 <refname> User Guide for My Application</refname> 4 <refpurpose> To demonstrate the various tasks available in My app</refpurpose> 5 </refnamediv> 6 <refsynopsisdiv> 7 <author> 8 My Name 9 <authorblurb> 10 {@link mailto:[email protected] My Name} 11 </authorblurb> 12 </author> 13 </refsynopsisdiv> 14 {@toc} 15 <refsect1 id=" {@id intro}" > 16 <title> User Guide</title> 17 <para> 18 This will be the User Guide for My app. 19 </para> 20 </refsect1> 21 </refentry>

One common "gotcha" here is ensuring that you name the PKG file and its parent directory with your package's exact name, as well as ensuring you have indeed used the "@package MyApp" tag in your codebase. Running PhpDocumentor against this minimal tutorial file, when no PHP files use this package name, will NOT result in your tutorial being generated.

A second common "gotcha" is that if you attempt to run PhpDocumentor against ONLY the tutorial directory and its files, you'll get "ERROR: nothing parsed"... because you did not give PhpDocumentor any PHP files to process. PhpDocumentor does need at least one "code" file to process, along with the tutorials, in order for any tutorials to be generated. This is a common mistake when first trying to write tutorial docs... writing the files and then trying to run PhpDocumentor against ONLY the tutorials directory to test your tutorial files. You will need at least one PHP file included in your test run, to avoid getting "ERROR: nothing parsed".

A third "gotcha" can occur when you make your tutorial for your package and expect that the top-level index.html file will show its content, only to see an empty page showing little more than "Welcome to default!". What has happened is that the default package name for a documentation generation is "default", so unless you specify "--defaultpackagename MyApp", then your resulting top-level index.html file wants to tie itself to a "default.pkg" tutorial file for the "default" package, which does not exist, and it therefore decides there is no tutorial and instead displays that generic "Welcome" message.

Naming tutorials: .pkg, .cls, .proc


There are three ways of associating tutorials/extended documentation with the elements they are written for: Package-level tutorials always have file extension "pkg" Class-level tutorials always have file extension "cls" Procedural-level tutorials always have file extension "proc"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 42 of 1382

Package-level documentation
The primary documentation for a package or subpackage should go in a file with the same name as the package or subpackage. For package "phpDocumentor" the primary package-level documentation is in "tutorials/phpDocumentor/phpDocumentor.pkg" For subpackage "CHMdefault" of package "Converters," the primary subpackage-level documentation is in "tutorials/Converters/CHMDefault/CHMdefault.pkg"

Other package-level documentation can have any filename, but must have the package-tutorial extension .pkg.

Class-level documentation
Similar to package-level documentation, the primary documentation for a class must have the same name as the class. The primary documentation for the class "Converter" in package "Converters" will be found in "tutorials/Converters/Converter.cls."

Procedural-level documentation
If a package contains a number of functions, it may be good to include procedural-level documentation. If a particular file contains a large amount of procedural information that must be documented, it is possible to link tutorials to that file's API docs in the same manner it is possible to link to a class's API docs.

The primary documentation for the procedural component of a PHP file must have the same name as the file. The primary procedural documentation for the file test.php in package "examples" will be found in "tutorials/examples/test.php.proc."

Creating a tutorial hierarchy


If you've ever wanted to separate a large user-level document into separate documents the way the PHP manual does, you're in luck. phpDocumentor provides a dynamic and flexible solution to this problem. When parsing a tutorial, phpDocumentor looks for an .ini file associated with that tutorial in the same directory. In other words, for "tutorials/phpDocumentor/phpDocumentor.pkg," phpDocumentor will search for a file named "tutorials/phpDocumentor/phpDocumentor.pkg.ini" and will parse out a section named [Linked Tutorials]. This section defines every child tutorial of the tutorial phpDocumentor.pkg

In order for a tutorial to be linked to another tutorial as a child, it must be in the same package, subpackage and be the same tutorial type. tutorials/phpDocumentor/phpDocumentor.pkg cannot have tutorials/phpDocumentor/oops.cls as a child tutorial, nor can it have tutorials/phpDocumentor/oops/almostworks.pkg as a child tutorial. It can have tutorials/phpDocumentor/works.pkg as a child, because the tutorial is in the same package, and is package-level documentation.

To help enforce this rule, the [Linked Tutorials] section is a list of filenames minus path and extension.

Here's an example tutorials/test/test.pkg.ini: Example: role = "ini"[Linked Tutorials]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 43 of 1382

child1 child2 child3

phpDocumentor will search for tutorials/test/child1.pkg, tutorials/test/child2.pkg, and tutorials/test/child3.pkg and link them in that order. Note that any tutorial can have an .ini file, allowing unlimited depth of tutorials. We don't recommend going beyond 3 sub-levels, that will probably confuse readers more than it helps them.

For a working example, check out the .ini files in phpDocumentor's own tutorials/ directory.

Converting tutorials/extended documentation to HTML/CHM/PDF/XML/...


Support is built into the existing Converters for automatic conversion of tutorials to the desired output without any extra work on your part. However, if the output is not quite right, and something needs to be changed, this is very easy. For every template of every converter, there is a file in the template directory called "options.ini." In other words, for the HTML:frames:default template, the options.ini file is phpDocumentor/Converters/HTML/frames/templates/default/options.ini. Open this file to see all of the template options for conversion of data.

The first section of the .ini file, [desctranslate], is for conversion of DocBlocks and is covered elsewhere (see DocBlock Description details).

After that comes the section that deals with tutorials, [ppage].

[ppage] section of options.ini


The [ppage] section contains simple rules for transforming DocBook tags and DocBook entities into any output. Re-ordering is supported for attributes and titles only. The best way to learn how to use this simple and powerful transformation is to study the options.ini files for HTML:frames:phpedit and PDF:default:default

DocBook Entity translation


The translation of entities like &rdquo; is handled through entries in the [ppage] section like the following for html:
role = "ini"[ppage] " = " & = & &rdquo; = &rdquo;

or the following, for PDF:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 44 of 1382

role = "ini"[ppage] " = """ & = & &rdquo; = """

Note that to specify a ", it must be enclosed in double quotes, hence the usage of """

DocBook Tag translation


Each tag is transformed using a few possibilities. If a tag is to be simply transformed into another tag (as in <p></p> to <para></para>, use tagname = newtagname phpDocumentor will automatically enclose the tag contents with the new tagname and all of its attributes

If the start and endtag should be different, specify the exact text using a slash before the tagname as in: tagname = <starttext attr="myval" /> /tagname = "\n"

If a tag needs only a new tag and attribute name (for example link and linkend become a and href): tagname = newtagname tagname->attr = newattrname

If a tag needs only a new tag and attribute name, and a new attribute value (for example table frame="all" becomes table frame="border"): tagname = newtagname tagname->attr = newattrname tagname->attr+val = newval

If a tag needs only a new tag and attribute name, and two attributes combine into one (for example table colsep="1" rowsep="1" becomes table rules="all"): tagname = newtagname tagname->attr = newattrname tagname->attr2 = newattrname tagname->attr+val|attr2+val = newval

If an attribute should be ignored: tagname = newtagname tagname!attr =

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 45 of 1382

If all attributes should be ignored: tagname = newtagname tagname! =

If a tag should have all attributes and be a single tag (like <br />: tagname = newtagname tagname/ =

If an attribute should be changed to a new name for all cases (like role changed to class, which would be $attr$role = class): $attr$attrname = newattrname

Tips for using the .ini files


The parsing of these ini files is performed by phpDocumentor_parse_ini_file(), a much more powerful version of PHP's http://www.php.net/parse_ini_file built-in function. If a value is encased in quotation marks, it will be stripped of backslashes (\) and used as is. In other words:

Example: role = "ini"tagname = " Some "enclosed"\n\ttext"

will parse out as tagname = Some "enclosed" text.

Otherwise, this example:

Example: role = "ini"tagname = Some "enclosed"\n\ttext

will parse out as tagname = Some "enclosed"\n\ttext.

Note that escaping of quotation marks is not needed, phpDocumentor_parse_ini() only strips the outer tags and then performs http://www.php.net/stripcslashes on the remaining string.

What next?
Write your tutorials and extended documentation!

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 46 of 1382

phpDocumentor Manual
Introduction to phpDocumentor
Authors:Gregory Beaver [email protected] Joshua Eichorn [email protected] Kellin [email protected] Juan Pablo Morales [email protected] Florian Clever [email protected] Dennis Kehrig [email protected] Robert Hoffmann [email protected] Roberto Berto [email protected] Dave Viner [email protected] Walter A Boring IV [email protected] Mark van Reunswolde [email protected] Julien Damon [email protected] Harald Fielker

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 47 of 1382

[email protected] Marco von Ballmoos [email protected] Andrew Eddie [email protected] William K. Hardeman [email protected] Chuck Burgess [email protected]

Documentation
The release of phpDocumentor 1.2.0+ marks a radical shift in the design philosophy of phpDocumentor. No longer is this tool intended only to generate documentation from the source code. Now it facilitates generating user-level documentation for people who only wish to use your software, and not to modify it. This allows complete integration of all the documentation for the software project, and that means even greater ease of documenting, and ultimately more time to work on making the software work!

The old functionality of phpDocumentor has not been changed, only extended. The old HTMLdefaultConverter has been ported to a new HTMLframesConverter. The output looks the same, or better, but the templates are now smarty.php.net-based templates, and allow much greater customization. To start out right away, read phpDocumentor Tutorial.

Bugs and Features (guaranteed to be separate entities...)


If you think you've found a bug in phpDocumentor, please check our bug trackers online at PEAR and http://sourceforge.net/tracker/?func=browse&group_id=11194&atid=111194 Sourceforge , the bug may have already been fixed (we develop at a rapid rate). If you don't find it, please submit a bug (preferably at PEAR), and we will attempt to fix it as quickly as possible.

If there is a feature you're dying to have, check our feature tracker at PEAR and http://sourceforge.net/tracker/?func=browse&group_id=11194&atid=361194 Sourceforge . Please don't hesitate to look right at the source code and help apply your feature. We love that, and can easily give you access to the cvs.

How to Help Out


If you would like to help out with phpDocumentor, don't be shy. Email Joshua Eichorn right away and say you'd like to be added to the developer team. We need people who are willing to develop Converters, translate documentation, and handle various bugs and feature requests as they come up. phpDocumentor is fast becoming the de facto standard of automatic documentors in PHP, so it is in your best interest to make sure it works the way you need it to work.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 48 of 1382

phpDocumentor tags
How to use tags in DocBlocks

Tags Manual
Welcome to the phpDocumentor Tags Manual

phpDocumentor tags are very similar to tags for the JavaDoc tool for Sun's Java Programming Language. Tags are only parsed if they are the first thing on a new line of a DocBlock. You may use the @ character freely throughout documents as long as it does not begin a new line. An example:

1 2 3 4 5

/** * tags demonstration * @author this tag is parsed, but this @version tag is ignored * @version 1.0 this version tag is parsed */

Any tags that phpDocumentor does not recognize will not be parsed, and will be displayed in text flow as if they are part of the DocBlock long description. The example below displays text "tags demonstration @foobar this is silly," and also displays the author as "this tag is parsed, but this @version tag is ignored"

1 2 3 4 5

/** * tags demonstration * @foobar this is silly * @author this tag is parsed, but this @version tag is ignored */

Inline tags display in the text flow where they appear, and are not separated from the description. As of version 1.2, there are several inline tags. The allowed inline tag list is different for tutorials and regular incode documentation. See phpDocumentor Inline tags for more information.

The example below will display the text "this function works heavily with foo() to rule the world" where foo() represents a hyperlink that links to the function foo()'s documentation.

1 /** 2 * inline tags demonstration 3 * 4 * this function works heavily with {@link foo()} to rule the world 5 */ 6 function bar() 7 { 8 } 9 10 function foo()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 49 of 1382

11 12

{ }

Standard phpDocumentor Tags


Most tags can be in the DocBlock of any documentable PHP element (for a definition of a documentable PHP element, see Documentable PHP Elements). Here is a list of the standard tags: @access @author @copyright @deprecated @example @ignore @internal @link @see @since @tutorial @version inline {@internal}} inline {@inheritdoc} inline {@link}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 50 of 1382

@abstract
Document an abstract class, class variable or method

Description
Use the @abstract tag to declare a method, class variable, or class that must be re-defined in a child class to be valid.

Warning: The @abstract tag is only valid in PHP 4, PHP 5 has a keyword abstract.

Example
Here's an example:

1 /** 2 * example of basic @abstract usage in a class 3 * Use this if every single element of the class is abstract 4 * @abstract 5 */ 6 class myabstractclass 7 { 8 function function1($baz) 9 { 10 ... 11 } 12 13 function function2() 14 { 15 ... 16 } 17 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 51 of 1382

@access
Access control for an element. @access private prevents documentation of the following element (if enabled).

Description
@access controls phpDocumentor's documentation of an element.

If @access is private, the element will not be documented unless specified by command-line switch -parseprivate.

Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 /** * function func1, public access is assumed */ function func1() { } /** * function func2, access is private, will not be documented * @access private */ function func2() { } /** * This is possible, but redundant. An element has @access public by default * @access public */ class class1 { /** * all text in this DocBlock will be ignored, unless command-line switch or * setting in a user INI file enables documenting of private elements * @access private */ var $private_var ; /** * Protected is allowed, but does absolutely nothing. Use it to inform users * that an element should only be referenced by this and child classes, * and not directly * @access protected */ /** * this function is documented */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 52 of 1382

38 39 40 41

function publicmethod() { } }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 53 of 1382

@author
Author of current element

Description
The @author tag is used to document the author of any element that can be documented (global variable, include, constant, function, define, class, variable, method, page). phpDocumentor will take any text between angle brackets (< and >) and try to parse it as an email address. If successful, it will be displayed with a mailto link in the page

NEW v1.2 - @author is now inherited by child classes from a parent class, see inline {@inheritdoc}.

Example
1 /** 2 * Page-Level DocBlock example. 3 * displays as Gregory Beaver<u>[email protected]</u> 4 * , where underlined text is a "mailto:[email protected]" link 5 * @author Gregory Beaver <[email protected]> 6 */ 7 /** 8 * function datafunction 9 * another contributor authored this function 10 * @author Joe Shmoe 11 */ 12 function datafunction() 13 { 14 ... 15 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 54 of 1382

@category
Specify a category to organize the documented element's package into

Description
The @category tag is used to organize groups of packages together. This is directly applicable to the XML:DocBook/peardoc2 Converter, and can be used by other converters. Other Converters packaged with phpDocumentor ignore the category, but this may change in future versions. It is also possible to dynamically specify category using the -dc, --defaultcategoryname command-line switch.

Example
Here's an example:

1 /** 2 * Page-Level DocBlock 3 * @package MyPackage 4 * @category mycategory 5 */ 6 7 /** 8 * @global array used for stuff 9 */ 10 function mine() 11 { 12 global$baz; 13 ... 14 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 55 of 1382

@copyright
Document Copyright information

Description
The @copyright tag is used to document the copyright information of any element that can be documented (global variable, include, constant, function, define, class, variable, method, page). phpDocumentor will display the copyright string unaltered.

NEW v1.2 - @copyright is now inherited by child classes from a parent class, see inline {@inheritdoc}.

Example
1 /** 2 * Page-Level DocBlock example. 3 * @author Gregory Beaver <[email protected]> 4 * @copyright Copyright (c) 2002, Gregory Beaver 5 */ 6 /** 7 * function datafunction 8 */ 9 function datafunction() 10 { 11 ... 12 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 56 of 1382

@deprecated
Document elements that have been deprecated and should not be used as they may be removed at any time from a future version

Description
The @deprecated tag is used to document the deprecation version or other information of any element that can be documented except for page (global variable, include, constant, function, define, class, variable, method). If present, phpDocumentor will display the optional version/info string unaltered.

Use @deprecated to notify users of deprecated elements that should not be used any longer

Example
Here's an example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

/** * @deprecated deprecated since version 2.0 */ function uselessfunction() { ... } /** * also legal * @deprecated */ class stupidclass { ... }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 57 of 1382

@example
Include an external example file with syntax highlighting

Description
The example tag can be used to parse an example file for syntax highlighting and linking to documentation. This versatile tag attempts to read the file from the full path specified, and will accept any path that http://www.php.net/fopen will accept. phpDocumentor checks the path to ensure that the file retrieved has a valid .php extension as defined in phpDocumentor.ini, and then opens the file. It will parse the file, and output syntax-highlighted source with line numbers, links to documentation and will then add a link to the documentation to that file.

If given an absolute path, phpDocumentor will not search for the example file any further. If given a relative path (no leading c:\ or /) phpDocumentor searches for examples files first in the directory specified by the -ed, --examplesdir command-line, if present. As of phpDocumentor 1.2.1, it will next search for the file in an examples/ subdirectory of the current file's directory. Otherwise, it will search for a subdirectory named "examples" in the top-level parsing directory, and if not found, in the top-level directory.

The top-level parsing directory is simply the directory that every file parsed has in common.

The @filesource tag serves a similar purpose, but instead of parsing a separate file, it parses the current file's source.

To do an inline code example, use the html tag <code> or the new

inline {@example} tag

Warning: @example only works with PHP 4.3.0+ due to the use of the tokenizer extension, which was not stable prior to PHP 4.3.0. Go to http://www.php.net and download PHP 4.3.0 to use @example

Example
Here's an example:

1 2 3 4 5 6 7 8 9 10 11

/** * My function * * Here is an inline example: * <code> * <?php * echo strlen('6'); * ?> * </code> * @example /path/to/example.php How to use this function * @example anotherexample.inc This example is in the "examples" subdirectory

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 58 of 1382

12 13 14 15

*/ function mine() { }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 59 of 1382

@final
Document a class method that should never be overridden in a child class

Description
Use the @final tag to declare a method that cannot be overridden in a child class.

Warning: The @final tag is only valid in PHP 4, PHP 5 has a keyword final.

Example
Here's an example:

1 /** 2 * example of basic @final usage in a class 3 */ 4 class myclass 5 { 6 /** 7 * function1 should never be overridden 8 * @final 9 */ 10 function function1($baz) 11 { 12 ... 13 } 14 15 function function2() 16 { 17 ... 18 } 19 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 60 of 1382

@filesource
create a syntax-highlighted cross-referenced file containing source code of the current file and link to it

Description
The @filesource tag can only be used in a page-level DocBlock, it will be ignored anywhere else. phpDocumentor parses the file source of the current file, and outputs syntax-highlighted source code with line numbers, links to documentation and then adds a link to the generated file in the documentation.

The @example tag serves a similar purpose, but is designed to parse and create a link to an external example file.

Warning: @filesource only works with PHP 4.3.0+ due to the use of the tokenizer extension, which was not stable prior to PHP 4.3.0. Go to http://www.php.net and download PHP 4.3.0 to use @filesource

Example
Here's an example:

1 /** 2 * Contains several example classes that I want to parse but I 3 * also want to show the full source 4 * @package mypackage 5 * @subpackage example 6 * @filesource 7 */ 8 /** 9 * This class does things 10 * @package mypackage 11 * @subpackage example 12 */ 13 class oneofmany extends mainclass 14 { 15 ...

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 61 of 1382

@global
Document a global variable, or its use in a function/method

Description
Since there is no standard way to declare global variables, phpDocumentor requires that a @global tag be used in a docblock preceding a global variable's definition. To support previous usage of @global, there is an alternate syntax that applies to DocBlocks preceding a function, used to document usage of global variables. in other words, There are two usages of @global: definition and function usage.

phpDocumentor will not attempt to automatically parse out any global variables. Only one @global tag is allowed per global variable DocBlock. A global variable DocBlock must be followed by the global variable's definition before any other element or DocBlock occurs in the source, or an error will be raised.

datatype should be a valid PHP type or "mixed."

$varname should be the EXACT name of the global variable as it is declared in the source (use @name to change the name displayed by documentation)

The function/method @global syntax is used to document usage of global variables in a function, and MUST NOT have a $ starting the third word. The datatype will be ignored if a match is made between the declared global variable and a variable documented in the project.

phpDocumentor will check to see if the type specified is the name of a class that has been parsed. If so, it will make a link to that class as the type instead of just the type.

phpDocumentor will display the optional description unmodified

Example
Here's an example of documenting the definition of a global variable:

1 /** 2 * example of incorrect @global declaration #1 3 * @global bool $GLOBALS['baz'] 4 * @author blahblah 5 * @version -6 6 */ 7 include "file.ext" ( ); 8 // error - element encountered before global variable declaration, docblock will apply to this include! 9 $GLOBALS 'baz'] = array('foo','bar'); [ 10 11 /** example of incorrect @global declaration #2 12 * @global parserElement $_Element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 62 of 1382

13 */ 14 /** 15 * error - this DocBlock occurs before the global variable definition and will apply to the function, 16 * ignoring the global variable completely 17 * / 18 $_Element = new parserElement; 19 20 function oopsie() 21 { 22 ... 23 } 24 25 /** example of correct @global declaration, 26 * even with many irrelevant things in between 27 * @global mixed $_GLOBALS["myvar"] 28 */ 29 // this is OK 30 if ($pre) 31 { 32 $thisstuff 'is fine too'; = 33 } 34 $_GLOBALS "myvar" [ ] = array( "this" => 'works just fine'); 35 36 /** 37 * example of using @name with @global 38 * the @name tag *must* have a $ in the name, or an error will be raised 39 * @global array $GLOBALS['neato'] 40 * @name $neato 41 */ 42 $GLOBALS 'neato'] = 'This variable\'s name is documented as $neato, and not as [ $GLOBALS[\'neato\']';

Here's an example of documenting the use of a global variable in a function/method:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

/** * Used to showcase linking feature of function @global */ class test { } /** * @global test $GLOBALS['baz'] * @name $bar */ $GLOBALS 'bar'] = new test [ /** * example of basic @global usage in a function * assume global variables "$foo" and "$bar" are already documented * @global bool used to control the weather * @global test used to calculate the division tables * @param bool $baz * @return mixed */ function function1($baz) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 63 of 1382

24 25 26 27 28 29 30 31 32 33 34 35 36

global$foo,$bar; // note that this also works as: // global $foo; // global $bar; if ($baz) { $a = 5; } else { $a = array(1,4); } return$a; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 64 of 1382

@ignore
Prevent documentation of an element

Description
Use @ignore to prevent phpDocumentor from documenting an element, such as a duplicate element.

Example
Here is an example of how to use @ignore:

1 if ($ostest ) 2 { 3 /** 4 * This define will either be 'Unix' or 'Windows' 5 */ 6 define("OS" ,"Unix" ); 7 } else 8 { 9 /** 10 * @ignore 11 */ 12 define("OS" ,"Windows" ); 13 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 65 of 1382

@internal
Mark documentation as private, internal to the software project

Description
Use @internal to facilitate the creation of two sets of documentation, one for advanced developers or for internal company use, and the other for the general PHP public. Use this tag or its cousin, inline {@internal}}

@internal responds to the command-line -pp, --parseprivate, as both @internal and --parseprivate share the same purpose. In both cases, the intent is to allow the creation of two sets of documentation, one for public use, and the other for a subset of developers, either the project developers or those who wish to extend the project. In essence, it allows the creation of both user-level and programmer-level documentation from the same source, and is one of phpDocumentor's most useful features.

Example
Here is an example of how to use @internal and {@internal}}:

1 2 3 4 5 6 7 8 9 10 11

/** * This class does things * * {@internal To access the company guidelines on modifying this class, * see {@link http://www.example.com Company Guidelines}, or contact * your supervisor}}} * Using this class can be very helpful for several reasons. etc. etc. * @internal the class uses the private methods {@link _foo()} and * {@link _bar()} to do some wacky stuff */ class Doesthings

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 66 of 1382

@license
Display a hyperlink to a URL for a license

Description
You may use the @license tag to document any element (include, page, class, function, define, method, variable)

URL is any valid Uniform Resource Locator that points to the full text of a license. The description for the license is optional

Example
Here's an example:

1 /** 2 * Displays <a href="http://opensource.org/licenses/gpl-license.php">GNU Public License</a> 3 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 4 */ 5 class opensource_class {...}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 67 of 1382

@link
Display a hyperlink to a URL in the documentation

Description
You may use the @link tag to document any element (include, page, class, function, define, method, variable). The guidelines for giving the element name to @link are the same as outlined in the @see manual page.

Caution Unless linking to an element, @link assumes the arguments passed are fully-formed URLs. Generally speaking, if you want to link to an element's documentation, use @see or inline {@link}... you can use @link, but the other options are better. URL is any valid Uniform Resource Locator (http://www.example.com, telnet://example.com, ftp://ftp.example.com, mailto:[email protected], etc.)

Note that as of version 1.2.0, it is possible to specify a short description for the link to use as the link text instead of the URL.

Example
Here's an example:

1 /** 2 * Displays <a href="http://www.example.com">http://www.example.com</a> 3 * @link http://www.example.com 4 */ 5 define("TEST_CONSTANT" ,3); 6 /** 7 * Displays <a href="http://www.example.com">Hello</a> 8 * @link http://www.example.com Hello 9 */ 10 define("TEST_CONSTANT2" ,3); 11 /** 12 * You SHOULD use @see here instead of @link, but here's how it works: 13 * displays <a href="./MyDocs/MyPackage/MyClass.html">MyClass</a> 14 * @link MyClass 15 */ 16 define("TEST_CONSTANT3" ,3);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 68 of 1382

@method
"Magic" Method of a class.

Description
@method shows a "magic" method that is found inside the class.

returntype should be a valid PHP type or "mixed." phpDocumentor will display the optional description unmodified, and defaults to "void" if the returntype is not present.

Example
1 /** 2 * show off @method 3 * 4 * @method int borp() borp(int $int1, int $int2) multiply two integers 5 */ 6 class Magician 7 { 8 function __call( method $params $ , ) 9 { 10 if ($method== 'borp') { 11 if ( count( $params == 2) { ) 12 return$params 0] * [ $params 1]; [ 13 }}}}

Using this "magic" tag will result in the tag info being listed in the "infomational" tag listing for the class itself. It does NOT generate actual "method" or "function" entities in the document.

In the example above, when using PhpDocumentor with the HTML:Smarty:HandS converter, you'll see the "__call()" method shown in the "Method Summary" listing of your class methods, but you will NOT see "borp()" there, because the latter is not an explicitly declared method in your code. You WILL see "borp()" in the class-level's "API Tags" listing, thanks to your "@method" tag in the class-level docblock.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 69 of 1382

@name
Specify an alias to use for a procedural page or global variable in displayed documentation and linking

Description
phpDocumentor recognizes the @name tag in global variable DocBlocks (in conjunction with @global), and uses it to rename a global variable for documentation to make it more readable. A global variable name MUST begin with a dollar sign ($) or phpDocumentor will ignore the tag and raise an error.

Example
Here's an examples:

1 /** 2 * Now, when @global is used in a function, it will link to $baz 3 * @name $baz 4 * @global array $GLOBALS['baz'] 5 */ 6 $GLOBALS 'baz'] = array('foo','bar'); [ 7 8 /** 9 * @global array used for stuff 10 */ 11 function mine() 12 { 13 global$baz; 14 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 70 of 1382

@package
Specify package to group classes or functions and defines into

Description
@package can only be used to document procedural pages or classes.

Packages are used to help you logically group related elements. You write classes to group related functions and data together, and phpDocumentor represents the contents of files (functions, defines, and includes) as "Procedural Pages." A package is used to group classes and procedural pages together in the same manner that a directory groups related files together.

If found in a page-level DocBlock, packagename specifies the package that all functions, includes, and defines in the php file belong to. If found in a class-level DocBlock, packagename specifies the package that the class belongs to.

Caution If not present, a class's package is set to default, or the value of the -dn command-line switch, even if the page-level package is set to another value. This may be changed by the command-line option -dn or --defaultpackagename. PACKAGES MUST BE ONE WORD WITH NO SPACES OR NEWLINES CONTAINING ONLY LETTERS, DIGITS, and "_", "-", "[" or "]" @package groups php files together for documentation.

There are two ways a @package tag is parsed: <ol role = "I"> page-level package (defines, functions, includes/requires) class-level package (class, all its variables and methods)

If a file contains functions and defines, they will be packaged by a page-level DocBlock. A page-level DocBlock is a DocBlock at the top of a file that precedes another DocBlock. In other words, it is not paired with any phpDocumentor element (include, function, define, class, class function, class variable).

Example
phpDocumentor parses a DocBlock as a page-level DocBlock if it precedes another DocBlock like this:

1 2 3 4

/** * Page-Level DocBlock example. * This DocBlock precedes another DocBlock and will be parsed as the page-level. * Put your @package and @subpackage tags here

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 71 of 1382

5 * @package pagelevel_package 6 */ 7 /** 8 * function bluh 9 */ 10 function bluh() 11 { 12 ... 13 }

A page is documented as a procedural page if it is parsed, regardless of its content (NEW in 1.0).

A class-level DocBlock is any DocBlock that precedes a class definition in a php file.

1 <?php 2 /** 3 * class bluh 4 * class-level DocBlock example. 5 * @package applies_to_bluh 6 */ 7 class bluh 8 { 9 /** 10 * This variable is parsed as part of package applies_to_bluh 11 */ 12 var $foo; 13 14 /** 15 * So is this function 16 */ 17 function bar() 18 { 19 }} 20 ?>

If no @package tag is specified, the package named "default" will be used, with one major exception. If a class extends a parent class that has a @package tag, it will inherit the package from the parent class. This can be very useful in small projects. HOWEVER, it is highly recommended that a @package tag is used before every class that should have that package to avoid name collisions. What is a name collision? If you are documenting two related but separate packages, and both packages contain classes with the same name. For example, the tests package included with phpDocumentor contains several files used to verify the eradication of bugs from phpDocumentor. Several of these files contain classes with the same name as classes in phpDocumentor. phpDocumentor cannot determine the correct parent class automatically and will not inherit package at all to avoid a wrong guess. WE HIGHLY RECOMMEND THAT YOU USE @package IN THE DOCBLOCK OF EVERY CLASS OR PROCEDURAL PAGE YOU WISH TO BE IN A PACKAGE.

Elements can also be grouped into subpackages using @subpackage

See also @subpackage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 72 of 1382

@param
Document a function parameter

Description
NOTE: as of 0.4.1, @param can document phpdoc.de-style, with optional $paramname

The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object, or simply "mixed". Further, you can list multiple datatypes for a single parameter by delimiting them with the pipe (e.g. "@param int|string $p1"). You may document parameters listed or any optional paramters that will be parsed by standard PHP functions func_num_args()/get_func_arg(). Recommended name format for parameters listed with func_get_arg() is: $paramname if there is only one parameter $paramname,... if the number of parameters is unlimited

phpDocumentor will display the optional description unmodified.

Note that the $paramname,... will be shown in the output docs in both the parameter listing AND the function signature. If you are not indicating in the actual code that the parameter is optional (via "$paramname = 'a default value'"), then you should mention in the parameter's description that the parameter is optional.

Example
Here's an example:

1 /** 2 * example of basic @param usage 3 * @param bool $baz 4 * @return mixed 5 */ 6 function function1($baz) 7 { 8 if ($baz) 9 { 10 $a = 5; 11 } else 12 { 13 $a = array(1,4); 14 } 15 return$a; 16 } 17 18 class class1 19 { 20 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 73 of 1382

21 * example of documenting a method, and using optional description with @return 22 * @return string de-html_entitied string (no entities at all) 23 */ 24 function bar( foo) $ 25 { 26 return strtr($foo, array_flip(get_html_translation_table(HTML_ENTITIES))); 27 } 28 } 29 30 /** 31 * Example of documenting multiple possible datatypes for a given parameter 32 * @param bool|string $foo sometimes a boolean, sometimes a string (or, could have just used "mixed") 33 * @param bool|int $bar sometimes a boolean, sometimes an int (again, could have just used "mixed") 34 */ 35 function function2($foo, $bar) 36 { 37 if (!$foo) 38 { 39 // definitely not a string, and not a boolean TRUE... could ONLY be a boolean FALSE 40 } 41 42 if (!$bar) 43 { 44 // could ONLY be a boolean FALSE or an integer "0" 45 } 46 } 47 48 /** 49 * Example of documenting undetermined function arguments 50 * (notice how $foo_desc is NOT part of the actual function signature in the code, but still gets documented) 51 * @param string $foo 52 * @param mixed $foo_descoptional description of foo 53 */ 54 function function3($foo) 55 { 56 echo $foo; 57 if ( func_num_args == 2) 58 { 59 echo 'Description: '.func_get_arg(1); 60 } 61 } 62 63 /** 64 * Example of unlimited parameters. 65 * Returns a formatted var_dump for debugging purposes 66 * (since the recurrences of $v are not listed in the actual function signature in the code, 67 * you may wish to highlight they are "optional" in their description) 68 * @param string $sstring to display 69 * @param mixed $vvariable to display with var_dump() 70 * @param mixed $v,...unlimited OPTIONAL number of additional variables to display with var_dump() 71 */ 72 function fancy_debug($s,$v) 73 { 74 print $s. <blockquote>\n" " ; 75 var_dump( $v); 76 if ( func_num_args()> 2)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 74 of 1382

77 78 79 80 81 82 83 84 85

{ for($i= 2; i< func_num_args(); $i++) $ { $a = func_get_arg( $i); var_dump( $a); print "<br>\n" ; }} print "</blockquote>\n" ; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 75 of 1382

@property
"Magic" Property of a class.

Description
@property shows a "magic" property variable that is found inside the class.

datatype should be a valid PHP type or "mixed." phpDocumentor will display the optional description unmodified, and defaults to "mixed" if the datatype is not present.

The property is presumed to be available for both read and write operations. If the property is read-only, you should use the @property-read tag instead. If the property is write-only, use @property-write.

Example
1 /** 2 * show off @property, @property-read, @property-write 3 * 4 * @property mixed $regular regular read/write property 5 * @property-read int $foo foo prop the 6 * @property-write string $bar bar prop the 7 */ 8 class Magician 9 { 10 private $_thingy ; 11 private $_bar; 12 13 function __get( var) $ 14 { 15 switch($var) { 16 case 'foo' : 17 return 45; 18 case 'regular' : 19 return$this -> _thingy ; 20 }} 21 22 function __set( var, $val) $ 23 { 24 switch($var) { 25 case 'bar' : 26 $this -> _bar = $val; 27 break; 28 case 'regular' : 29 if ( is_string( $val)) { 30 $this -> _thingy= $val; 31 }}} 32 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 76 of 1382

Using these "magic" tags will result in the tag info being listed in the "infomational" tag listing for the class itself. It does NOT generate actual "property" or "variable" entities in the document.

In the example above, when using PhpDocumentor with the HTML:Smarty:HandS converter and the "-parseprivate on" setting, you'll see "$_thingy" and "$_bar" shown in the "Property Summary" listing of your class variables, but you will NOT see "$regular", "$foo", or "$bar" there, because the latter three are not explicitly declared variables in your code. You WILL see "$regular", "$foo" and "$bar" in the class-level's "API Tags" listing, thanks to your "@property" tags in the class-level docblock.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 77 of 1382

@return
Specify the return type of a function or method

Description
The @return tag is used to document the return value of functions or methods. @returns is an alias for @return to support tag formats of other automatic documentors

The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object returned, or simply "mixed". If you want to explicitly show multiple possible return types, list them pipe-delimited without spaces (e.g. "@return int|string"). If a class name is used as the datatype in the @return tag, phpDocumentor will automatically create a link to that class's documentation. In addition, if a function returns multiple possible values, separate them using the | character, and phpDocumentor will parse out any class names in the return value. phpDocumentor will display the optional description unmodified.

Example
Here's an example:

1 /** 2 * example of basic @return usage 3 * @return mixed 4 */ 5 function function1($baz) 6 { 7 if ($baz) 8 { 9 $a = 5; 10 } else 11 { 12 $a = array(1,4); 13 } 14 return$a; 15 } 16 17 /** 18 * example of showing multiple possible return types 19 * @return int|string could be an int, could be a string 20 */ 21 function function2($foo) 22 { 23 if ($foo) 24 { 25 return 0; 26 } 27 else 28 { 29 return "zero" ; 30 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 78 of 1382

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

} class class1 { /** * example of documenting a method, and using optional description with @return * @return string de-html_entitied string (no entities at all) */ function bar( foo) $ { return strtr($foo, array_flip(get_html_translation_table(HTML_ENTITIES))); } /** * example of using @return with a class name * @param integer even or odd integer * @return Parser|false phpDocumentor Parser object or error */ function& factory( number $ ) { $returnval= true; if ($number% 2) { $returnval= new Parser; } else { $returnval= false; } return$returnval ; } }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 79 of 1382

@see
Display a link to the documentation for an element

Description
The @see tag may be used to document any element (global variable, include, page, class, function, define, method, variable)

Caution @see only displays links to element documentation. If you want to display a hyperlink, use @link or inline {@link} New in version 1.2: You can link to any defined function in the current php version using the function's name. This linking is done using the standard php function http://www.php.net/get_defined_functions, and so relies on the version of php that is used to execute phpDocumentor. A benefit of this method is that the function highlighting will automatically upgrade with a php upgrade without any change to the underlying code. You may also link directly to any portion of the php website using the fake package override PHP_MANUAL (as in PHP_MANUAL#get_defined_functions, or PHP_MANUAL#support.php)

Along with inline {@link}, the @see tag is among the most useful features of phpDocumentor. With this tag, you can create a link to any element (except include/require) in the documentation with a very wide range of options. The @see parser can be told exactly where to look using some basic punctuation: :: -- This is the class scope override. Use it to tell the @see parser which class to look in for the element specified, like classname::methodname() or classname::$variablename. () -- When present at the end of elementname, like elementname(), this tells the @see parser to search for a function or method. $ -- When present at the beginning of elementname, like $elementname, this tells the @see parser to search for a variable in the current class.

However, @see is also intelligent enough to recognize shorthand. If @see receives an elementname with no punctuation, it will search for an element in this order:

1. 2. 3. 4.

is elementname the name of a class? is elementname the name of a procedural page? (file.ext) is elementname the name of a define? if the DocBlock containing the @see is in a class:

1. 2.

is elementname a method? is elementname a variable?

is elementname a function?

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 80 of 1382

@see parsing is slightly slower when passed an elementname with no punctuation, especially if the elementname is a function, so use it sparingly in large projects (500+ elements with @sees in their DocBlocks). The best use for punctuation-less elementname is in a project whose classnames are in flux.

Example
Here's an example of valid @see syntax:

1 /** 2 * class 1 3 * 4 * example of use of the :: scope operator 5 * @see subclass::method() 6 */ 7 class main_class 8 { 9 /** 10 * example of linking to same class, outputs <u>main_class::parent_method()</u> 11 * @see parent_method 12 */ 13 var foo = 3; 14 15 /** 16 * subclass inherits this method. 17 * example of a word which is either a constant or class name, in this case a classname 18 * @see subclass 19 * @see subclass::$foo 20 */ 21 22 function parent_method() 23 { 24 if ($this -> foo== 9) die; 25 } 26 } 27 28 /** 29 * this class extends main_class. 30 * example of linking to a constant, and of putting more than one element on the same line 31 * @see main_class, TEST_CONST 32 */ 33 subclass extendsmain_class 34 { 35 /** 36 * example of same class lookup - see will look through parent hierarchy to 37 * find the method in { @link main_class} 38 * the above inline link tag will parse as <u>main_class</u> 39 * @see parent_method() 40 */ 41 var $foo = 9; 42 } 43 44 define("TEST_CONST" ,"foobar" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 81 of 1382

@since
Document when (at which version) an element was first added to a package

Description
The @since tag may be used to document the release version of any element that can be documented (global variable, include, constant, function, define, class, variable, method, page). phpDocumentor will display the version/info string unaltered.

Use @since to document revisions, as in "This function has been a part of this package since version 2.0"

Example
Here's an example:

1 /** 2 * Page-level DocBlock 3 * @package BigImportantProjectWithLotsofVersions 4 * @version 72.5 5 */ 6 /** 7 * function datafunction 8 * @since Version 21.1 9 */ 10 function datafunction() 11 { 12 ... 13 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 82 of 1382

@static
Document a static property or method

Description
Use the @static tag to declare a variable or method to be static. Static elements can be called without reference to an instantiated class object, as in class::variable and class::method().

Example
Here's an example:

1 /** 2 * example of a class 3 * with a single static variable 4 * and method 5 */ 6 class myclass 7 { 8 /** 9 * a static variable 10 * @static 11 */ 12 public static$astaticvar= 0; 13 /** 14 * normal variable 15 */ 16 public $anormalvar= 1; 17 /** 18 * a static function 19 * @static 20 */ 21 function mystaticfunction() 22 { 23 ... 24 } 25 /** 26 * normal function 27 */ 28 function mynormalfunction() 29 { 30 ... 31 } 32 } 33 34 // example of usage of static methods 35 myclass::mystaticvar; 36 myclass::mystaticfunction();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 83 of 1382

Just using the static keyword in your code is enough for PhpDocumentor on PHP5 to recognize static variables and methods, and PhpDocumentor will mark them as static.

However, using the static tag will also result in PhpDocumentor marking the variable or method as static, even if the PHP code does not use the static keyword. So, using the tag but not the keyword actually means your code behavior will not match your API doc... so handle with care. The good news is that using both the keyword and the tag will not result in a double "static" in the resulting doc.

Ideally, the static keyword in your code is sufficient for the resulting docs to show your members are static. This tag appears to be a "helpful" tag for use in PHP4 code, allowing you to hint that you want the member to be treated as static, even if PHP4 doesn't have the ability to make it act that way. Most likely, you'll use this tag as a reminder that your intention with this member, once you move the code from PHP4 to PHP5, will be for that member to be static.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 84 of 1382

@staticvar
Document a static variable's use in a function/method

Description
Datatype should be a valid PHP type or "mixed."

phpDocumentor will display the optional description unmodified

Example
Here's an example:

1 /** 2 * example of basic @staticvar usage in a function 3 * @staticvar integer used to calculate the division tables 4 * @staticvar array $bar used to make me happy. Note that $bar is part of the description is 5 * @param bool $baz 6 * @return mixed 7 */ 8 function function1($baz) 9 { 10 static$foo = 6, $bar = array(); 11 // note that this works as: 12 // static $foo = 6; 13 // static $bar = array(); 14 if ($baz) 15 { 16 $a = 5; 17 } else 18 { 19 $a = array(1,4); 20 } 21 return$a; 22 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 85 of 1382

@subpackage
Specify sub-package to group classes or functions and defines into. Requires @package tag

Description
@subpackage works with @package to group php files together for documentation.

If found in a page-level DocBlock, specifies the sub-package that all functions and defines in the php file belong to. If found in a class-level DocBlock, specifies the sub-package that the class belongs to.

Caution If @package is not present in the same DocBlock, the @subpackage tag is ignored. A SUBPACKAGE NAME MUST BE ONE WORD WITH NO SPACES OR NEWLINES CONTAINING ONLY LETTERS, DIGITS, and "_", "-", "[" or "]" A @subpackage tag is applied to documented elements in the same way that @package is applied.

If a file contains functions and defines, they will be packaged by a page-level DocBlock. A page-level DocBlock is a DocBlock that is not paired with any phpDocumentor element (include, function, define, class, class function, class variable).

NOTE: The @subpackage tag is intended to help categorize the elements that are in an actual @package value. Since PHP itself doesn't allow you to have two functions with the same name in the same script, PhpDocumentor also requires all names in an @package to be unique... meaning, @subpackage does not allow further "naming separation" inside that @package. What it does do is allow a level of visual grouping/separation of the elements inside that @package.

Example
phpDocumentor parses a DocBlock as a page-level DocBlock if it precedes another DocBlock like this:

1 /** 2 * Page-Level DocBlock example. 3 * This DocBlock precedes another DocBlock and will be parsed as the page-level. 4 * Put your @package and @subpackage tags here 5 * @package pagelevel_package 6 * @subpackage data 7 */ 8 /** 9 * function datafunction 10 */ 11 function datafunction() 12 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 86 of 1382

13 14

... }

A class-level DocBlock is any DocBlock that precedes a class definition in a php file.

1 <?php 2 /** 3 * class bluh 4 * class-level DocBlock example. 5 * @package applies_to_bluh 6 * @subpackage bluh 7 */ 8 class bluh 9 { 10 /** 11 * This variable is parsed as part of package applies_to_bluh, and subpackage bluh 12 */ 13 var $foo; 14 15 /** 16 * So is this function 17 */ 18 function bar() 19 { 20 }} 21 ?>

See also: @package

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 87 of 1382

@todo
Document changes that will be made in the future

Description
Use @todo to document planned changes to an element that have not been implemented. phpDocumentor will display the information string unaltered.

The @todo tag may be used to document future changes to almost any element that can be documented (global variable, constant, function, define, class, variable, method, page). Since v1.3.0, @todo can no longer be used on an "include" element.

Example
Here's an example:

1 /** 2 * Page-level DocBlock 3 * @package unfinished 4 * @todo finish the functions on this page 5 */ 6 /** 7 * function datafunction 8 * @todo make it do something 9 */ 10 function datafunction() 11 { 12 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 88 of 1382

@tutorial
Display a link to the documentation for a tutorial

Description
The @tutorial tag may be used to document any element (global variable, include, page, class, function, define, method, variable)

Caution @tutorial only displays links to tutorials/extended documentation. If you want to display a hyperlink or link to a documented element, use @see or @link or inline {@link} Along with inline {@tutorial}, the @tutorial tag is among the most useful features of phpDocumentor. With this tag, you can create a link to any tutorial or extended documentation. The @tutorial parser can be told exactly where to look using a format similar to a URI: package/ -- Preface to specify a tutorial in a specific package subpackage/ -- Preface to specify a tutorial in a specific package/subpackage #section -- Link to a specific section of the documentation package/subpackage/tutorial.ext#section .subsection -- Link to a specific sub-section of the documentation package/subpackage/tutorial.ext#section.subsection

However, @tutorial, like @see, is also intelligent enough to recognize shorthand. The search order for a tutorial is identical to what is specified in @see

Example
Here's an example of valid @tutorial syntax:

1 /** 2 * This will link to the phpDocumentor.pkg tutorial if it is unique, regardless 3 * of its location 4 * @tutorial phpDocumentor.pkg 5 */ 6 class test1 7 { 8 } 9 10 /** 11 * This will link to the phpDocumentor.pkg tutorial if and only if it is in the 12 * phpDocumentor package, any subpackage. 13 * @tutorial phpDocumentor/phpDocumentor.pkg 14 */ 15 class test2 16 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 89 of 1382

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

} /** * This will link to the phpDocumentor.pkg tutorial if and only if it is in the * phpDocumentor package, info subpackage. * @tutorial phpDocumentor/info/phpDocumentor.pkg */ class test3 { } /** * This will link to the phpDocumentor.pkg tutorial, section1 and subsection one * @tutorial phpDocumentor.pkg#section1, phpDocumentor.pkg#section1.subsection1 */ class test4 { }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 90 of 1382

@uses
Display a link to the documentation for an element, and create a backlink in the other element's documentation to this

Description
Caution Since version 1.2.0beta3, the syntax for @uses has changed. It differs in that @uses now contains a description of how the element is used and does not allow a comma-delimited list of values any longer. The @uses tag may be used to document any element (global variable, include, page, class, function, define, method, variable)

Caution @uses only displays links to element documentation. If you want to display a hyperlink, use @link or inline {@link} @uses is very similar to @see, see the documentation for @see for details on format and structure. The @uses tag differs from @see in two ways. @see is a one-way link, meaning the documentation containing a @see tag contains a link to other documentation. The @uses tag automatically creates a virtual @usedby tag in the other documentation that links to the documentation containing the @uses tag. In other words, it is exactly like @see, except a return link is added automatically.

The other difference is that @uses only accepts one element to link to, and a description of that element.

Example
Here's an example of valid @uses syntax:

1 /** 2 * class 1 3 * 4 */ 5 class main_class 6 { 7 /** 8 * @var integer 9 */ 10 var foo = 3; 11 12 /** 13 * subclass inherits this method. 14 * example of a word which is either a constant or class name, 15 * in this case a classname 16 * @uses subclass sets a temporary variable

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 91 of 1382

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

* @uses subclass::$foo this is compared to TEST_CONST * @uses TEST_CONST compared to subclass::$foo, we * die() if not found */ function parent_method() { if ($this -> foo== 9) die; $test = new subclass; $a = $test-> foo; if ($a == TEST_CONST) die; } } /** * this class extends main_class. */ subclass extendsmain_class { /** * @var integer */ var $foo = 9; } define("TEST_CONST" ,"foobar" );

This will parse as if it were:

1 /** 2 * class 1 3 * 4 */ 5 class main_class 6 { 7 /** 8 * @var integer 9 */ 10 var foo = 3; 11 12 /** 13 * subclass inherits this method. 14 * example of a word which is either a constant or class name, 15 * in this case a classname 16 * @uses subclass sets a temporary variable 17 * @uses subclass::$foo this is compared to TEST_CONST 18 * @uses TEST_CONST compared to subclass::$foo, we 19 * die() if not found 20 */ 21 22 function parent_method() 23 { 24 if ($this -> foo== 9) die; 25 $test = new subclass; 26 $a = $test-> foo; 27 if ($a == TEST_CONST) die; 28 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 92 of 1382

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

} /** * this class extends main_class. * @usedby main_class::parent_method() sets a temporary variable */ subclass extendsmain_class { /** * @var integer * @usedby main_class::parent_method() this is compared to TEST_CONST */ var $foo = 9; } /** * @usedby main_class::parent_method() compared to subclass::$foo, we * die() if not found */ define("TEST_CONST" ,"foobar" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 93 of 1382

@var
Document the data type of a class variable

Description
You may use the @var tag to document the data type of class variables.

The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object, or simply "mixed". phpDocumentor will display the optional description unmodified, and defaults to "mixed" if the datatype is not present

Example
Here's an example:

1 class class1 2 { 3 /** 4 * example of documenting a variable's type 5 * @var string 6 */ 7 var $variable ; 8 /** 9 * example of documenting a variable's type 10 * @var string contains class1 information 11 */ 12 var $variable_with_desc ; 13 /** 14 * this variable is documented as type "mixed" since no @var tag is present 15 */ 16 var $mixed_variable ; 17 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 94 of 1382

@version
Version of current element

Description
Documents the version of any element, including a page-level block

NEW v1.2 - @version is now inherited by child classes from a parent class, see inline {@inheritdoc}.

Example
phpDocumentor displays a @version string without modification, so it may be used in any way you'd like:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

/** * example of @version tag with CVS tag * @version $Id: tags.version.pkg,v 1.2 2006-04-29 04:08:27 cellog Exp $; */ function datafunction() { } /** * Custom version string * @version customversionstring1.0 */ class blah { }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 95 of 1382

phpDocumentor Inline tags


How to use Inline tags in DocBlocks and in Tutorials

Inline Tags Manual


Welcome to the phpDocumentor Inline Tags Manual

Unlike regular tags (see phpDocumentor tags), Inline tags display in the text flow where they appear. As of version 1.2, there are several inline tags. The allowed inline tag list is different for tutorials and regular in-code documentation.

Inline tags allowed in both tutorials and DocBlocks include: inline {@link} inline {@tutorial}

Inline tags allowed in only DocBlocks include: inline {@source} inline {@inheritdoc}

Inline tags allowed in only tutorials include: inline {@id} inline {@toc}

The example below will display the text "this function works heavily with foo() to rule the world" where foo() represents a hyperlink that links to the function foo()'s documentation.

1 /** 2 * inline tags demonstration 3 * 4 * this function works heavily with {@link foo()} to rule the world. If I want 5 * to use the characters "{@link" in a docblock, I just use "{@}link." If 6 * I want the characters "{@*}" I use "{@}*}" 7 */ 8 function bar() 9 { 10 } 11 12 function foo()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 96 of 1382

inline {@example}
Display source code of an example file inline

Description
Like the @example tag, the inline example tag can be used to parse an example file for syntax highlighting and linking to documentation. This versatile tag attempts to read the file from the full path specified, and will accept any path that http://www.php.net/fopen will accept. phpDocumentor checks the path to ensure that the file retrieved has a valid .php extension as defined in phpDocumentor.ini, and then opens the file. It will parse the file, and output syntax-highlighted source with line numbers, links to documentation and will then add a link to the documentation to that file.

If given an absolute path, phpDocumentor will not search for the example file any further. If given a relative path (no leading c:\ or /) phpDocumentor searches for examples files first in the directory specified by the -ed, -examplesdir command-line, if present. As of phpDocumentor 1.2.1, it will next search for the file in an examples/ subdirectory of the current file's directory. Otherwise, it will search for a subdirectory named "examples" in the top-level parsing directory, and if not found, in the top-level directory.

The top-level parsing directory is simply the directory that every file parsed has in common.

The inline {@source} tag serves a similar purpose, but instead of parsing a separate file, it parses the current function or method's source.

The {@example} tag has two optional parameters, the starting line number to display and the ending line number to display. If only the first parameter is present, {@example} will print the source code starting on that line number to the end of the function source code. If both parameters are present, {@example} will print an excerpt of the source code beginning on the starting line number, and concluding with the ending line number.

Example
Here's an example:

1 2 3 4 5 6 7 8 9 10 11 12 13 14

/** * My function * * Here is an inline example: * <code> * <?php * echo strlen('6'); * ?> * </code> * and using an external example file: * {@example /path/to/example.php} * * Display only the first 2 lines: * {@example /path/to/example.php 0 2}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 97 of 1382

15 16 17 18 19 20

* @example /path/to/example.php How to use this function * @example anotherexample.inc This example is in the "examples" subdirectory */ function mine() { }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 98 of 1382

inline {@id}
Used to control XML tutorial ids in refsects

Description
The {@id} inline tag is used only in tutorials/extended documentation. It is very simply designed to solve the problem of identifying sections for hyperlinking. For instance, in the DocBook Converter, id's are in the format package.packagename[.subpackagename].file[.sectionname], where file is either the classname, function/method name, or summary. In the other Converters, the id is not nearly as restrictive, but this inline tag allows for the potential of future converters that are equally exacting. Use <refsect1 id="{@id idname}"> in the tutorial (tutorialname.pkg/tutorialname.cls/tutorialname.proc) to do this.

The {@id} tag is context-sensitive, and will pre-pend the id of the current refsect1, refsect2, or refsect3 to any {@id}, allowing further error control.

Caution The sectionname may only consist of lower-case letters, numbers, and hyphens "-." No other characters are allowed Here is an example of how {@id} must be used

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

<refentry id=" {@id}" > <refnamediv> <refname> Main Title</refname> <refpurpose> Description of tutorial</refpurpose> </refnamediv> <refsynopsisdiv> <refsynopsisdivinfo> <author> Gregory Beaver </author> <copyright> Copyright 2002, Gregory Beaver</copyright> </refsynopsisdivinfo> </refsynopsisdiv> <refsect1 id=" {@id section}" > <title> First Section Title</title> <para> Note that the id parameter must be within quotes and there must be no whitespace on either side. id=&quot; {@id section}&quot; will break the id parsing </para> <para> This section's name is &quot;packagesubpackagetutorial.ext.section&quot; by default. The HTML/CHM converters name it &quot;section,&quot; the XML converter names it &quot;package.subpackage.tutorial-ext.section&quot; </para>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 99 of 1382

27 28 29 30 31 32 33 34 35 36 37

<refsect2 id=" {@id subsection}" > <title> Subsection Title</title> <para> This section inherit's the refsect1's id, and is named &quot;packagesubpackagetutorial.ext.section.subsection&quot; or &quot;section.subsection&quot; for HTML/CHM, and &quot;package.subpackage.tutorial-ext.section.subsection&quot; in XML </para> </refsect2> </refsect1> </refentry>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 100 of 1382

inline {@internal}}
Mark documentation as private, internal to the software project in text flow

Description
Caution Unlike other inline tags, {@internal}} may contain other inline tags due to its purpose. To terminate an {@internal}} inline tag, you must use two ending brackets "}}" Use {@internal}} to facilitate the creation of two sets of documentation, one for advanced developers or for internal company use, and the other for the general PHP public. Use this inline tag or its cousin, @internal

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 101 of 1382

inline {@inheritdoc}
Used to directly inherit the long description from the parent class in child classes

Description
The {@inheritdoc} inline tag is used in the DocBlocks of classes, methods and class variables of child classes. phpDocumentor will automatically inherit the @author tag, @version tag, and @copyright tag from a parent class. In addition, if there is no documentation comment present, it will inherit the parent's documentation.

Note that if the {@inheritdoc} inline tag is not present, and a child class is undocumented, the child class will still attempt to inherit documentation from the parent class as is. {@inheritdoc} allows flexibility of where to put documentation from the parent class in a child class's documentation.

Example
In some cases, the child class may want to simply augment the parent class's documentation. This is the primary purpose {@inheritdoc} was designed for. For example:

1 /** 2 * Makes bars 3 * 4 * This class generates bars using the main algorithm. 5 */ 6 class bar 7 { 8 } 9 10 /** 11 * Makes chocolate bars 12 * 13 * There are two aspects to this class. 14 * {@inheritdoc } In addition, the foo class 15 * makes the bars chocolate 16 */ 17 class foo extends bar 18 { 19 }

This source code will parse as if it was:

1 2 3 4 5 6 7

/** * Makes bars * * Generates bars using the main algorithm. */ class bar {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 102 of 1382

8 } 9 10 /** 11 * Makes chocolate bars 12 * 13 * There are two aspects to this class. 14 * This class generates bars using the main algorithm. In addition, the foo class 15 * makes the bars chocolate 16 */ 17 class foo extends bar 18 { 19 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 103 of 1382

inline {@link}
Display a link to a URL, or link to an element's documentation in the the flow of descriptive text

Description
The inline {@link} tag is used to document any element (page, global variable, include, class, function, define, method, variable).

New in version 1.2: You can link to any defined function in the current php version using the function's name. This linking is done using the standard php function http://www.php.net/get_defined_functions, and so relies on the version of php that is used to execute phpDocumentor. A benefit of this method is that the function highlighting will automatically upgrade with a php upgrade without any change to the underlying code. You may also link directly to any portion of the php website using the fake package override PHP_MANUAL (as in PHP_MANUAL#get_defined_functions, or PHP_MANUAL#support.php).

Caution inline {@link} displays links directly in the natural text flow of a DocBlock. If you want to display links prominently after descriptive text, use @see or @link. For parameter information, see @see or @link. The guidelines for giving the element name to inline @link are the same as outlined in the @see manual page.

Example
The inline {@link} differs from ordinary non-inline tags. Inline tags parse and display their output directly in the documentation. In other words, this DocBlock:

1 /** 2 * Text with a normal @see and @link tag 3 * (the parentheses in "element()" are only necessary 4 * because it is a function) 5 * @see element() 6 * @link http://www.example.com 7 */ 8 function element() 9 { 10 }

Parses as (with -o HTML:frames:default):

1 2 3

<H3> element</H3> <P><B> element ( )</B></P> <!-- ========== Info from phpDoc block ========= -->

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 104 of 1382

4 <b> </b> 5 <pre> 6 Text with a normal @see and @link tag (the parentheses in "element()" are only necessary because it is a function) 7 </pre> 8 <DL> 9 <DT> Function Parameters:</DT> 10 11 12 <DT> Function Info:</DT> 13 <DD><b> See</b> - <CODE><a href="../default/_fake_page_php.html#element" > element()</a></CODE></DD> 14 <DD><b> Link</b> - <CODE><a href="www.example.com" > www.example.com</a></CODE></DD> 15 16 </DL> 17 18 <HR>

1 2 3 4 5 6 7 8 9

/** * Text with an {@link http://www.example.com Inline Link to a Hyperlink} and an inline * link to {@link element()} displays without a break in the flow * (again, the parentheses in "element()" are only necessary * because it is a function) */ function element() { }

Parses as (with -o HTML:frames:default):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

<H3> element</H3> <P><B> element ( )</B></P> <!-- ========== Info from phpDoc block ========= --> <b> </b> <pre> Text with an <a href="http://www.example.com" > Inline Link to a Hyperlink</a> and an inline link to <a href="../default/_fake_page_php.html#element" > element()</a> displays without a break in the flow (again, the parentheses in "element()" are only necessary because it is a function) </pre> <DL> <DT> Function Parameters:</DT>

<DT> </DL> <HR>

Function Info:</DT>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 105 of 1382

inline {@source}
Display source code of a function or method in the long description

Description
The {@source} inline tag is used in the DocBlock of functions or methods to extract source code of the function/method for display in generated documentation. This tag is designed to allow detailed line-by-line description of how a function works without having to cut and paste from the source. This allows modification to the source and automatic update of documentation so that it remains current.

Example
The inline {@source} differs from all ordinary tags. Inline tags parse and display their output directly in the documentation. In other words, this DocBlock:

1 2 3 4 5 6 7

/** * Text with a normal tag, @copyright * @copyright Copyright 2002, Greg Beaver */ function element() { }

will display normal documentation.

This DocBlock:

1 /** 2 * Text with an inline source tag: 3 * 4 * {@source } 5 * displays without a break in the flow 6 */ 7 function element( $pages) 8 { 9 if (empty( $pages)) 10 { 11 die( "<b>ERROR</b>: nothing parsed" 12 } 13 }

);

will display the complete source inside the documentation as if we had typed it out

1 2

/** * Text with an inline source tag:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 106 of 1382

3 4 5 6 7 8 9 10 11 12 13 14

* * <code> * function element($pages) *{ * if (empty($pages)) * { * die("<b>ERROR</b>: nothing parsed"); * } *} * </code> * displays without a break in the flow */

The {@source tag has two optional parameters, the starting line number to display and the ending line number to display. If only the first parameter is present, {@source} will print the source code starting on that line number to the end of the function source code. If both parameters are present, {@source} will print an excerpt of the source code beginning on the starting line number, and concluding with the ending line number.

1 /** 2 * Text with an inline source tag: 3 * 4 * {@source 3} 5 * displays without a break in the flow 6 */ 7 function element( $pages) 8 { 9 if (empty( $pages)) 10 { 11 die( "<b>ERROR</b>: nothing parsed" 12 } 13 foreach ($test as $hello ) 14 { 15 echo " I love $hello " ; 16 } 17 }

);

Parses as if we had coded:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

/** * Text with an inline source tag: * * <code> * if (empty($pages)) * { * die("<b>ERROR</b>: nothing parsed"); * } * foreach($test as $hello) * { * echo "I love $hello"; * } *} * </code> * displays without a break in the flow */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 107 of 1382

1 /** 2 * Text with an inline source tag: 3 * {@source 3 1} 4 * displays without a break in the flow 5 */ 6 function element( $pages) 7 { 8 if (empty( $pages)) 9 { 10 die( "<b>ERROR</b>: nothing parsed" 11 } 12 foreach ($test as $hello ) 13 { 14 echo " I love $hello " ; 15 } 16 }

);

Parses as if we had coded:

1 2 3 4 5 6 7 8

/** * Text with an inline source tag: * * <code> * if (empty($pages)) * </code> * displays without a break in the flow */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 108 of 1382

inline {@toc}
Display a table of contents of all {@id}s declared in a file

Description
The inline {@toc} tag is used as a sub-element of the <refentry> tag to display a table of contents of the current tutorial. This table of contents is generated directly by a call to Converter::formatTutorialTOC().

Example
This sample tutorial:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

< refentry id="{@id}" > < refnamediv> < refname>{@} toc} example</ refname> < refpurpose> Uses {@}toc} to generate a table of contents</ refpurpose> </ refnamediv> {@toc} < refsect1 id="{@id one}" > < title> First section</ title> </ refsect1> < refsect1 id="{@id two}" > < title> Second section</ title> < refsect2 id="{@id sub}" > < title> Sub-section</ title> </ refsect2> </ refsect1> < refsect1 id="{@id three}" > < title> Third section</ title> </ refsect1> </ refentry>

Will parse as if it were

1 2 3 4 5 6 7 8 9 10 11 12 13 14

< < < < </

refentry id="{@id}" > refnamediv> refname>{@} toc} example</ refname> refpurpose> Uses {@}toc} to generate a table of contents</ refpurpose> refnamediv>

< refsect1> < itemizedlist> < listitem>< para>{@ tutorial mytutorial#one}</para></listitem> < listitem>< para>{@ tutorial mytutorial#two} < itemizedlist> < listitem>< para>{@ tutorial mytutorial#two.sub}</para></listitem> </ itemizedlist> </ para></ listitem>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 109 of 1382

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

< listitem>< </ refsect1> < < </ < < < < </ </ < < </ </

para>{@

tutorial mytutorial#three}</para></listitem>

refsect1 id="{@id one}" > title> First section</ title> refsect1> refsect1 id="{@id two}" > title> Second section</ title> refsect2 id="{@id sub}" > title> Sub-section</ title> refsect2> refsect1> refsect1 id="{@id three}" > title> Third section</ title> refsect1> refentry>

The format of the table of contents is Converter-dependent, and for the converters supplied with phpDocumentor, can be set up through the use of tutorial_toc.tpl in the template for tremendous customization control

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 110 of 1382

inline {@tutorial}
Display a link to a tutorial in the the flow of descriptive text

Description
The inline {@tutorial} tag is used in any context to link to the documentation for a tutorial.

Caution inline {@tutorial} displays links directly in the natural text flow of a DocBlock. If you want to display links to a tutorial prominently after descriptive text, use @tutorial

Example
The inline {@tutorial} differs from ordinary non-inline tags. Inline tags parse and display their output directly in the documentation. In other words, this DocBlock:

1 2 3 4 5 6 7

/** * Text with a normal @tutorial tag * @tutorial phpDocumentor/phpDocumentor.pkg */ function element() { }

Parses as (with -o HTML:frames:default):

Example: role = "html"<H3>element</H3> <P><B>element ( )</B></P> <!-- ========== Info from phpDoc block ========= --> <b></b> <pre> Text with a normal @tutorial tag </pre> <DL> <DT>Function Parameters:</DT>

<DT>Function Info:</DT> <DD><b>Tutorial</b> - <CODE><a href="../phpDocumentor/tutorial_phpDocumentor.pkg.html">phpDocumentor 1.2.2 Tutorial</a></CODE></DD> </DL>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 111 of 1382

<HR>

1 2 3 4 5 6 7

/** * Text with an inline link to {@tutorial phpDocumentor/phpDocumentor.pkg} displays * without a break in the flow */ function element() { }

Parses as (with -o HTML:frames:default):

Example: role = "html"<H3>element</H3> <P><B>element ( )</B></P> <!-- ========== Info from phpDoc block ========= --> <b></b> <pre> Text with an an inline link to <a href="../phpDocumentor/tutorial_phpDocumentor.pkg.html">phpDocumentor 1.2.2 Tutorial</a> displays without a break in the flow </pre> <DL> <DT>Function Parameters:</DT>

<DT>Function Info:</DT> </DL> <HR>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 112 of 1382

Writing a New Converter


Overview of how to write a new Converter
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

Introduction to Converters
This documentation deals only with the advanced programming topic of creating a new output converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to extend an existing Converter, read Converter Manual

Basic Concepts
Abstract Parsing Data
Source Code Elements
A Converter's job is to take abstract data from parsing and create documentation. What is the abstract data? phpDocumentor is capable of documenting tutorials, and a php file and its re-usable or structurally important contents. In other words, phpDocumentor can document: A XML DocBook-based tutorial (see phpDocumentor Tutorials) Procedural Page (PHP source file) Include Statements Define Statements Global Variables Functions Classes Class Variables Class Methods

phpDocumentor represents these PHP elements using classes: parserTutorial parserData, parserPage parserInclude parserDefine parserGlobal parserFunction parserClass parserVar

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 113 of 1382

parserMethod

This relationship between the source code and abstract data is quite clear, and very simple. The data members of each abstract representation correspond with the information needed to display the documentation. All PHP elements contain a DocBlock, and this is represented by a class as well, parserDocBlock. The elements of a DocBlock are simple: Short Description, containing any number of inline tags Long Description, containing any number of inline tags Tags, some containing any number of inline tags in their general description field

phpDocumentor represents these elements using classes as well: parserDesc for both short and long descriptions parserInlineTag for inline tags parserTag for regular tags

HTML-specific issues
There are some other issues that Converters solve. In HTML, a link is represented by an <a> tag, but in the PDF Converter, it is represented by a <c:ilink> tag. How can we handle both cases? Through another abstract class, the abstractLink and its descendants: tutorialLink pageLink defineLink globalLink functionLink classLink varLink methodLink Note the absence of an "includeLink" class - this is intentional, as only re-usable elements need to be linked. An include statement is always attached to the file that it is in, and cannot be anywhere else.

These abstract linking classes contain the information necessary to differentiate between the location of any of the element's documentation. They are only used to allow linking to documentation, and not to source code. A link is then converted to the appropriate text representation for the output format by Converter::returnSee() (a href=link for html, c:ilink:link for pdf, link linkend=link in xml:docbook, and so on).

The other issues solved by a converter involves html in a DocBlock. To allow better documentation, html is allowed in DocBlocks to format the output. Unfortunately, this complicates output in other formats. To solve this issue, phpDocumentor also parses out all allowed HTML (see phpDocumentor Tutorial for more detailed information) into abstract structures: <b> -- emphasize/bold text <br> -- hard line break, may be ignored by some converters <code> -- Use this to surround php code, some converters will highlight it <i> -- italicize/mark as important <li> -- list item <ol> -- ordered list

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 114 of 1382

<p> -- If used to enclose all paragraphs, otherwise it will be considered text <pre> -- Preserve line breaks and spacing, and assume all tags are text (like XML's CDATA) <ul> -- unordered list is mapped to classes: parserB parserBr parserCode parserI parserList - both types of lists are represented by this object, and each <li> is represented by an array item parserPre <p> is represented by partitioning text into an array, where each array item is a new paragraph. (as in parserDocBlock::$processed_desc)

With these simple structures and a few methods to handle them, the process of writing a new converter is straightforward.

Separation of data from display formatting


phpDocumentor has been designed to keep as much formatting out of the source code as possible. For many converters, there need be no new code written to support the conversion, as all output-specific information can be placed in template files. However, the complexity of generating class trees does require the insertion of some code into the source, so at the bare minimum, the getRootTree() method must be overridden.

Methods that must be overridden


Creating a new converter can be challenging, but should not be too complicated. You need to override one data structure, Converter::$leftindex, to tell the Converter which of the individual element indexes your Converter will use. You will also need to override a few methods for the Converter to work. The most important relate to linking and output.

A Converter must override these core methods: Convert() - take any descendant of parserElement or a parserPackagePage and convert it into output returnSee() - takes a abstract link and returns a string that links to an element's documentation returnLink() - takes a URL and text to display and returns an internet-enabled link Output() - generate output, or perform other cleanup activities Convert_RIC() - Converts README/INSTALL/CHANGELOG file contents for inclusion in documentation ConvertErrorLog() - formats errors and warnings from $phpDocumentor_errors. see HTMLframesConverter::ConvertErrorLog() getFunctionLink() - for all of the functions below, see HTMLframesConverter::getFunctionLink() for an example getClassLink() getDefineLink() getGlobalLink() getMethodLink() getVarLink()

A Converter may optionally implement these abstract methods:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 115 of 1382

endPage() - do any post-processing of procedural page elements, possibly output documentation for the page endClass() - do any post-processing of class elements, possibly output documentation for the class formatIndex() - format the $elements array into an index see HTMLframesConverter::generateElementIndex() formatPkgIndex() - format the $pkg_elements array into an index see HTMLframesConverter::generatePkgElementIndex() formatLeftIndex() - format the $elements array into an index see HTMLframesConverter::formatLeftIndex() formatTutorialTOC() - format the output of a {@toc} tag, see HTMLframesConverter::formatTutorialTOC() getRootTree() - generates an output-specific tree of class inheritance SmartyInit() - initialize a Smarty template object writeSource() - write out highlighted source code for a parsed file writeExample() - write out highlighted source code for an example unmangle() - do any post-processing of class elements, possibly output documentation for the class

The following methods may need to be overridden for proper functionality, and are for advanced situations. checkState() - used by the parserStringWithInlineTags::Convert() cache to determine whether a cache hit or miss occurs getState() - used by the parserStringWithInlineTags::Convert() cache to save state for the next Convert() call type_adjust() - used to enclose type names in proper tags as in XMLDocBookConverter::type_adjust() postProcess() - called on all converted text, so that any illegal characters may be escaped. The HTML Converters, for example, pass all output through http://www.php.net/htmlentities getTutorialId() - called by the {@id} inline tag to get the Converter's way of representing a document anchor

Converter methods an extended converter should use


getSortedClassTreeFromClass() -- generating class trees by package hasTutorial() -- use this to retrieve a tutorial, or determine if it exists getTutorialTree() -- use this to retrieve a hierarchical tree of tutorials that can be used to generate a table of contents for all tutorials vardump_tree() -- use this to assist in debugging large tree structures of tutorials

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 116 of 1382

Converter Default Template Variables


Basic Template Variables Available for Use by a New Converter

Introduction to Converter Template Variables


As of phpDocumentor version 1.2.0rc1, all Converters share certain template variables in common. This is made possible by the common use of the Smarty template engine. Smarty makes it possible to truly separate data from its display, allowing ultimate control of the display through the templates.

Smarty
What is Smarty? This is a versatile compiling template engine, and has its home page at http://smarty.php.net, please read the manual and the tutorials if you are unfamiliar with Smarty. This tutorial only describes how to use the templates, and will be confusing if you have never used Smarty before. In particular, you must understand fully how to use the {section} and {foreach} tags. Please read http://smarty.php.net/manual/en/language.function.section.php and http://smarty.php.net/manual/en/language.function.foreach.php

All template files have available to them these smarty variables: {$date} string - the current date and time, as formatted by date("r",time) {$maintitle} string - the contents of the phpDocumentor Tutorial command-line switch {$package} string - the package of the current template item {$subpackage} string - the subpackage of the current template item {$phpdocversion} string - the version number of phpDocumentor {$phpdocwebsite} string - the official phpDocumentor website (http://www.phpdoc.org)

Common Source Code Element Template Variables


Source code elements are described in Documentable PHP Elements. For most converters, documented elements are split up into two categories: class and procedural page. The template variables that contain this information are also grouped in this manner.

The source code elements (function, include, global variable, define, class, class variable, method) all have a few template variables in common. They are: {$sdesc} string - Summary from the DocBlock {$desc} string - Long description from the DocBlock {$tags} array - Tags found in the DocBlock, array('keyword' => tagname, 'data' => description). access in this manner: {section name=sec loop=$tags}{$tags[sec].keyword} = {$tags[sec].data}{/section} or {foreach from=$tags item=tag}{$tag.keyword} = {$tag.data}{/foreach} {$api_tags} array - Tags found in the DocBlock useful in documenting the API, array('keyword' => tagname, 'data' => description). Access in the same manner as {$tags} {$info_tags} array - Tags found in the DocBlock that are purely informational in nature, offering no particular use in documenting the actual software API, array('keyword' => tagname, 'data' => description). Access in the same manner as {$tags}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 117 of 1382

{$utags} array - Unknown tags found in the DocBlock, array('keyword' => tagname, 'data' => description). Access in the same manner as {$tags} {$line_number} integer - The line number in the source code that this element appears {$id} string - EXCEPT for include, all elements have a unique ID. This should be used to create a document anchor that will allow hyperlinking to that element's documentation.

Procedural Page Conversion


Procedural Page Converter variables
The Converter::ConvertPage() method sets up several important variables that are used by the other conversion methods. These are: Converter::$page_data - the Smarty template that contains all procedural page contents Converter::$path - the full path to the procedural page Converter::$page - the converter-safe name of the procedural page, can be used to uniquely name output Converter::$curpage - the parserPage representation of the current procedural page

Procedural Page template variables


There are many template variables assigned to the procedural page template: {$name} string - the name of the file "file.php" {$source_location} string - the relative path of the file, needed for an include statement {$classes} array - an array of classes defined in the file, see Converter::getClassesOnPage() {$tutorial} string|false - a link to the tutorial associated with this page, or false if none {$sdesc} string - summary of the procedural page from the Page-level DocBlock {$desc} string - long description of the procedural page from the Page-level DocBlock {$tags} array - array of all tags, array('keyword' => tagname, 'data' => description) {$utags} array - array of all unknown tags, array('keyword' => tagname, 'data' => description). This variable is unused in the templates packaged with phpDocumentor, and should be accessed in exactly the same manner that {$tags} is accessed. functions, includes, defines, globals array - these arrays contain all of the procedural elements defined in the file

Function template variables


The function and method template variables are nearly identical. The only template variable that functions use that methods do not is {$function_conflicts}, as methods cannot have conflicts. The function template variables are: {$function_name} string - simple name of the function {$params} array - Function parameters, array('var' => parameter name, 'datatype' => parameter type, 'data' => parameter description). The last two items are pulled from a @var tag. {$function_return} string - data type that the function returns {$function_conflicts} array - array('conflicttype' => 'function', 'conflicts' => array(link to docs of conflicting function 1, ...)) {$function_call} string - pre-formatted function declaration, use as is {$ifunction_call} array - special unformatted function declaration, use to customize for special purposes. All of the templates distributed with phpDocumentor use this template variable. Writing template code for this variable is complex. It may be best to copy over code from existing templates and modify it as needed. The {$ifunction_call} template variable is formatted by parserFunction::getIntricateFunctionCall(), and the documentation for that method describes its format in detail.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 118 of 1382

All functions are appended to the {$functions} template variable of the procedural page that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Global variable template variables


Global variables templates are pretty simple. They contain the standard element template variables plus: {$global_name} string - Name of the global variable {$global_type} string - Data type of the global variable {$global_value} string- Initial value of the global variable as parsed from the source, if any {$global_conflicts} array|false - array('conflicttype' => 'global variables', 'conflicts' => array(link to docs of conflicting global variable 1, ...))

All global variables are appended to the {$globals} template variable of the procedural page that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Define constants template variables


Define constant templates are also pretty simple. They contain the standard element template variables plus: {$define_name} string- Name of the constant {$define_value} string- Value of the constant as parsed from the source {$define_conflicts} array|false - array('conflicttype' => 'defines', 'conflicts' => array(link to docs of conflicting define 1, ...))

All define constants are appended to the {$defines} template variable of the procedural page that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Include statements template variables


Include statement templates are the simplest of all. They contain the standard element template variables plus: {$include_name} string - the kind of include (include/require/include_once/require_once) {$include_value} string - The file included. If the file is parsed, a link to its documentation will be passed instead of just the name of the file.

All include statements are appended to the {$includes} template variable of the procedural page that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Class Conversion
Class Converter Variables
Like ConvertPage(), the Converter::ConvertClass() method sets up a few important variables that are used by the other conversion methods. These are: Converter::$class_data - the Smarty template that contains all class contents for this class Converter::$class - the name of the current class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 119 of 1382

Class Template Variables


There are many template variables assigned to the procedural page template aside from the standard element template variables: {$class_name} string - the name of the class {$package} string - the package of the class {$source_location} string - the include path to the file that contains this class {$children} array - array(array('link' => link to class that extends this class, 'sdesc' => summary of child class), ...) {$class_tree} string - fully-formatted class tree (Converter-specific). Use unmodified. {$conflict} array - array('conflicttype' => 'classes', 'conflicts' => array(link to docs of conflicting class 1, ...)) {$ivars} array - complex array of all inherited variables, see Converter::getFormattedInheritedVars() {$imethods} array - complex array of all inherited variables, see Converter::getFormattedInheritedMethods() vars, methods array - these template variables will contain each of the class variables and method template variables.

Class variable template variables


The Class variable template variables are: {$var_name} string - simple name of the class variable {$var_default} string - Default value of the class variable, if any {$var_type} string - data type of the variable, from the @var tag. {$var_overrides} array - array('link' => link to documentation for overridden class variable, 'sdesc' => summary of overridden class variable) The {$ifunction_call} template variable is formatted by parserFunction::getIntricateFunctionCall(), and the documentation for that method describes its format in detail.

All class variables are appended to the {$vars} template variable of the class that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Function template variables


The function and method template variables are nearly identical. See Function template variables for details. The template variables that methods use and functions do not use are: {$constructor} boolean - true/false, true if the method is a constructor {$descmethod} array - array(array('link'=>link to documentation for overriding method, 'sdesc'=> summary of the overriding method),...) {$method_overrides} array - array('link'=>link to documentation for overridden method, 'sdesc'=> summary of the overridden method)

All methods are appended to the {$methods} template variable of the class that contains them. In version 2.0, there will be greater flexibility possible with locating template variables.

Tutorial template variables


{$contents} string - Converted contents of the tutorial {$title} string - Title of the tutorial {$nav} string - true/false, Whether any navigation links to other tutorials exist {$up} string - link to the parent tutorial of this tutorial {$uptitle} string - title of the parent tutorial {$prev} string - link to the previous tutorial in the tutorial hierarchy {$prevtitle} string - title of the previous tutorial

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 120 of 1382

{$next} string - link to the next tutorial in the tutorial hierarchy {$nexttitle} string - title of the next tutorial

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 121 of 1382

Writing a Converter, Methods


Learn what methods need to be defined in a new Converter

Introduction to Converter Methods


This Tutorial describes the methods that a New Converter must use to become fully functional. A great deal of functionality is handled by the parent Converter class, and a child converter's only job is to convert sorted data from abstract classes into full-fledged output.

There are literally no restrictions on how a converter does its job. If the predefined Converter::walk() method does not do anything a converter needs to do, all one needs to do is override walk() and perform any necessary processing directly on the parsed elements. Be forewarned that this is a bit like trying to fix a problem in a program by tinkering with the operating system, and we cannot be even in the slightest responsible for any suffering you might incur.

Having said that nasty disclaimer, let's begin with the good news. The only thing a standard converter needs to know is that it must define a few methods. The only crucial methods to define are Convert(), returnSee(), and returnLink().

The Convert() method expects it will be passed all parsed data. Data will be passed either by file or by package, but in either case, all data will pass through Convert(), and so must be handled by it. Good programming practice suggests having one method for every parsed element, and that is what the bundled Converters do.

returnSee() is the core of phpDocumentor's advanced linking @see, @tutorial, inline {@tutorial} and inline {@link}. returnLink() handles hyperlinks to URLs on the internet.

Beyond these three essential methods, there are a slew of methods that assist phpDocumentor in creating its advanced source highlighting feature, in creating an error log and todo list, and a few advanced functions that speed up conversion through a cache. Beyond this, there are many helper functions that assist in the creation of indexes, class trees, inheritance and conflict information, and so on. phpDocumentor does not restrict their use, to allow for future possibilities.

For most cases, it is best to start writing a new converter by copying the code from one of the existing converters, and then begin modifying methods to generate the appropriate output. In addition, this will leverage the existing use of the Smarty template engine to separate specifics of output formatting from the data source. In theory, one could create a single converter and use many templates for creating different output, but this is often not possible because templates are still organized into files, and this is invariant. In the future of phpDocumentor, we may have a base converter from which all other converters can extend, greatly simplifying development. For now, development is still relatively easy, after the basic concepts behind phpDocumentor are grasped.

Converter core methods that must be overridden

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 122 of 1382

Convert()
The Converter::Convert() method is called by Converter::walk() to process all Converter classes: parserData - representation of a file parserInclude - representation of include statements parserDefine - representation of define statements parserFunction - representation of functions parserGlobal - representation of global variables parserClass - representation of a class parserVar - representation of class variables parserMethod - representation of class methods parserPage - representation of old Package Pages (deprecated) parserTutorial - representation of tutorials (like what you are reading now) It is up to this method to distribute processing of these elements, or do any post-processing that is necessary. All of the converters included with phpDocumentor process elements by passing them to individual Convert*() methods like HTMLframesConverter::ConvertClass(), and one can simply copy this style, or write a completely new method.

Data is passed to the Converter organized by file, procedural elements first followed by class elements, unless Converter::$sort_absolutely_everything is set to true. Then data is passed organized by package, with all files and procedural elements first, followed by all class elements. The PDFdefaultConverter set $sort_absolutely_everything = true, and HTML converters set $sort_absolutely_everything = false

returnSee()
This method takes a abstractLink class descendant and converts it to an output-format compatible link to an element's documentation. HTML converters convert the link to an <a href=""> tag, the XML converter changes it to a <link linkend=""> tag, etc. This function is also responsible for distinguishing between sections of documentation. All information needed to distinguish between elements is included in the data members of a link class, it is up to the returnSee() method to translate that into a unique string identifier. A good strategy is to write a function that takes a link class and returns a unique identifier as in XMLDocBookConverter::getId(), and then reference this function to grab identification strings for defining anchors in the generated output.

returnLink()
This method takes a URL and converts it to an external link to that URL in the appropriate output format. In HTML, the link will be a standard <a href= tag.

Output()
This method is called at the end of the walk() method. It may be used to generate output or do any necessary cleanup. Nothing is required of Output, and it may do nothing as it does in the HTML converters, which write output continuously as converting, or perform special operations as in CHMdefaultConverter::Output().

Convert_RIC()
This method is called to format the contents of README, INSTALL, CHANGELOG, NEWS, and FAQ files grabbed from the base parse directory. This function allows standard distribution files to be embedded in generated documentation. A Converter should format these files in a monospace font, if possible.

ConvertErrorLog()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 123 of 1382

This method is called at the end of parsing to convert the error log into output for viewing later by the developer. Error output is very useful for finding mistakes in documentation comments. A simple solution is to copy the HTMLframesConverter::ConvertErrorLog() function and the errors.tpl template file to the new converter. The error log should not be embedded in generated output, as no end-user wants to see that information.

getFunctionLink()
This function should call Converter::getFunctionlink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserFunction::getLink() method.

getClassLink()
This function should call Converter::getClasslink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserClass::getLink() method.

getDefineLink()
This function should call Converter::getDefinelink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserDefine::getLink() method.

getGlobalLink()
This function should call Converter::getGloballink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserGlobal::getLink() method.

getMethodLink()
This function should call Converter::getMethodlink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserMethod::getLink() method.

getVarLink()
This function should call Converter::getVarlink(), and then use returnSee() to return a string containing a converter-specific link. Code can literally be copied from any of the converters. This function is called by the parserVar::getLink() method.

Abstract Methods that must be overridden


endPage()
This method is called by the Converter::walk() method when all procedural and class elements on a page have been processed. The purpose is to allow the converter to reset any state variables that apply to the page. endPage() is not called by Converter::walk_everything() and so if your converter sets Converter::$sort_absolutely_everything = true, you will not need to implement this method.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 124 of 1382

endClass()
This method is called by the Converter::walk() method when all class elements (methods, variables) in a class have been processed. The purpose is to allow the converter to reset any state variables that apply to the page. endPage() is not called by Converter::walk_everything() and so if your converter sets Converter::$sort_absolutely_everything = true, you will not need to implement this method.

formatIndex()
This method is called before processing any elements, and is not required to do anything. The intent is to allow processing of a global element index to occur in a separate method, which logically separates activities performed by the Converter. See the HTMLframesConverter::formatIndex() method for details on one possible implementation

formatPkgIndex()
Like formatIndex(), this method is called before processing any elements, and is not required to do anything. The intent is to allow processing of a package-level index to occur in a separate method, which logically separates activities performed by the Converter. See the HTMLframesConverter::formatPkgIndex() method for details on one possible implementation

formatLeftIndex()
Like formatIndex(), this oddly-named method is called before processing any elements, and is not required to do anything. The name comes from the original JavaDoc design of putting an index in the lower left frame of output. The indexes needed by this function are automatically generated based on the value of Converter::$leftindex. These indexes are arrays of links organized by package and subpackage. Left indexes can be generated for files (procedural pages), functions, classes, constants (define statements), and global variables.

formatTutorialTOC()
This method is used to format the automatically generated table of contents from an inline {@toc} in a tutorial. The data structure passed is an array generated by parserTocInlineTag::Convert() that contains each entry. All that formatTutorialTOC needs to do is structure the inherent hierarchy of the original DocBook tutorial source according to the requirements of the output format. This is remarkably simple, and can often be implemented simply by passing the entire array to a template engine, as HTMLframesConverter::formatTutorialTOC() does.

getRootTree()
This is a very fast non-recursive method that generates a string containing class trees. In earlier phpDocumentor versions, the getRootTree() method was recursive, and both consumed too much memory and was very slow. It was also easier to understand. The data structure processed in the current version of phpDocumentor still contains the same information, but requires a precise algorithm to process. The good news is that we have worked out this algorithm for you, and to implement this method in a new converter, you need only copy the code from one of the existing converters. See Converter::getRootTree() for low-level details.

SmartyInit()
The primary template engine for phpDocumentor is the Smarty template engine. This utility function is used to initialize a new Smarty template object with pre-initialized variables. The Converter::newSmarty initializes several variables, see Converter::newSmarty() for details. If your converter needs to have variables available to every template, extend this function, and use Smarty::assign() to assign values to variables. Note that the

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 125 of 1382

function must use code that returns a reference like:

function &SmartyInit(&$templ) { $somevalue = "whatever you want, babe"; $templ->assign("variable",$somevalue); return $templ; }

writeSource()

writeExample()

unmangle()
This function is used by the pre-PHP 4.2.3 inline {@source} tag's parserInlineSourceTag::Convert() method to process output from http://www.php.net/highlight_string. In non-HTML converters, it should return an empty string. For advanced source highlighting, implement highlightSource(), highlightDocBlockSource().

Methods that may optionally be overridden


checkState()

getState()

type_adjust()
This method is passed type names from @param/@return/@var tags and can be used to enclose types in special formatting. The only converter that really uses this capability is the DocBook converter. Since the type name can be a link class, it is possible to determine what kind of element the type is, a constant, class, or anything that can be documented. For example, the DocBook converter encloses classes in <classname> tags, constants in <constant> tags, variables in <varname> tags, and also will enclose functions in <function> tags.

postProcess()
This method takes a string and should "escape" any illegal characters. For instance, in HTML, all "<" characters must be escaped to "<" entities. This is to prevent documentation comments from being interpreted as text modifiers in the output format.

getTutorialId()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 126 of 1382

This method is used to pass back a valid ID for a tutorial section. In HTML, most of the id is coded in the file containing the data, and only the section and subsection need to be used to differentiate sections. In DocBook, the id is packages.categoryname.packagename.subpackagename.class/filename.section.subsection, a much more involved scenario.

Utility methods
getSortedClassTreeFromClass()
This method is used by getRootTree() to create class trees for a package. Also see the docs in Converter::getSortedClassTreeFromClass()

hasTutorial()
This helper method is used to determine whether a particular tutorial has been parsed, and can be used to perform association between parsed elements and their tutorials

getTutorialTree()
This helper method returns a recursive data structure containing all tutorials in the table-of-contents style hierarchy that they should have in final output. This is used to create a table of contents for tutorials in the left frame of the HTML Converters, and in the PDF Converter, to determine indentation level in the top-level table of contents.

vardump_tree()
This function is a utility function. It performs what looks like a http://www.php.net/var_dump of any recursive data structure, but if it encounters an object, it only prints out its class and name if the $name data member exists. This allows checking of the tree structure without having to wade through pages of class information, and was very useful for debugging, so we added it for your use.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 127 of 1382

Converter Manual
Learn how to use and extend a Converter

phpDocumentor Converters Documentation


Detailed Documentation of the tag specification is available at phpDocumentor tags. Detailed information on phpDocumentor and a tutorial on basic usage is at: phpDocumentor Tutorial

If you are wondering how to extend the capabilities of phpDocumentor's output, this is the documentation you need. This documentation does not discuss how to document your code or project, and only deals with the specific requirements of extending phpDocumentor.

Internals: how phpDocumentor takes source code and generates documentation


phpDocumentor is divided into three logical components: Parser, IntermediateParser and Converter. These three divisions communicate through special method interfaces.

Parser internals
The Parser component does the work of reading the actual files, both source code and tutorial/manual files. For a detailed discussion of how to write a tutorial, see phpDocumentor Tutorials, or read the source files for phpDocumentor's manual in the tutorials/ subdirectory. The Parser encapsulates input into abstract classes, all of which are defined in seven files: DescHTML.inc DocBlockTags.inc InlineTags.inc ParserData.inc ParserElements.inc ParserDocBlock.inc PackagePageElements.inc The abstract classes are then passed to the Intermediate Parser. The IntermediateParser class organizes and processes abstract data passed in with the assistance of the ProceduralPages and Classes classes. All data is sorted alphabetically and then passed to the converters specified on the command-line one by one. Traditionally, the next step would be to generate output by passing the abstract data to a template engine. phpDocumentor has one more layer of separation to accomodate different output formats called "Converters." What is a Converter? To understand this, one must first understand the problem that Converters solve. Documentation is not always best viewed as a web page. Sometimes a user may want to print it out, or view it in XML with an interface program that can search or perform other advanced functions. Printing html does not work very well, and may look very different on different user's screens. To solve this problem, we need an interface between the parser and the template engine, hence the Converter.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 128 of 1382

On an even more basic level, the linking performed by phpDocumentor requires that the program pass over the data at least twice to set up relationships and create the @see, @tutorial, {@tutorial} and {@link} hyperlinks that make it such an effective tool. In earlier versions of phpDocumentor, the parser passed over the data twice, with significant redundancy and slow parsing times. In addition, the linking pass had to be first, and the order of parsing was important. In other words, if file A contains class B extends foo, and file B contains class foo, if file A is parsed before file B, no inheritance occurs between the classes (you can try this with phpDocumentor 0.4.2a and earlier, it breaks the parser). The Converter works with temporary data structures (all defined in ParserData.inc, ParserElements.inc, and ParserDocBlock.inc if you want a peek), and allows the linking pass to occur in-memory after parsing, with a significant speedup (almost twice as fast as earlier versions).

Adding a template
In most cases, it is possible to leverage the existing code to create spectacular output simply by writing a new set of templates for one of the existing Converters. To learn how to write templates for each specific converter, choose from the list below: Writing templates for the HTMLframes Converter Writing templates for the HTMLSmarty Converter Writing templates for the PDFdefault Converter Writing templates for the XMLDocBook Converter Writing templates for the CHMdefault Converter

Extending an existing Converter by writing your own Converter Class


If the existing converters work except for a small detail that could be fixed by adding a small patch to the source code of an output converter, then you need to extend a Converter. There are several straightforward rules that allow you to easily extend a Converter.

Rules for extending a Converter


First, the extended converter must be defined by a single word that would work as a valid filename. For an example, if the Converter extends the HTMLframesConverter, and provides search functionality in the generated documentation through the insertion of special php code into the generated files, it might be named "Search."

Once a name has been chosen, a subdirectory of the parent converter (HTMLframesConverter is in phpDocumentor/Converters/HTML/frames/) must be created with the same name as the child converter. So, for our "Search" Converter, the directory phpDocumentor/Converters/HTML/frames/Search/ must be created. Put your new Converter in a file called "HTMLframes SearchConverter.inc". Note the insertion of our new Converter's name before the word "Converter" in the filename.

Next, create a class declaration in the new HTMLframesSearchConverter.inc file as below:

1 2 3 4

/** * HTML output converter. * * This Converter takes output from the {@link Parser} and converts it to HTML-ready output for use with

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 129 of 1382

{@link Smarty}. 5 * Add any extra documentation about the search capabilities here 6 * @package Converters 7 * @subpackage HTMLframes 8 * @author Your Name <[email protected]> 9 */ 10 class HTMLframesSearchConverter extends Converter 11 { 12 /** 13 * frames/Search Converter wants elements sorted by type as well as alphabetically 14 * @see Converter::$sort_page_contents_by_type 15 * @var boolean 16 */ 17 var $sort_page_contents_by_type true; = 18 /** @var string */ 19 var $outputformat 'HTML'; = 20 /** @var string */ 21 var $name = 'frames/Search';

Note the var $name is set to the relative subdirectory. This is very important. Do not set the name to be "framesSearch", as the Converter::setTemplateDir() method uses this variable to set the template directory.

If the existing templates work fine, and there is some other change needed, set the name to be the same as the parent, and phpDocumentor will use the parent templates.

After extending the methods the new Search Converter will need, place the templates in a subdirectory named templates/ (as in phpDocumentor/Converters/HTML/frames/Search/templates/), just as they are used in the converters that come with phpDocumentor.

Using an extended Converter with phpDocumentor


After all this complexity of setting up the Converter, using it is straightforward. simply pass -o HTML:frames/Search:templatename to phpDocumentor's web interface or commandline!

Writing a Converter for a new output format


This topic is very large, and a separate manual entry is devoted entirely to this subject, Writing a New Converter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 130 of 1382

Using the PDFParser XML templating language


Learn how the PDFParser XML templating language is constructed and used

PDFParser Introduction
This documentation deals only with the PDFParser XML templating language. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual

Overview
The PDF:default Converter uses the powerful Cezpdf class library written by Wayne Munro. Although the Cezpdf library is very versatile and useful, it is designed to be used as PHP code, and does not allow access to its methods from the text passed to it. The PDFParser class was written to solve this problem. Through the use of a few basic XML-based tags, and the versatile <pdffunction /> tag, one can access any feature of the Cezpdf library and do anything that it can do. This is what makes it possible to use Smarty templates without modifying any code in phpDocumentor, a primary goal of the 1.2.0 release.

PDFParser XML tags


<text>
The <text> tag is a block tag (requires a closing tag). All output that is not a PDFParser tag must be enclosed in this tag. These are the parameters to the text tag: size (required) - font size any legal parameter to Cezpdf::ezText() (all optional): left - indentation from the left margin right - indentation from the right margin aleft - absolute indentation from the left side of the page aright - absolute indentation from the right side of the page justification - one of left, right, center/centre, full either leading or spacing

Examples might include: <text size="11">Hello World!</text> <text size="11" justification="right">Hello World!</text> <text size="11" left="10" right="10" justification="center">Hello World!</text>

<font>
Unlike HTML, the <font /> tag is a self-enclosed tag, and is only used to select the font face (and future

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 131 of 1382

versions will also select color). Syntax is <font face="fontface" /> The fontface must be present in the Converters/PDF/default/templates/fonts/ subdirectory as a fontface-php.afm and fontface.afm file, otherwise Cezpdf will cause all kinds of PHP warnings. This is an issue with Cezpdf that we are assisting the author in fixing, and will not be a problem in the future.

<newpage>
This is the simplest tag, use it as <newpage /> to tell Cezpdf to jump to the top of the next page in output.

<pdffunction>
The <pdffunction> tag is the most versatile of the PDFParser tags. This tag can be used to arbitrarily call any Cpdf or Cezpdf method. Arguments can be passed to the function both as literal values and using dynamic variables, both class variables and temporary variables. The method chosen is selected as if pdffunction were a namespace rather than a

Here are the parameters to the pdffunction: return (optional) set a temporary variable to the value returned from the function. This parameter allows a later reference to the temporary variable like: <pdffunction:getYPlusOffset return="newy" offset="0" /> <pdffunction:addJpegFromFile arg="logo.jpg" x="250" y=$newy /> any other parameter represents an argument. Since the parameters passed are simply passed by value to the method, the names can be anything that is useful to understanding how they work. <pdffunction:ezStartPageNumbers x="500" y="28" size="10" pos="" pattern="{ldelim}PAGENUM{rdelim} of {ldelim}TOTALPAGENUM{rdelim}" num="1" /> could just as easily be <pdffunction:ezStartPageNumbers arg="500" foo="28" bar="10" mylord="" goodnessgracious="{ldelim}PAGENUM{rdelim} of {ldelim}TOTALPAGENUM{rdelim}" num="1" /> and the code would still work splendidly. The first way is obviously easier to handle, and so is recommended.

Most arguments to the method will be literals, like numbers or strings, but some arguments may need to be more dynamic, based on the values returned from other pdffunction tags. To do this, use the return parameter as described above, and reference the temporary variable as if it were a php variable like <pdffunction:whatever arg=$tempvar /> It may even be necessary to access a data member of the pdf class. In this case, use $this->datamember as in <pdffunction:whatever arg=$this->datamember />

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 132 of 1382

Writing templates for the PDFdefault Converter


Learn which template variables are available for use in an HTML:frames template
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

PDF:default:* Introduction
This documentation deals only with adding a new template to the PDFdefault Converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 133 of 1382

Writing templates for the CHMdefault Converter


Learn which template variables are available for use in an CHM:default template
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

CHM:default:* Introduction
This documentation deals only with adding a new template to the CHMdefault Converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual To generate a CHM file, go to http://go.microsoft.com/fwlink/?LinkId=14188 and download Microsoft's Help Workshop.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 134 of 1382

Writing templates for the XMLDocBook Converter


Learn which template variables are available for use in an XML:DocBook template
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

XML:DocBook:* Introduction
This documentation deals only with adding a new template to the XMLDocBook Converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 135 of 1382

Writing templates for the HTMLSmarty Converter


Learn which template variables are available for use in an HTML:Smarty template
Authors:Joshua Eichorn [email protected] Gregory Beaver [email protected]

HTML:Smarty:* Introduction
This documentation deals only with adding a new template to the HTMLSmarty Converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 136 of 1382

Writing templates for the HTMLframes Converter


Learn which template variables are available for use in an HTML:frames template

HTML:frames:* Introduction
This documentation deals only with adding a new template to the HTMLframes Converter. To learn how to use phpDocumentor, read the phpDocumentor Guide to Creating Fantastic Documentation. To learn how to write a new Converter, read Converter Manual

Overview
The HTML:frames converter uses all of the values from the generic Converter (see Converter Default Template Variables), and adds a few more.

All templates have the standard smarty template variables available to them, as well as these: {$subdir } string - the combination of "../" that will lead to the base output directory, used for linking to other generated documentation. {$packageindex} array - a list of all the packages and their index pages in the format array('link' => link to the index page, 'title' => package name)

Template Variables
Source Code formatting - filesource.tpl
When source code is generated via the @filesource tag, the output is passed into these templates variables: {$source} string - the fully formatted source code, use as is {$package} string - the package name of the source file {$subpackage} string - the subpackage name of the source file {$name} string - the name of the source file file.ext {$source_loc} string - the relative path to the file, used for include() statements {$docs} string - a link to the documentation for this file

Example Code formatting - examplesource.tpl


When an example file is specified via the @example tag, the output is passed into these templates variables: {$source} string - the fully formatted source code, use as is {$file} string - the full path to the file {$title} string - the title of this example, from the @example tag

Left Frame formatting - left_frame.tpl

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 137 of 1382

The HTML:frames Converter places a table of contents in the left frame. This table of contents contains links to class trees, alphabetical indexes, tutorials, and elements organized by category (class/procedural code).

Template variables passed to left_frame.tpl


Each left_frame.tpl consists of one package's documentation. Basic template variables passed to left_frame.tpl include: {$info} array - the table of contents, see The {$info} template variable for contents {$package} string - package this table of contents documents {$hastutorials} boolean - true if this package has external tutorials (see phpDocumentor Tutorials) {$hastodos} boolean - true if there are any @todo tags in this package {$todolink} string - file.html name of the todo list. {$classtreepage} string - name of the file containing class trees, minus .html {$elementindex} string - name of the file containing the alphabetical index for this package, minus .html {$packagedoc} string|false - link to package-level documentation, or false if there is none

The {$info} template variable


The {$info} variable is an array of arrays, each indexed by subpackage. Even packages with no explicit @subpackage tags have a subpackage named '' (empty string). Elements in the main package can be detected using the smarty code: {section name=p loop=$info}{if $info[p].subpackage == ''}...

The {$info} variable contains these sub-variables (assuming that {section name=p loop=$info} was used): {$info[p].package} string - package name {$info[p].subpackage} string - subpackage name {$info[p].packagedoc} string - link to old format .html-based package-level documentation (deprecated) {$info[p].packagetutorial} string - link to new package-level documentation, or subpackage-level documentation for subpackages {$info[p].packagetutorialnoa} string - link to new package-level documentation, or subpackage-level documentation for subpackages, without enclosing <a href="link to docs"> HTML tag. Use this to do special link handling (opening a new window, opening in the _right frame, etc.) {$info[p].packagetutorialtitle} string - title of package-level documentation {$info[p].files}/{$info[p].classes}/{$info[p].functions} array - links to documentation array('link' => html link, 'title' => name of element) {$info[p].tutorials} string - Formatted tutorial table of contents, see Tutorial table of contents formatting tutorial_tree.tpl

Tutorial table of contents formatting - tutorial_tree.tpl


The tutorial table of contents is formatted using the recursive tutorial_tree.tpl template. This template has only a few variables: {$name} string - abstract name of the tutorial (tutorial.pkg becomes tutorialpkg) {$parent} string|false - {$name} from parent tutorial, or false if no parent tutorial {$main.title} string - the title of the tutorial. Use as {main.title|striptags} {$main.link} string - link to the tutorial's documentation {$haskids} boolean - true if this tutorial has sub-tutorials {$kids} string - fully formatted list of child tutorials {$subtree} boolean - true if this is a sub-tutorial tree. Use to modify formatting for sub-tutorial listings.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 138 of 1382

The tutorial_tree.tpl file should represent the hierarchy of tutorials through some form of a nested html tag, such as a nested list (like the default converter), or a nested DHTML menu (like the phpedit or earthli templates).

Class trees - classtrees.tpl


Class trees are a visual representation of Class inheritance to help facilitate understanding of how a project is organized. Class trees have only a few template variables: {$package} string - the package that base classes are found in {$classtrees} array - a pre-formatted list of class trees, organized by base class. Format is: array('class' => name of class, 'classtree' => fully formatted class tree)

Package index - top_frame.tpl


The top frame is used to display links to the highest level of documentation, the package table of contents, and the project-wide README/CHANGELOG/FAQ/NEWS/INSTALL files. {$packages} array - A listing of all packages documented, in format array('link' => name of the left_frame.tplgenerated package table of contents, 'title' => name of the package) {$ric} array - all of the README/INSTALL/FAQ/NEWS/CHANGELOG files found, in format array('file' => name of the generated output, 'name' => displayable name of the parsed file)

Alphabetical Indexes - elementindex.tpl/pkgelementindex.tpl


phpDocumentor's generated alphabetical element indexes are organized into an index of all elements in all packages (elementindex.tpl), and indexes of the elements in each individual package (pkgelementindex.tpl). Their variables are the same, except for the addition of the {$package} variable in pkgelementindex.tpl. Here are the template variables: {$index} array - the index items, see {$index} contents {$letters} array - a listing of each letter heading that should be used in the index

{$index} contents
The {$index} variable is an array of index listings organized by their first letter. All documented elements whose name begins with the letter A will be grouped into the sub-array 'a' => array(listing,listing,...). The listing is organized as follows: {$index[xxx].name} string - name of the documented element {$index[xxx].title} string - One of Variable, Global, Method, Function, Constant, Page, Include {$index[xxx].link} string - hyperlink to the element's documentation, or the file included for include statements {$index[xxx].listing} string - A fully-formatted index listing in English.

Miscellaneous Templates - ric.tpl/todolist.tpl/errors.tpl


These specialized templates will only be used in certain cases. ric.tpl - This template is only used when files such as README, INSTALL, or CHANGELOG are detected in the base parse directory. todolist.tpl - This template is only used when a @todo tag is used in documentation errors.tpl - This template is always generated, but only contains content when there are parsing syntax errors or logical conflicts in the parsed documentation

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 139 of 1382

ric.tpl - README/INSTALL/CHANGELOG display


This is a very simple template. {$name} string - name of the file (README, for example) {$contents} string - contents of the file, ready for display (no modification needed)

todolist.tpl - listings of @todo tags


This is also a very simple template, and requires only a {section} tag to process the input. {$todos} array - Format: array(packagename => array('link' => string element containing @todo tag, 'todos' => array(todo item 1, todo item 2,...)),...)

errors.tpl - phpDocumentor parsing/conversion warnings and errors


This file is a tool used to help find mistakes in your own documentation, and greatly simplifies determining whether there is a bug in your documentation or in phpDocumentor itself.

The structure of the errors array passed to errors.tpl is somewhat complex to learn, but easy to use once learned. Every error or warning is grouped by the file that triggered it. In the case of post-parsing errors, they are grouped into the pseudo-file "Post-parsing". Within each file, warnings are grouped separately from errors. Hence, the structure looks something like: 1 array('Post-parsing' => array( 'warnings' => array( 2 array('name' => name of warning, 3 'listing' => description of warning),... 4 ) 5 'errors' => array( 6 array('name' => name of error, 7 'listing' => description of error),... 8 ) 9 ), 10 'file1.php' => array( same structure as 'Post-parsing'),... 11 ); {$all} array - This is the structure listed above {$files} array - a listing of all the files, useful for making a table of contents {$title} string - this is hard-coded in English. Override by simple using {assign var="title" value="whatever you want"} before including header.tpl

PHP element templates - differences from Standard Converter


For the basic PHP elements, define, include, function, global variable, class, and so on (see Documentable PHP Elements), there are very few differences between the templates packaged with the HTMLframesConverter and the basic Converter.

Class variables - var.tpl


The only additional variable is: {$var_dest} string - html anchor used to pinpoint this class variable's documentation in the class file's documentation. Use as in: <a name="#{$var_dest}"></a>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 140 of 1382

Class methods - method.tpl


The only additional variable is: {$method_dest} string - html anchor used to pinpoint this class method's documentation in the class file's documentation. Use as in: <a name="#{$method_dest}"></a>

Functions - function.tpl
The only additional variable is: {$function_dest} string - html anchor used to pinpoint this function's documentation in the procedural file's documentation. Use as in: <a name="#{$function_dest}"></a>

Defines - define.tpl
The only additional variable is: {$define_link} string - html anchor used to pinpoint this define statement's documentation in the procedural file's documentation. Use as in: <a name="#{$define_link}"></a>

Global Variables - global.tpl


The only additional variable is: {$global_link} string - html anchor used to pinpoint this global variable's documentation in the procedural file's documentation. Use as in: <a name="#{$global_link}"></a>

Include Statements - include.tpl


The only additional variable is: {$include_file} string - html anchor used to pinpoint this include statement's documentation in the procedural file's documentation. Use as in: <a name="#{$include_file}"></a>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 141 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 142 of 1382

Package Converters Procedural Elements

Converter.inc
Base class for all Converters phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Author Greg Beaver < [email protected]> Version CVS: $Id: Converter.inc 287891 2009-08-30 08:08:00Z ashnazg $ Copyright 2001-2006 Gregory Beaver See parserDefine, parserFunction, parserMethod, parserVar See parserDocBlock, parserInclude, parserPage, parserClass Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.0rc1 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 143 of 1382

string function adv_htmlentities($s) [line 5404] Function Parameters:

string $s

smart htmlentities, doesn't entity the allowed tags list Since version 1.1, this function uses htmlspecialchars instead of htmlentities, for international support This function has been replaced by functionality in ParserDescCleanup.inc

Deprecated As of v1.2, No longer needed, as valid tags are parsed out of the source, everything else is Converter::postProcess() handled

and

include_once "phpDocumentor/Smarty-2.6.0/libs/Smarty.class.php" [line

43]

Smarty template files

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 144 of 1382

Package Converters Classes

Class Converter
[line 74]

Base class for all output converters. The Converter marks the final stage in phpDocumentor. phpDocumentor works in this order: Parsing => Intermediate Parsing organization => Conversion to output A Converter takes output from the phpDocumentor_IntermediateParser and converts it to output. With version 1.2, phpDocumentor includes a variety of output converters: HTMLframesConverter HTMLSmartyConverter PDFdefaultConverter CHMdefaultConverter CSVdia2codeConverter XMLDocBookConverter {@ and using walk() or walk_everything (depending on the value of $sort_absolutely_everything) it "walks" over an array of phpDocumentor elements.}}

Package Converters Author Greg Beaver < [email protected]> Version $Id: Converter.inc 287891 2009-08-30 08:08:00Z ashnazg $ Abstract Element Since 1.0rc1

Converter::$all_packages array = [line 366]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 145 of 1382

All packages encountered in parsing

See phpDocumentor_IntermediateParser::$all_packages

Converter::$class string|false = false [line 105]

set to a classname if currently parsing a class, false if not


Converter::$classes Classes = [line 319]

All class information, organized by path, and by package


Converter::$class_contents array = array() [line 269]

alphabetical index of all methods and vars in a class by package/subpackage The class itself has a link under ###main

Var Format: array(package => array(subpackage => array(path => array(class => array(abstractLink descendant 1, ... ) ) ) ) See Converter::formatLeftIndex()

Converter::$class_data Smarty = [line 165]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 146 of 1382

template for the class currently being processed


Converter::$class_elements array = array() [line 208]

alphabetized index of classes by package

Var Format: array(package => array(subpackage => array( See Converter::$leftindex

classLink 1,classLink 2,...)

Converter::$curfile mixed = [line 313]

full path of the current file being converted


Converter::$curpage parserPage = [line 171]

current procedural page being processed


Converter::$define_elements array = array() [line 201]

alphabetized index of defines by package

Var Format: array(package => array(subpackage => array( See Converter::$leftindex

defineLink 1,defineLink 2,...)

Converter::$elements array = array() [line 187]

alphabetical index of all elements

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 147 of 1382

Var Format: array(first letter of element name => array( parserElement or parserPage,...)) See Converter::formatIndex(), HTMLframesConverter::formatIndex()

Converter::$function_elements array = array() [line 222]

alphabetized index of functions by package

Var Format: array(package => array(subpackage => array( 2,...) See Converter::$leftindex

functionLink 1,functionLink

Converter::$global_elements array = array() [line 215]

alphabetized index of global variables by package

Var Format: array(package => array(subpackage => array( See Converter::$leftindex

globalLink 1,globalLink 2,...)

Converter::$highlightingSource boolean = false [line 325]

Flag used to help converters determine whether to do special source highlighting


Converter::$leftindex array = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => true, 'globals' => true) [line 384]

Controls which of the one-element-only indexes are generated.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 148 of 1382

Generation of these indexes for large packages is time-consuming. This is an optimization feature. An example of how to use this is in HTMLframesConverter::$leftindex, and in HTMLframesConverter::formatLeftIndex(). These indexes are intended for use as navigational aids through documentation, but can be used for anything by converters.

See Converter::formatLeftIndex() See Converter::$class_elements, Converter::$page_elements, Converter::$function_elements, Converter::$define_elements, Converter::$global_elements

Converter::$outputformat string = 'Generic' [line 90]

output format of this converter in Child converters, this will match the first part of the -o command-line as in -o HTML:frames:default "HTML"

Tutorial phpDocumentor Tutorial

Converter::$package string = 'default' [line 95]

package name currently being converted


Converter::$packagecategories array = [line 359]

Packages associated with categories Used by the XML:DocBook/peardoc2 converter, and available to others, to group many packages into categories

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 149 of 1382

See phpDocumentor_IntermediateParser::$packagecategories

Converter::$package_elements array = array() [line 180]

alphabetical index of all elements sorted by package, subpackage, page, and class.

Var Format: array(package => array(subpackage => array('page'|'class' => array(path|classname => array(element, element,...))))) Uses Converter::$sort_absolutely_everything - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used

Converter::$package_output mixed = [line 141]

set to value of -po commandline

Tutorial phpDocumentor Tutorial

Converter::$package_parents array = [line 349]

Hierarchy of packages Every package that contains classes may have parent or child classes packages. In other words, this code is legal:
1

in other

In this case, package one is a parent of package two

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 150 of 1382

See phpDocumentor_IntermediateParser::$package_parents

Converter::$page string = [line 147]

name of current page being converted


Converter::$page_contents array = array() [line 238]

alphabetical index of all elements on a page by package/subpackage The page itself has a link under ###main

Var Format: array(package => array(subpackage => array(path => array( descendant 1, ...))) See Converter::formatLeftIndex()

abstractLink

Converter::$page_data Smarty = [line 159]

template for the procedural page currently being processed


Converter::$page_elements array = array() [line 194]

alphabetized index of procedural pages by package

Var Format: array(package => array(subpackage => array( See Converter::$leftindex

pageLink 1,pageLink 2,...)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 151 of 1382

Converter::$parseprivate bool = [line 276]

controls processing of elements marked private with @access private defaults to false. Set with command-line --parseprivate or -pp

Converter::$path string = [line 153]

path of current page being converted


Converter::$pkg_elements array = array() [line 229]

alphabetical index of all elements, indexed by package/subpackage

Var Format: array(first letter of element name => array( parserElement or parserPage,...)) See Converter::formatPkgIndex(), HTMLframesConverter::formatPkgIndex()

Converter::$processSpecialRoots boolean = false [line 81]

This converter knows about the new root tree processing In order to fix PEAR Bug #6389

Converter::$quietmode bool = [line 283]

controls display of progress information while parsing. defaults to false. Set to true for cron jobs or other situations where no visual output is necessary

Converter::$smarty_dir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 152 of 1382

string = '' [line 301]

Directory that the smarty templates are in


Converter::$sort_absolutely_everything mixed = false [line 251]

This is used if the content must be passed in the order it should be read, i.e. by package, procedural then classes This fixes bug 637921, and is used by PDFdefaultConverter

Usedby Converter::$package_elements - if true, then $package_elements is used, otherwise, the ParserData::$classelements and ParserData::$pageelements variables are used

Converter::$sort_page_contents_by_type boolean = false [line 245]

This determines whether the $page_contentsarray should be sorted by element type as well as alphabetically by name

See Converter::sortPageContentsByElementType()

Converter::$sourcePaths array = array() [line 372]

A list of files that have had source code generated


Converter::$subpackage string = '' [line 100]

subpackage name currently being converted

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 153 of 1382

Converter::$targetDir mixed = '' [line 289]

directory that output is sent to. -t command-line sets this.

Tutorial phpDocumentor Tutorial

Converter::$templateDir string = '' [line 295]

Directory that the template is in, relative to phpDocumentor root directory


Converter::$templateName string = '' [line 308]

Name of the template, from last part of -o

Tutorial phpDocumentor Tutorial

Converter::$template_options array = [line 399]

Options for each template, parsed from the options.ini file in the template base directory

Tutorial phpDocumentor Tutorials

Converter::$title string = 'Generated Documentation' [line 392]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 154 of 1382

See phpDocumentor_IntermediateParser::$title

Converter::$todoList array = array() [line 429]

List of all @todo tags and a link to the element with the @todo Format: array(package => array(link to element, array(todo parserTag,...)),...)

Tutorial @todo

Constructor void function Converter::Converter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $template, $title) [line 452] Function Parameters:

array &$allp $all_packages value array &$packp $package_parents value Classes &$classes $classes value ProceduralPages &$procpages $proceduralpages value array $po $package_output value boolean $pp $parseprivate value boolean $qm $quietmode value string $targetDir $targetDir value string $template $templateDir value string $title (@link $title} value

Initialize Converter data structures


string function Converter::AttrToString($tag, $attr, [$unmodified = false]) [line 1307] Function Parameters:

string $tag tag name attribute $attr array boolean $unmodified if true, returns attrname="value"...

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 155 of 1382

Convert the attribute of a Tutorial docbook tag's attribute list to a string based on the template options.ini

string function Converter::Bolden($para) [line 931] Function Parameters:

string $para

Used to convert the contents of <b> in a docblock

Usedby parserB::Convert()

string function Converter::Br($para) [line 1001] Function Parameters:

string $para

Used to convert <br> in a docblock

Usedby parserBr::Convert()

void function Converter::checkState($state) [line 5366] Function Parameters:

mixed $state

Compare parserStringWithInlineTags::Convert() cache state to $state

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 156 of 1382

See parserStringWithInlineTags::Convert() Abstract Element

void function Converter::cleanup() [line 5077]

Finish up parsing/cleanup directories


void function Converter::Convert(&$element) [line 3982] Function Parameters:

mixed &$element parserElement descendant or parserPackagePage or parserData

Convert all elements to output format This will call ConvertXxx where Xxx is http://www.php.net/ucfirst($element->type). It is expected that a child converter defines a handler for every element type, even if that handler does nothing. phpDocumentor will terminate with an error if a handler doesn't exist.

Throws PDERROR_NO_CONVERT_HANDLER

void function Converter::convertClass(&$element) [line 4046] Function Parameters:

&$element

Default Class Handler Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. Sets up the class template. {@, getFormattedConflicts, getFormattedInheritedMethods, and getFormattedInheritedVars are called to complete vital template setup.}}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 157 of 1382

void function Converter::convertConst(&$element, [$additions = array()]) [line 4217] Function Parameters:

parserConst &$element $additions

Converts class constants for template output. Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra needed in the parameter $addition template variables

void function Converter::convertDefine(&$element, [$addition = array()]) [line 4334] Function Parameters:

parserDefine &$element array $addition any additional template variables should be in this array

Converts defines for template output Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition {@, this method also uses utility functions getGlobalValue(), getFormattedConflicts()}}

Uses Converter::postProcess() - on define_value template value, makes it displayable

void function Converter::ConvertErrorLog() [line 2426]

Convert the phpDocumentor parsing/conversion error log

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 158 of 1382

Abstract Element

void function Converter::convertFunction(&$element, [$addition = array()]) [line 4391] Function Parameters:

parserFunction &$element $addition

Converts function for template output Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

See Converter::prepareDocBlock()

void function Converter::convertGlobal(&$element, [$addition = array()]) [line 4300] Function Parameters:

parserGlobal &$element array $addition any additional template variables should be in this array

Converts global variables for template output Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition {@, this method also uses utility functions getGlobalValue(), getFormattedConflicts()}}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 159 of 1382

Uses Converter::postProcess() - on global_value template value, makes it displayable

void function Converter::convertInclude(&$element, [$addition = array()]) [line 4363] Function Parameters:

parserInclude &$element $addition

Converts includes for template output Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

See Converter::prepareDocBlock()

void function Converter::convertMethod(&$element, [$additions = array()]) [line 4113] Function Parameters:

parserMethod &$element $additions

Converts method for template output Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra template variables needed in the parameter $addition

void function Converter::convertPage(&$element) [line 4254] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 160 of 1382

parserPage &$element

Default Page Handler Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. {@, this class uses getSourceLocation() and getClassesOnPage() to set template variables. Also used is getPageName(), to get a Converter-specific name for the page.}}

string function Converter::ConvertTitle($tag, $attr, $title, $cdata) [line 1396] Function Parameters:

string $tag tag name array $attr string $title title text string $cdata

Convert the title of a Tutorial docbook tag section to a string based on the template options.ini

void function Converter::ConvertTodoList() [line 2434]

Convert the list of all @todo tags

Abstract Element

void function Converter::convertTutorial(&$element) [line 4010] Function Parameters:

parserTutorial &$element

Default Tutorial Handler Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. Sets up

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 161 of 1382

the tutorial template, and its prev/next/parent links {@ and uses the parserTutorial::prev, parserTutorial::next, parserTutorial::parent links to set up those links.}}

void function Converter::convertVar(&$element, [$additions = array()]) [line 4173] Function Parameters:

parserVar &$element $additions

Converts class variables for template output. Conversion Handlers All of the convert* handlers set up template variables for the Smarty template. This function must be called by a child converter with any extra needed in the parameter $addition template variables

void function Converter::Convert_RIC($name, $contents) [line 3962] Function Parameters:

README|INSTALL|CHANGELOG $name string $contents contents of the file

Convert README/INSTALL/CHANGELOG file contents to output format

Abstract Element

void function Converter::copyFile($file, [$subdir = '']) [line 5341] Function Parameters:

string $file $subdir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 162 of 1382

Copies a file from the template directory to the target directory thanks to Robert Hoffmann for this fix

void function Converter::createParentDir($dir) [line 5257] Function Parameters:

string $dir

Recursively creates all subdirectories that don't exist in the $dir path
string function Converter::EncloseList($list, $ordered) [line 888] Function Parameters:

string $list $ordered

Used to convert the contents of <ol> or <ul> in a docblock

Usedby parserList::Convert() - enclose the list

string function Converter::EncloseParagraph($para) [line 917] Function Parameters:

string $para

Used to enclose a paragraph in a docblock


void function Converter::endClass() [line 507]

Called bywalk() while converting, when the last class element has been parsed. A Converter can use this method in any way it pleases. HTMLframesConverter uses it to complete the template for the class and to output its documentation

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 163 of 1382

See HTMLframesConverter::endClass() Abstract Element

void function Converter::endPage() [line 521]

Called by walk() while converting, when the last procedural page element has been parsed. A Converter can use this method in any way it pleases. HTMLframesConverter uses it to complete the template for the procedural page and to output its documentation

See HTMLframesConverter::endClass() Abstract Element

string function Converter::exampleProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 773] Function Parameters:

string $example boolean $tutorial true if this is to highlight a tutorial <programlisting> $inlinesourceparse $class $linenum $filesourcepath

Used to convert the {@example} inline tag in a docblock. By default, this just wraps ProgramExample

See XMLDocBookpeardoc2Converter::exampleProgramExample

string function Converter::flushHighlightCache() [line 609]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 164 of 1382

Return the close text for the current token


void function Converter::formatIndex() [line 545]

Called bywalk() while converting. This method is intended to be the place that $elements is formatted for output.

See HTMLframesConverter::formatIndex() Abstract Element

void function Converter::formatLeftIndex() [line 559]

Called bywalk() while converting. This method is intended to be the place that any of $class_elements, $function_elements, $page_elements, $define_elements, and $global_elements is formatted for output, depending on the value of $leftindex

See HTMLframesConverter::formatLeftIndex() Abstract Element

void function Converter::formatPkgIndex() [line 533]

Called bywalk() while converting. This method is intended to be the place that $pkg_elements is formatted for output.

See HTMLframesConverter::formatPkgIndex() Abstract Element

string function Converter::formatTutorialTOC($toc) [line 1030] Function Parameters:

array $toc format: array(array('tagname' => section, 'link' => returnsee link, 'id' =>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 165 of 1382

anchor name, 'title' => from title tag),...)

Creates a table of contents for a {@toc} inline tag in a tutorial This function should return a formatted table of contents. By default, it does nothing, it is up to the converter to format the TOC

Abstract Element Usedby parserTocInlineTag::Convert() - passes an array of format:

void function Converter::generateChildClassList($class) [line 4794] Function Parameters:

parserClass $class class variable

returns a list of child classes

Uses parserClass::getChildClassList()

string function Converter::generateFormattedClassTree($class) [line 4641] Function Parameters:

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class. This method must be overridden, or phpDocumentor will halt with a fatal error

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 166 of 1382

Abstract Element

array function Converter::getClassesOnPage(&$element) [line 4593] Function Parameters:

parserData &$element

gets a list of all classes declared on a procedural page represented by $element, a parserData class

mixed function Converter::getClassLink($expr, $package, [$file = false], [$text = false]) [line 3179] Function Parameters:

string $expr class name string $package package name $file $text

return false or a classLinkto $expr

See classLink

mixed function Converter::getConstLink($expr, $class, $package, [$file = false], [$text = false]) [line 3354] Function Parameters:

string $expr constant name string $class class name string $package package name $file $text

return false or a constLink $expr in $class to

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 167 of 1382

See constLink

string function Converter::getConverterDir() [line 5162]

Get the absolute path to the converter's base directory


string function Converter::getCurrentPageLink() [line 1115]

Abstract Element

string function Converter::getCurrentPageURL($pathinfo) [line 1095] Function Parameters:

string $pathinfo

Return the path to the current


mixed function Converter::getDefineLink($expr, $package, [$file = false], [$text = false]) [line 3227] Function Parameters:

string $expr constant name string $package package name $file $text

return false or a defineLinkto $expr

See defineLink

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 168 of 1382

string function Converter::getFileSourceName($path, $pathinfo) [line 1070] Function Parameters:

string $pathinfo $path

Translate the path info into a unique file name for the highlighted source code.
string function Converter::getFileSourcePath($base) [line 1083] Function Parameters:

string $base Path is relative to this folder

Return the fixed path to the source-code file folder.


array function Converter::getFormattedConflicts(&$element, $type) [line 4694] Function Parameters:

mixed &$element parserClass, parserFunction, parserDefine or parserGlobal string $type type to display. either 'class','function','define' or 'global variable'

Uses parserGlobal::getConflicts() Uses parserFunction::getConflicts() Uses parserDefine::getConflicts() Uses parserClass::getConflicts()

array function Converter::getFormattedDescMethods(&$element) [line 4714] Function Parameters:

parserMethod &$element

Get a list of methods in child classes that override this method

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 169 of 1382

Uses parserMethod::getOverridingMethods()

array function Converter::getFormattedDescVars(&$element) [line 4735] Function Parameters:

parserVar &$element

Get a list of vars in child classes that override this var

Uses parserVar::getOverridingVars()

string function Converter::getFormattedImplements($el) [line 4657] Function Parameters:

parserClass $el class variable

returns an array containing the class inheritance tree from the root object to the class. This method must be overridden, or phpDocumentor will halt with a fatal error

Abstract Element

array function Converter::getFormattedInheritedConsts($child) [line 4999] Function Parameters:

parserConst $child class constant

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 170 of 1382

Return template-enabled list of inherited class constants uses parserConst helper function getInheritedConsts and generates a enabled list using getClassLink()

template-

See Converter::getClassLink(), parserMethod::getInheritedConsts()

array function Converter::getFormattedInheritedMethods($child) [line 4911] Function Parameters:

parserMethod $child class method

Return template-enabled list of inherited methods uses parserMethod helper function getInheritedMethods and generates a templateenabled list using getClassLink()

See Converter::getClassLink(), parserMethod::getInheritedMethods()

array function Converter::getFormattedInheritedVars($child) [line 4840] Function Parameters:

parserVar $child class var

Return template-enabled list of inherited variables uses parserVar helper function getInheritedVars and generates a template-enabled list using getClassLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 171 of 1382

See Converter::getClassLink(), parserVar::getInheritedVars()

array|false function Converter::getFormattedMethodImplements(&$element) [line 4773] Function Parameters:

parserMethod &$element

Get the method this method(s) implemented from an interface, if any

Uses parserMethod::getImplements()

array|false function Converter::getFormattedOverrides(&$element) [line 4756] Function Parameters:

parserMethod &$element

Get the method this method overrides, if any

See parserMethod::getOverrides()

mixed function Converter::getFunctionLink($expr, $package, [$file = false], [$text = false]) [line 3203] Function Parameters:

string $expr function name string $package package name $file $text

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 172 of 1382

return false or a functionLink $expr to

See functionLink

mixed function Converter::getGlobalLink($expr, $package, [$file = false], [$text = false]) [line 3251] Function Parameters:

string $expr global variable name (with leading $) string $package package name $file $text

return false or a globalLink $expr to

See defineLink

string function Converter::getGlobalValue($value) [line 5186] Function Parameters:

string $value default value of a global variable.

Parse a global variable's default value for class initialization. If a global variable's default value is "new class" as in:
1 $globalvar = new Parser

This method will document it not as "new Parser" but instead as "new Parser". examples, see phpdoc.inc. Many global variables are classes, and phpDocumentor links to their documentation

For

void function Converter::getHighlightState() [line 588] string function Converter::getId(&$link) [line 3952] Function Parameters:

abstractLink &$link

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 173 of 1382

take abstractLink descendant and text $eltext and return a unique ID in the format needed for the Converter

Abstract Element

string function Converter::getIncludeValue($value, $ipath) [line 5227] Function Parameters:

string $value file included by include statement. string $ipath path of file that has the include statement

Parse an include's file to see if it is a file documented in this project Although not very smart yet, this method will try to look for the included file file.ext:
1 include ("file.ext" );

If it finds it, it will return a link to the file's documentation. As of 1.2.0rc1, phpDocumentor is smarty enough to find these cases: absolute path to file ./file.ext or ../file.ext relpath/to/file.ext if relpath is a subdirectory of the base parse directory For examples, see Setup.inc.php includes. Every include auto-links to the documentation for the file that is included

mixed function Converter::getLink($expr, [$package = false], [$packages = false]) [line 3565] Function Parameters:

string $expr expression to search for a link string $package package to start searching in array $packages list of all packages to search in

The meat of the @see tag and inline {@link} tag $expr is a string with many allowable formats:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 174 of 1382

1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

proceduralpagename.ext constant_name classname::function() classname::constantname classname::$variablename classname object classname function functionname() global $globalvarname packagename#expr where expr is any of the above

New in version 1.1, you can explicitly specify a package to link to that is different from the current package. Use the # operator to specify a new package, as in tests#bug540368.php (which should appear as a link like: " tests#bug-540368.php"). This example links to the procedural page bug-540368.php in package tests. Also, the "function" operator is now used to specifically link to a function instead of a method in the current class.
1 class myclass 2 { 3 // from inside the class definition, use "function conflict()" to refer to procedural function "conflict()" 4 function conflict() 5 { 6 } 7 } 8 9 function conflict() 10 { 11 }

If classname:: is not present, and the see tag is in a documentation block within a class, then the function uses the classname to search for $expr as a function or variable within classname, or any of its parent classes. given an $expr without '$', '::' or '()' getLink first searches for classes, procedural pages, constants, global variables, and then searches for methods and variables within the default class, and finally for any function

See pageLink, functionLink, defineLink, classLink, methodLink, varLink See Converter::getPageLink(), Converter::getDefineLink(), Converter::getVarLink(), Converter::getFunctionLink(), Converter::getClassLink()

mixed function Converter::getMethodLink($expr, $class, $package, [$file = false], [$text = false]) [line 3300] Function Parameters:

string $expr method name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 175 of 1382

string $class class name string $package package name $file $text

return false or a methodLink $expr in $class to

See methodLink

mixed function Converter::getPageLink($expr, $package, [$path = false], [$text = false], [$packages = false]) [line 3275] Function Parameters:

string $expr procedural page name string $package package name $path $text $packages

return false or a pageLinkto $expr

See pageLink

array function Converter::getSortedClassTreeFromClass($class, $package, $subpackage) [line 2954] Function Parameters:

string $class class name string $package string $subpackage

Return a tree of all classes that extend this class The data structure returned is designed for a non-recursive algorithm, somewhat complex. In most cases, the array returned is:

and is

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 176 of 1382

array('#root' => array('link' => classLink to $class, 'parent' => false, 'children' => array(array('class' => 'childclass1', 'package' => 'child1package'), array('class' => 'childclass2', 'package' => 'child2package'),... ) ), 'child1package#childclass1' => array('link' => classLink to childclass1, 'parent' => '#root', 'children' => array(array('class' => 'kidclass', 'package' => 'kidpackage'),... ) ), 'kidpackage#kidclass' => array('link' => classLink to kidclass, 'parent' => 'child1package#childclass1', 'children' => array() // no children ), .... ) To describe this format using language, every class in the tree has an entry in the first level of the array. The index for all child classes that extend the root class is childpackage#childclassname. Each entry in the array has 3 elements: link, parent, and children. link - a classLink to the current class parent - a classLink to the class's parent, or false (except for one special case described below) children - an array of arrays, each entry has a 'class' and 'package' index to the child class, used to find the entry in the big array

special cases are when the #root class has a parent in another package, or when the #root class extends a class not found by phpDocumentor. In the first case, parent will be a classLink to the parent class. In the second, parent will be the extends clause, as in:
1 2 3 4 class X extends Y { ... }

in this case, the #root entry will be array('link' => classLink to X, 'parent' => 'Y', children => array(...)) The fastest way to design a method to process the array returned is to copy HTMLframesConverter::getRootTree() into your converter and to modify the html to whatever output format you are going to use

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 177 of 1382

See HTMLframesConverter::getRootTree()

string function Converter::getSourceLink($path) [line 1105] Function Parameters:

$path

Abstract Element Usedby parserFileSourceTag::getSourceLink()

void function Converter::getState() [line 5355]

Return parserStringWithInlineTags::Convert() cache state

See parserStringWithInlineTags::Convert() Abstract Element

string function Converter::getTutorialId($package, $subpackage, $tutorial, $id) [line 1418] Function Parameters:

$package $subpackage $tutorial $id

Return a converter-specific id to distinguish tutorials and their sections Used by {@id}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 178 of 1382

Usedby parserTocInlineTag::Convert() - retrieve the tutorial ID for Usedby parserIdInlineTag::Convert() - retrieve converter-specific ID

tutorialLink|string function Converter::getTutorialLink($expr, [$package = false], [$subpackage = false], [$packages = false]) [line 3417] Function Parameters:

string $expr the original expression string $package package to look in first string $subpackage subpackage to look in first array $packages array of package names to search in if not found in parent packages. This is used to limit the search, phpDocumentor automatically searches all packages

The meat of the @tutorial tag and inline {@tutorial} tag Take a string and return an abstract link to the tutorial it represents. Since tutorial naming literally works like the underlying filesystem, the way to reference the tutorial is similar. Tutorials are located in a subdirectory of any directory parsed, which is named 'tutorials/' (we try to make things simple when we can :). They are further organized by package and subpackage as: tutorials/package/subpackage and the files are named *.cls, *.pkg, or *.proc, and so a link to a tutorial named file.cls can be referenced (depending on context) as any of:
1 2 3 * @tutorial package/subpackage/file.cls * @tutorial package/file.cls * @tutorial file.cls

The first case will only be needed if file.cls exists in both the current package, in anotherpackage/file.cls and in anotherpackage/subpackage/file.cls and you wish to reference the one in anotherpackage/subpackage. The second case is only needed if you wish to reference file.cls in another package and it is unique in that package. the third will link to the first file.cls it finds using this search method:

1. 2. 3. 4.

current package/subpackage all other subpackages of current package parent package, if this package has classes that extend classes in another package all other packages

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 179 of 1382

Since 1.2

array function Converter::getTutorialTree($tutorial) [line 1974] Function Parameters:

parserTutorial|array $tutorial

Get a tree structure representing the hierarchy of tutorials Returns an array in format: array('tutorial' => parserTutorial, 'kids' => array( // child tutorials array('tutorial' => child parserTutorial, 'kids' => array(...) ) ) )

Tutorial phpDocumentor Tutorials

mixed function Converter::getVarLink($expr, $class, $package, [$file = false], [$text = false]) [line 3327] Function Parameters:

string $expr var name string $class class name string $package package name $file $text

return false or a varLinkto $expr in $class

See varLink

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 180 of 1382

boolean function Converter::hasSourceCode($path) [line 1159] Function Parameters:

string $path full path to the source code file

Determine whether an element's file has generated source code, used for linking to line numbers of source. Wrapper for $sourcePaths in this version

false|parserTutorial function Converter::hasTutorial($type, $name, $package, [$subpackage = '']) [line 490] Function Parameters:

pkg|cls|proc $type the tutorial type to search for tutorial $name name string $package package name string $subpackage subpackage name, if any

string function Converter::highlightDocBlockSource($token, $word, [$preformatted = false]) [line 690] Function Parameters:

string $token name of docblock token type string $word contents of token boolean $preformatted whether the contents are preformatted or need modification

Used to allow converters to format the source code of DocBlocks the way they'd like. default returns it unchanged. Mainly used by the HighlightParser

string function Converter::highlightSource($token, $word, [$preformatted = false]) [line 637] Function Parameters:

integer $token token value from tokenizer constants string $word contents of token boolean $preformatted whether the contents are preformatted or need modification

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 181 of 1382

Used to allow converters to format the source code the way they'd like. default returns it unchanged. Mainly used by the HighlightParser

string function Converter::highlightTutorialSource($token, $word, [$preformatted = false]) [line 728] Function Parameters:

string $token name of docblock token type string $word contents of token boolean $preformatted whether the contents are preformatted or need modification

Used to allow converters to format the source code of Tutorial XML the way they'd like. default returns it unchanged. Mainly used by the HighlightParser

string function Converter::Italicize($para) [line 945] Function Parameters:

string $para

Used to convert the contents of <i> in a docblock

Usedby parserI::Convert()

string function Converter::Kbdize($para) [line 973] Function Parameters:

string $para

Used to convert the contents of <kbd> in a docblock

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 182 of 1382

Usedby parserKbd::Convert()

string function Converter::ListItem($item) [line 874] Function Parameters:

string $item

Used to convert the contents of <li> in a docblock

Usedby parserList::Convert() - enclose each item of the list

Smarty function Converter::newSmarty() [line 5051]

Return a Smarty template object to operate with This returns a Smarty template with pre-initialized variables for use. If the method "SmartyInit()" exists, it is called.

void function Converter::Output($title) [line 5112] Function Parameters:

$title

do all necessary output

See Converter Abstract Element Usedby phpDocumentor_IntermediateParser::Convert()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 183 of 1382

string function Converter::postProcess($text) [line 1016] Function Parameters:

$text

This version does nothing Perform necessary post-processing of string data. Converters should escape < and > to become &lt; and &gt;

For example, the HTML

Usedby Converter::convertDefine() - on define_value template value, makes it displayable Usedby Converter::convertGlobal() - on global_value template value, makes it displayable

array function Converter::prepareDocBlock(&$element, [$names = array()], [$nopackage = true]) [line 4456] Function Parameters:

mixed &$element any descendant of parserElement, or parserData array $names used to translate tagnames into other tags boolean $nopackage set to false for pages and classes, the only elements allowed to specify @package

convert the element's DocBlock for output This function converts all tags and descriptions for output

string function Converter::PreserveWhiteSpace($string) [line 903] Function Parameters:

string $string

Used to convert the contents of <pre> in a docblock

Usedby parserPre::Convert()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 184 of 1382

string function Converter::ProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 785] Function Parameters:

string $example boolean $tutorial true if this is to highlight a tutorial <programlisting> $inlinesourceparse $class $linenum $filesourcepath

Used to convert the <code> tag in a docblock

Usedby parserCode::Convert()

string function Converter::returnLink($link, $text) [line 3929] Function Parameters:

string $link URL string $text text to display

take URL $link and text $text and return a link in the format needed for the Converter

Abstract Element

string function Converter::returnSee(&$link, [$eltext = false]) [line 3941] Function Parameters:

abstractLink &$link

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 185 of 1382

string $eltext

take abstractLink descendant and text $eltext and return a link in the format needed for the Converter

Abstract Element

string function Converter::Sampize($para) [line 987] Function Parameters:

string $para

Used to convert the contents of <samp> in a docblock

Usedby parserSamp::Convert()

void function Converter::setSourcePaths($path) [line 1174] Function Parameters:

string $path full path of source file

Mark a file as having had source code highlighted


void function Converter::setTargetDir($dir) [line 5285] Function Parameters:

string $dir the output directory

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 186 of 1382

Sets the output directory for generated documentation As of 1.3.0RC6, this also sets the compiled templates directory inside the target directory

void function Converter::setTemplateBase($base, $dir) [line 5123] Function Parameters:

string $base template base directory string $dir template name

Set the template directory with a different template base directory

Tutorial phpDocumentor Tutorial

void function Converter::setTemplateDir($dir) [line 5148] Function Parameters:

string $dir subdirectory

sets the template directory based on the $outputformat and $name Also sets $templateName to the $dir parameter

void function Converter::sortPageContentsByElementType(&$pages) [line 2570] Function Parameters:

&$pages

sorts$page_contents element type as well as alphabetically by

See $sort_page_contents_by_element_type

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 187 of 1382

string function Converter::sourceLine($linenumber, $line, [$path = false]) [line 1130] Function Parameters:

integer $linenumber line number string $line highlighted source code line false|string $path full path to @filesource file this line is a part of, from a complete file.

if this is a single line

Return a line of highlighted source code with formatted line number If the $path is a full path, then an anchor to the line number will be added as well

void function Converter::startHighlight() [line 582]

Initialize highlight caching


void function Converter::TranslateEntity($name) [line 1184] Function Parameters:

string $name entity name

Used to translate an XML DocBook entity like &rdquo; from a tutorial by reading the options.ini file for the template.

Usedby parserEntity::Convert() - convert contents to text

string function Converter::TranslateTag($name, $attr, $cdata, $unconvertedcdata) [line 1214] Function Parameters:

string $name tag name string $attr any attributes Format: array(name => value) string $cdata the tag contents, if any string $unconvertedcdata the tag contents, if any, unpost-processed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 188 of 1382

Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template.

Usedby parserXMLDocBookTag::Convert() - Calls this to enclose the contents of the DocBook tag based on the values in template options.ini file

void function Converter::TutorialExample($example) [line 860] Function Parameters:

string $example

string function Converter::type_adjust($typename) [line 759] Function Parameters:

string $typename

Called by parserReturnTag::Convert() allow converters to change type names to to desired formatting Used by XMLDocBookConverter::type_adjust() to change true and false to the peardoc2 values

string function Converter::unmangle($sourcecode) [line 574] Function Parameters:

string $sourcecode output from highlight_string() - use this function to reformat the returned data for Converter-specific output

Called by parserSourceInlineTag::stringConvert() allow converters to format the to source code the way they'd like. default returns it unchanged (html with xhtml tags)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 189 of 1382

Deprecated in favor of tokenizer-based highlighting. This will be removed for 2.0 Usedby parserSourceInlineTag::stringConvert() - remove the extraneous stuff from http://www.php.net/highlight_string

string function Converter::vardump_tree($tree, [$indent = '']) [line 2202] Function Parameters:

$tree $indent

Debugging function for dumping $tutorial_tree


string function Converter::Varize($para) [line 959] Function Parameters:

string $para

Used to convert the contents of <var> in a docblock

Usedby parserDescVar::Convert()

void function Converter::walk(&$pages, &$package_pages) [line 1705] Function Parameters:

array &$pages Format: array(fullpath => parserData structure with full parserData::$elements and parserData::$class_elements. array &$package_pages Format: array(parserPackagePage 1, parserPackagePage 2,...)

called by phpDocumentor_IntermediateParser::Convert() traverse the array of to pages and their elements, converting them to the output format The walk() method should be flexible enough such that it never needs modification. walk() sets up all of the indexes, and sorts everything in logical alphabetical order. It then passes each element individually to Convert(), which then passes to the Convert*()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 190 of 1382

methods. A child Converter need not override any of these unless special functionality must be added. see Converter Default Template Variables for details. {@ and the left indexes specified by $leftindexes, and then sorts them by calling sortIndexes(). Next, it converts all README/CHANGELOG/INSTALL-style files, using Convert_RIC. After this, it passes all package-level docs to Convert(). Then, it calls the index sorting functions formatPkgIndex(), formatIndex() and formatLeftIndex(). Finally, it converts each procedural page in alphabetical order. This stage passes elements from the physical file to Convert() in alphabetical order. First, procedural page elements parserDefine, parserInclude parserGlobal, and parserFunction are passed to Convert(). Then, class elements are passed in this order: parserClass, then all of the parserVars in the class and all of the parserMethods in the class. Classes are in alphabetical order, and both vars and methods are in alphabetical order. Finally, ConvertErrorLog() is called and the data walk is complete.}}

Usedby phpDocumentor_IntermediateParser::Convert() - passes $pages and $package_pages Uses Converter::_createPkgElements() - sets up $elements and $pkg_elements array, as well as $links

void function Converter::walk_everything() [line 2267]

walk over elements by package rather than page This method is designed for converters like the PDF converter that need everything passed in alphabetical order by package/subpackage and by procedural and then class information

See Converter::walk() See PDFdefaultConverter

void function Converter::writeExample($title, $path, $source) [line 1060] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 191 of 1382

string $title example title string $path example filename (no path) string $source fully highlighted/linked source code of the file

Write out the formatted source code for an example php file This function provides the primary functionality for the @example tag.

Abstract Element

void function Converter::writeFile($file, $data, [$binary = false]) [line 5318] Function Parameters:

string $file string $data boolean $binary true if the data is binary and not text

Writes a file to target dir


void function Converter::writeSource($filepath, $source) [line 1044] Function Parameters:

string $filepath full path to the file string $source fully highlighted/linked source code of the file

Write out the formatted source code for a php file This function provides the primary functionality for the @filesource tag.

Abstract Element Usedby parserFileSourceTag::writeSource() - export highlighted file source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 192 of 1382

void function Converter::_rmdir($directory) [line 5089] Function Parameters:

string $directory

Completely remove a directory and its contents


void function Converter::_setHighlightCache($type, $token) [line 593] Function Parameters:

$type $token

string function Converter::_tutorial_path($pkg, [$subpkg = 0], [$namepkg = 0]) [line 2081] Function Parameters:

parserTutorial $pkg parserTutorial $subpkg parserTutorial $namepkg

Returns the path to this tutorial as a string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 193 of 1382

CHMdefaultConverter.inc
CHM (Compiled Help Manual) output converter for Smarty Template. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package CHMdefault Author Joshua Eichorn < [email protected]> Author Greg Beaver < [email protected]> Version CVS: $Id: CHMdefaultConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ Copyright 2000-2006 Joshua Eichorn, Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.0rc1 Filesource Source Code for this file License LGPL

Class CHMdefaultConverter
[line 56]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 194 of 1382

Generates files that MS HTML Help Worshop can use to create a MS Windows compiled help file (CHM) The free MS HTML Help compiler takes the project file (phpdoc.hhp) and reads the table of contents file specified in the project (which is always contents.hhc in phpDocumentor). When the converter reaches stable state, it will also output an index file index.hhk. The free download for MS HTML Help Workshop is available below

Package Converters Sub-Package CHMdefault Author Greg Beaver < [email protected]> Version $Revision: 234145 $ Link MS HTML Help Workshop download Since 1.0rc1

CHMdefaultConverter::$base_dir string = [line 85]

target directory passed on the command-line. $targetDir is malleable, always adding package/ and package/subpackage/ subdirectories onto it.

CHMdefaultConverter::$class_dir string = [line 91]

output directory for the current class being processed


CHMdefaultConverter::$current array = [line 116]

contains all of the template procedural page element loop data needed for the current template
CHMdefaultConverter::$currentclass array = [line 122]

contains all of the template class element loop data needed for the current template

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 195 of 1382

CHMdefaultConverter::$juststarted boolean = false [line 110]

controls formatting of parser informative output Converter prints: "Converting /path/to/file.php... Procedural Page Elements... Classes..." Since CHMdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that and is purely cosmetic

CHMdefaultConverter::$KLinks array = array() [line 129]

Table of Contents entry for index.hhk

Usedby CHMdefaultConverter::addKLink() - tracks the index

CHMdefaultConverter::$leftindex array = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false) [line 72]

indexes of elements by package that need to be generated


CHMdefaultConverter::$name string = 'default' [line 67] CHMdefaultConverter::$outputformat string = 'CHM' [line 65] CHMdefaultConverter::$package_pages array = array() [line 98]

array of converted package page names. Used to link to the package page in the left index

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 196 of 1382

Var Format: array(package => 1)

CHMdefaultConverter::$page_dir string = [line 78]

output directory for the current procedural page being processed


CHMdefaultConverter::$ric_set mixed = array() [line 124] CHMdefaultConverter::$sort_page_contents_by_type boolean = true [line 63]

CHMdefaultConverter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

CHMdefaultConverter::$wrote mixed = false [line 123] Constructor void function CHMdefaultConverter::CHMdefaultConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 135] Function Parameters:

&$allp &$packp &$classes &$procpages $po $pp $qm $targetDir $templateDir $title

sets $base_dirto $targetDir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 197 of 1382

See Converter::Converter()

void function CHMdefaultConverter::addHHP($file) [line 1700] Function Parameters:

$file

Uses $hhp_files - creates the array by adding parameter $file

void function CHMdefaultConverter::addKLink($name, $file, [$bookmark = ''], [$group = '']) [line 1794] Function Parameters:

string $name index entry name string $file filename containing index string $bookmark html anchor of location in file, if any string $group group this entry with a string

Add an item to the index.hhk file

Author Andrew Eddie < [email protected]> Uses CHMdefaultConverter::$KLinks - tracks the index

void function CHMdefaultConverter::addSourceTOC($name, $file, $package, $subpackage, [$source = false]) [line 1761] Function Parameters:

$name $file $package

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 198 of 1382

$subpackage $source

void function CHMdefaultConverter::addTOC($name, $file, $package, $subpackage, [$class = false], [$tutorial = false]) [line 1772] Function Parameters:

$name $file $package $subpackage $class $tutorial

void function CHMdefaultConverter::convertClass(&$element) [line 828] Function Parameters:

parserClass &$element

Converts class for template output

See Converter::getFormattedInheritedMethods(), Converter::getFormattedInheritedVars() See Converter::prepareDocBlock(), Converter::generateChildClassList(), CHMdefaultConverter::generateFormattedClassTree(), Converter::getFormattedConflicts()

void function CHMdefaultConverter::convertConst(&$element) [line 860] Function Parameters:

parserDefine &$element

Converts class constants for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 199 of 1382

void function CHMdefaultConverter::convertDefine(&$element) [line 909] Function Parameters:

parserDefine &$element

Converts defines for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function CHMdefaultConverter::ConvertErrorLog() [line 698]

Create errors.html template file output This method takes all parsing errors and warnings and spits them out ordered by file and line number.

Global Variable Used ErrorTracker $phpDocumentor_errors: We'll be using it's output facility

void function CHMdefaultConverter::convertFunction(&$element) [line 884] Function Parameters:

parserFunction &$element

Converts function for template output

See Converter::prepareDocBlock(), parserFunction::getFunctionCall(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 200 of 1382

void function CHMdefaultConverter::convertGlobal(&$element) [line 920] Function Parameters:

parserGlobal &$element

Converts global variables for template output


void function CHMdefaultConverter::convertInclude(&$element) [line 897] Function Parameters:

parserInclude &$element

Converts include elements for template output

See Converter::prepareDocBlock()

void function CHMdefaultConverter::convertMethod(&$element) [line 872] Function Parameters:

parserDefine &$element

Converts class methods for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function CHMdefaultConverter::convertPackagepage(&$element) [line 773] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 201 of 1382

parserPackagePage &$element

Converts package page and sets its package as used in $package_pages


void function CHMdefaultConverter::convertPage(&$element) [line 932] Function Parameters:

parserData &$element

converts procedural pages for template output

See Converter::prepareDocBlock(), Converter::getClassesOnPage()

void function CHMdefaultConverter::ConvertTodoList() [line 644] void function CHMdefaultConverter::convertTutorial(&$element) [line 794] Function Parameters:

parserTutorial &$element

void function CHMdefaultConverter::convertVar(&$element) [line 848] Function Parameters:

parserDefine &$element

Converts class variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 202 of 1382

void function CHMdefaultConverter::Convert_RIC($name, $contents) [line 680] Function Parameters:

README|INSTALL|CHANGELOG $name string $contents contents of the file

Convert README/INSTALL/CHANGELOG file contents to output format


void function CHMdefaultConverter::copyMediaRecursively($media, $targetdir, [$subdir = '']) [line 1360] Function Parameters:

$media $targetdir $subdir

void function CHMdefaultConverter::endClass() [line 340]

Writes out the template file of $class_dataand unsets the template to save memory

See Converter::endClass() See registerCurrentClass()

void function CHMdefaultConverter::endPage() [line 363]

Writes out the template file of $page_data and unsets the template to save memory

See Converter::endPage() See registerCurrent()

void function CHMdefaultConverter::formatIndex() [line 427]

CHMdefaultConverter uses this function to format template index.html and packages.html This function generates the package list from $all_packages, eliminating any packages that don't have any entries in their package index (no files at all, due to @ignore or other factors). Then it uses the default package name as the first package index to

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 203 of 1382

display. It sets the right pane to be either a blank file with instructions on making packagelevel docs, or the package-level docs for the default package.

Global Variable Used string $phpDocumentor_DefaultPackageName: Used to set the starting package to display

void function CHMdefaultConverter::formatLeftIndex() [line 523]

Generate indexes for li_package.html and classtree output files This function generates the li_package.html files from the template file left.html. It does this by iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve the pre-sorted abstractLink descendants needed for index generation. Conversion of these links to text is done by returnSee(). The $local parameter is set to false to ensure that paths are correct. Then it uses generateFormattedClassTrees() to create class trees from the template file classtrees.html. Output filename is classtrees_packagename.html. This function also unsets $elements and $pkg_elements to free up the considerable memory these two class vars use

See Converter::$page_elements, Converter::$class_elements, Converter::$function_elements

void function CHMdefaultConverter::formatPkgIndex() [line 395]

CHMdefaultConverter chooses to format both package indexes and the complete index here This function formats output for the elementindex.html and pkgelementindex.html template files. It then writes them to the target directory

See CHMdefaultConverter::generateElementIndex(), CHMdefaultConverter::generatePkgElementIndex()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 204 of 1382

string function CHMdefaultConverter::formatTutorialTOC($toc) [line 311] Function Parameters:

array $toc format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...)

Use the template tutorial_toc.tpl to generate a table of contents for HTML


void function CHMdefaultConverter::generateElementIndex() [line 1321]

Generate alphabetical index of all elements

See Converter::$elements, Converter::walk()

array function CHMdefaultConverter::generateFormattedClassTree($class) [line 959] Function Parameters:

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class

Uses parserClass::getParentClassTree()

void function CHMdefaultConverter::generateFormattedClassTrees($package) [line 1023] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 205 of 1382

See $roots, HTMLConverter::getRootTree()

void function CHMdefaultConverter::generateFormattedInterfaceTrees($package) [line 1077] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of interface inheritance trees

See $roots, HTMLConverter::getRootTree()

string function CHMdefaultConverter::generateKLinks() [line 1815]

Get the table of contents for index.hhk

Author Andrew Eddie < [email protected]>

void function CHMdefaultConverter::generatePkgElementIndex($package) [line 1425] Function Parameters:

string $package name of a package

Generate alphabetical index of all elements by package and subpackage

See Converter::$pkg_elements, Converter::walk(), CHMdefaultConverter::generatePkgElementIndexes()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 206 of 1382

void function CHMdefaultConverter::generatePkgElementIndexes() [line 1476]

See CHMdefaultConverter::generatePkgElementIndex()

void function CHMdefaultConverter::generateTOC() [line 1709]

Usedby bug698356_Output() - assigns to the toc template variable Usedby CHMdefaultConverter::Output() - assigns to the toc template variable

void function CHMdefaultConverter::getCData($value) [line 759] Function Parameters:

$value

mixed function CHMdefaultConverter::getClassLink($expr, $package, [$file = false], [$text = false], [$with_a = true]) [line 1516] Function Parameters:

string $expr name of class string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $with_a return just the URL, or enclose it in an html a tag

See Converter::getClassLink()

mixed function CHMdefaultConverter::getConstLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1631] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 207 of 1382

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of class constant string $class class containing class constant string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function CHMdefaultConverter::getCurrentPageLink() [line 289] mixed function CHMdefaultConverter::getDefineLink($expr, $package, [$file = false], [$text = false], 4) [line 1548] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getDefineLink()

void function CHMdefaultConverter::getExampleLink($path, $title) [line 199] Function Parameters:

$path $title

mixed function CHMdefaultConverter::getFunctionLink($expr, $package, [$file = false], [$text = false], 4) [line 1532] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of function string $package package name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 208 of 1382

string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getFunctionLink()

mixed function CHMdefaultConverter::getGlobalLink($expr, $package, [$file = false], [$text = false], 4) [line 1564] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getGlobalLink()

void function CHMdefaultConverter::getId($element, [$fullpath = true]) [line 591] Function Parameters:

$element $fullpath

array function CHMdefaultConverter::getIndexInformation($elt) [line 1204] Function Parameters:

parserElement $elt descendant of parserElement

Generate indexing information for given element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 209 of 1382

See CHMdefaultConverter::generateElementIndex()

mixed function CHMdefaultConverter::getMethodLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1597] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getMethodLink()

mixed function CHMdefaultConverter::getPageLink($expr, $package, [$path = false], [$text = false], 4) [line 1580] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated

See Converter::getPageLink()

void function CHMdefaultConverter::getPageName(&$element) [line 945] Function Parameters:

&$element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 210 of 1382

string function CHMdefaultConverter::getRootTree($tree, $package, [$noparent = false], $nounknownparent) [line 1134] Function Parameters:

array $tree output from getSortedClassTreeFromClass() string $package package boolean $nounknownparent if true, an object's parent will not be checked $noparent

return formatted class tree for the Class Trees page

See Classes::$definitechild, CHMdefaultConverter::generateFormattedClassTrees()

string function CHMdefaultConverter::getSourceAnchor($sourcefile, $anchor, [$text = ''], [$link = false]) [line 220] Function Parameters:

string $sourcefile full path to source file string $anchor name of anchor string $text link text, if this is a link boolean $link returns either a link or a destination based on this

parameter

Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag.
void function CHMdefaultConverter::getSourceLink($path) [line 204] Function Parameters:

$path

void function CHMdefaultConverter::getTutorialId($package, $subpackage, $tutorial, $id) [line 764] Function Parameters:

$package $subpackage $tutorial

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 211 of 1382

$id

mixed function CHMdefaultConverter::getVarLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1614] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of var string $class class containing var string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function CHMdefaultConverter::Output() [line 1859]

Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler create a CHM file The output function generates the table of contents (contents.hhc) and file (phpdoc.hhp) files used to create a .CHM by the free MS HTML Help compiler. {@, a of all separate .html files is created in CHM format, and written to phpdoc.hhp. This was generated by writefile. Next, a call to the table of contents: 12 phpDocumentor_out("NOTE: to create the documentation.chm file, you must now run Microsoft Help Workshop on phpdoc.hhp\n" ); 13 phpDocumentor_out("To get the free Microsoft Help Workshop, browse to: http://go.microsoft.com/fwlink/?LinkId=14188\n" ); finishes things off}}

to list list list

Link http://www.microsoft.com/downloads/release.asp?releaseid=33071 TODO use to directly call html help compiler hhc.exe Uses CHMdefaultConverter::generateTOC() - assigns to the toc template variable

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 212 of 1382

void function CHMdefaultConverter::postProcess($text) [line 297] Function Parameters:

$text

Uses htmlspecialchars() on the input


string function CHMdefaultConverter::ProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 266] Function Parameters:

string $example boolean $tutorial $inlinesourceparse $class $linenum $filesourcepath

Used to convert the <code> tag in a docblock


int function CHMdefaultConverter::rcNatCmp($a, $b) [line 1645] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array
int function CHMdefaultConverter::rcNatCmp1($a, $b) [line 1661] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array. this one puts constructors first

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 213 of 1382

string function CHMdefaultConverter::returnLink($link, $text) [line 383] Function Parameters:

string $link string $text

void function CHMdefaultConverter::returnSee(&$element, [$eltext = false], [$with_a = true], 3) [line 561] Function Parameters:

boolean 3 determines whether the returned text is enclosed in an <a> tag abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link boolean $with_a this parameter is not used, and is deprecated

This function takes an abstractLink descendant and returns an html link


void function CHMdefaultConverter::setTargetDir($dir) [line 1405] Function Parameters:

$dir

calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied

See Converter::setTargetDir()

void function CHMdefaultConverter::setTemplateDir($dir) [line 1354] Function Parameters:

$dir

void function CHMdefaultConverter::SmartyInit(&$templ) [line 318] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 214 of 1382

&$templ

string function CHMdefaultConverter::sourceLine($linenumber, $line, [$path = false]) [line 242] Function Parameters:

integer $linenumber line number string $line highlighted source code line false|string $path full path to @filesource file this line is a part of, from a complete file.

if this is a single line

Return a line of highlighted source code with formatted line number If the $path is a full path, then an anchor to the line number will be added as well

void function CHMdefaultConverter::TutorialExample($example) [line 275] Function Parameters:

string $example

void function CHMdefaultConverter::unmangle($sourcecode) [line 144] Function Parameters:

$sourcecode

Deprecated in favor of PHP 4.3.0+ tokenizer-based source highlighting

void function CHMdefaultConverter::writeExample($title, $path, $source) [line 179] Function Parameters:

$title $path $source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 215 of 1382

void function CHMdefaultConverter::writefile($file, $contents) [line 1691] Function Parameters:

$file $contents

Write a file to disk, and add it to the $hhp_files list of files to include in the generated CHM 1 function writefile($file,$contents ) 2 { 3 $this -> addHHP( this $ -> targetDir . PATH_DELIMITER .$file); 4 Converter::writefile( $file,$contents ); 5 }

void function CHMdefaultConverter::writeNewPPage($key) [line 491] Function Parameters:

$key

void function CHMdefaultConverter::writeSource($path, $value) [line 160] Function Parameters:

string $path full path to the source file string $value fully highlighted source code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 216 of 1382

HTMLframesConverter.inc
HTML original framed output converter, modified to use Smarty Template. This Converter takes output from the Parser and converts it to HTML-ready output for use with Smarty. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package HTMLframes Author Gregory Beaver < [email protected]> Version CVS: $Id: HTMLframesConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ Copyright 2002-2006 Gregory Beaver See parserDefine, parserFunction, parserMethod, parserVar See parserDocBlock, parserInclude, parserPage, parserClass Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 217 of 1382

HTMLSmartyConverter.inc
HTML output converter for Smarty Template. This Converter takes output from the Parser and converts it to HTML-ready output for use with Smarty. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package HTMLframes Author Joshua Eichorn < [email protected]> Author Greg Beaver < [email protected]> Version CVS: $Id: HTMLSmartyConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ Copyright 2000-2006 Joshua Eichorn, Gregory Beaver See parserDefine, parserFunction, parserMethod, parserVar See parserDocBlock, parserInclude, parserPage, parserClass Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.0rc1 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 218 of 1382

Class HTMLframesConverter
[line 53]

HTML output converter. This Converter takes output from the Parser and converts it to HTML-ready output for use with Smarty.

Package Converters Sub-Package HTMLframes Author Greg Beaver < [email protected]> Version $Id: HTMLframesConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ See parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar Since 1.2

HTMLframesConverter::$base_dir string = [line 88]

target directory passed on the command-line. $targetDir is malleable, always adding package/ and package/subpackage/ subdirectories onto it.

HTMLframesConverter::$class_dir string = [line 94]

output directory for the current class being processed


HTMLframesConverter::$current array = [line 119]

contains all of the template procedural page element loop data needed for the current template
HTMLframesConverter::$currentclass array = [line 125]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 219 of 1382

contains all of the template class element loop data needed for the current template
HTMLframesConverter::$juststarted boolean = false [line 113]

controls formatting of parser informative output Converter prints: "Converting /path/to/file.php... Procedural Page Elements... Classes..." Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that and is purely cosmetic

HTMLframesConverter::$leftindex array = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false) [line 75]

indexes of elements by package that need to be generated


HTMLframesConverter::$name string = 'frames' [line 70] HTMLframesConverter::$outputformat string = 'HTML' [line 68] HTMLframesConverter::$package_pages array = array() [line 101]

array of converted package page names. Used to link to the package page in the left index

Var Format: array(package => 1)

HTMLframesConverter::$page_dir string = [line 81]

output directory for the current procedural page being processed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 220 of 1382

HTMLframesConverter::$processSpecialRoots boolean = true [line 60]

This converter knows about the new root tree processing In order to fix PEAR Bug #6389

HTMLframesConverter::$ric_set mixed = array() [line 127] HTMLframesConverter::$sort_page_contents_by_type boolean = true [line 66]

Smarty Converter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

HTMLframesConverter::$wrote mixed = false [line 126] Constructor void function HTMLframesConverter::HTMLframesConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 133] Function Parameters:

&$allp &$packp &$classes &$procpages $po $pp $qm $targetDir $templateDir $title

sets $base_dirto $targetDir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 221 of 1382

See Converter::Converter()

void function HTMLframesConverter::convertClass(&$element) [line 1030] Function Parameters:

parserClass &$element

Converts class for template output

See Converter::getFormattedInheritedMethods(), Converter::getFormattedInheritedVars() See Converter::prepareDocBlock(), Converter::generateChildClassList(), HTMLframesConverter::generateFormattedClassTree(), Converter::getFormattedConflicts()

void function HTMLframesConverter::convertConst(&$element) [line 1058] Function Parameters:

parserDefine &$element

Converts class variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLframesConverter::convertDefine(&$element) [line 1099] Function Parameters:

parserDefine &$element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 222 of 1382

Converts defines for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLframesConverter::ConvertErrorLog() [line 914]

Create errors.html template file output This method takes all parsing errors and warnings and spits them out ordered by file and line number.

Global Variable Used ErrorTracker $phpDocumentor_errors: We'll be using it's output facility

void function HTMLframesConverter::convertFunction(&$element) [line 1078] Function Parameters:

parserFunction &$element

Converts function for template output

See Converter::prepareDocBlock(), parserFunction::getFunctionCall(), Converter::getFormattedConflicts()

void function HTMLframesConverter::convertGlobal(&$element) [line 1108] Function Parameters:

parserGlobal &$element

Converts global variables for template output

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 223 of 1382

void function HTMLframesConverter::convertInclude(&$element) [line 1089] Function Parameters:

parserInclude &$element

Converts include elements for template output

See Converter::prepareDocBlock()

void function HTMLframesConverter::convertMethod(&$element) [line 1068] Function Parameters:

parserDefine &$element

Converts class methods for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLframesConverter::convertPackagepage(&$element) [line 989] Function Parameters:

parserPackagePage &$element

Converts package page and sets its package as used in $package_pages


void function HTMLframesConverter::convertPage(&$element) [line 1118] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 224 of 1382

parserData &$element

converts procedural pages for template output

See Converter::prepareDocBlock(), Converter::getClassesOnPage()

void function HTMLframesConverter::ConvertTodoList() [line 879] void function HTMLframesConverter::convertTutorial(&$element) [line 1006] Function Parameters:

parserTutorial &$element

void function HTMLframesConverter::convertVar(&$element) [line 1048] Function Parameters:

parserDefine &$element

Converts class variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLframesConverter::Convert_RIC($name, $contents) [line 869] Function Parameters:

README|INSTALL|CHANGELOG $name string $contents contents of the file

Convert README/INSTALL/CHANGELOG file contents to output format

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 225 of 1382

void function HTMLframesConverter::copyMediaRecursively($media, $targetdir, [$subdir = '']) [line 1558] Function Parameters:

$media $targetdir $subdir

void function HTMLframesConverter::endClass() [line 334]

Writes out the template file of $class_dataand unsets the template to save memory

See Converter::endClass() See registerCurrentClass()

void function HTMLframesConverter::endPage() [line 356]

Writes out the template file of $page_data and unsets the template to save memory

See Converter::endPage() See registerCurrent()

void function HTMLframesConverter::formatIndex() [line 626]

HTMLdefaultConverter uses this function to format template index.html and packages.html This function generates the package list from $all_packages, eliminating any packages that don't have any entries in their package index (no files at all, due to @ignore or other factors). Then it uses the default package name as the first package index to display. It sets the right pane to be either a blank file with instructions on making packagelevel docs, or the package-level docs for the default package.

Global Variable Used string $phpDocumentor_DefaultPackageName: Used to set the starting package to display

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 226 of 1382

void function HTMLframesConverter::formatLeftIndex() [line 726]

Generate indexes for li_package.html and classtree output files This function generates the li_package.html files from the template file left.html. It does this by iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve the pre-sorted abstractLink descendants needed for index generation. Conversion of these links to text is done by returnSee(). The $local parameter is set to false to ensure that paths are correct. Then it uses generateFormattedClassTrees() to create class trees from the template file classtrees.html. Output filename is classtrees_packagename.html. This function also unsets $elements and $pkg_elements to free up the considerable memory these two class vars use

See Converter::$page_elements, Converter::$class_elements, Converter::$function_elements

void function HTMLframesConverter::formatPkgIndex() [line 597]

HTMLdefaultConverter chooses to format both package indexes and the complete index here This function formats output for the elementindex.html and pkgelementindex.html template files. It then writes them to the target directory

See HTMLframesConverter::generateElementIndex(), HTMLframesConverter::generatePkgElementIndex()

string function HTMLframesConverter::formatTutorialTOC($toc) [line 306] Function Parameters:

array $toc format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...)

Use the template tutorial_toc.tpl to generate a table of contents for HTML

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 227 of 1382

void function HTMLframesConverter::generateElementIndex() [line 1525]

Generate alphabetical index of all elements

See Converter::$elements, Converter::walk()

array function HTMLframesConverter::generateFormattedClassTree($class) [line 1143] Function Parameters:

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class

Uses parserClass::getParentClassTree()

void function HTMLframesConverter::generateFormattedClassTrees($package) [line 1207] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

See $roots, HTMLConverter::getRootTree()

void function HTMLframesConverter::generateFormattedInterfaceTrees($package) [line 1261] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 228 of 1382

string $package package to generate a class tree for

returns a template-enabled array of interface inheritance trees

See $roots, HTMLConverter::getRootTree()

void function HTMLframesConverter::generatePkgElementIndex($package) [line 1623] Function Parameters:

string $package name of a package

Generate alphabetical index of all elements by package and subpackage

See Converter::$pkg_elements, Converter::walk(), HTMLframesConverter::generatePkgElementIndexes()

void function HTMLframesConverter::generatePkgElementIndexes() [line 1674]

See HTMLframesConverter::generatePkgElementIndex()

void function HTMLframesConverter::getCData($value) [line 980] Function Parameters:

$value

mixed function HTMLframesConverter::getClassLink($expr, $package, [$file = false], [$text = false], [$with_a = true]) [line 1714] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 229 of 1382

string $expr name of class string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $with_a return just the URL, or enclose it in an html a tag

See Converter::getClassLink()

mixed function HTMLframesConverter::getConstLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1829] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of class constant string $class class containing class constant string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function HTMLframesConverter::getCurrentPageLink() [line 284] mixed function HTMLframesConverter::getDefineLink($expr, $package, [$file = false], [$text = false], 4) [line 1746] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 230 of 1382

See Converter::getDefineLink()

void function HTMLframesConverter::getExampleLink($path, $title) [line 194] Function Parameters:

$path $title

mixed function HTMLframesConverter::getFunctionLink($expr, $package, [$file = false], [$text = false], 4) [line 1730] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of function string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getFunctionLink()

mixed function HTMLframesConverter::getGlobalLink($expr, $package, [$file = false], [$text = false], 4) [line 1762] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getGlobalLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 231 of 1382

void function HTMLframesConverter::getId($element, [$fullpath = true]) [line 811] Function Parameters:

$element $fullpath

array function HTMLframesConverter::getIndexInformation($elt) [line 1408] Function Parameters:

parserElement $elt descendant of parserElement

Generate indexing information for given element

See HTMLframesConverter::generateElementIndex()

mixed function HTMLframesConverter::getMethodLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1795] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getMethodLink()

mixed function HTMLframesConverter::getPageLink($expr, $package, [$path = false], [$text = false], 4) [line 1778] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 232 of 1382

string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated

See Converter::getPageLink()

void function HTMLframesConverter::getPageName(&$element) [line 1129] Function Parameters:

&$element

string function HTMLframesConverter::getRootTree($tree, $package, [$noparent = false], $nounknownparent) [line 1318] Function Parameters:

array $tree output from getSortedClassTreeFromClass() string $package package boolean $nounknownparent if true, an object's parent will not be checked $noparent

return formatted class tree for the Class Trees page

See Classes::$definitechild, HTMLframesConverter::generateFormattedClassTrees()

string function HTMLframesConverter::getSourceAnchor($sourcefile, $anchor, [$text = ''], [$link = false]) [line 215] Function Parameters:

string $sourcefile full path to source file string $anchor name of anchor string $text link text, if this is a link boolean $link returns either a link or a destination based on this

parameter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 233 of 1382

Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag.
void function HTMLframesConverter::getSourceLink($path) [line 199] Function Parameters:

$path

void function HTMLframesConverter::getTutorialId($package, $subpackage, $tutorial, $id) [line 975] Function Parameters:

$package $subpackage $tutorial $id

void function HTMLframesConverter::getTutorialTree($tutorial, [$k = false]) [line 548] Function Parameters:

$tutorial $k

mixed function HTMLframesConverter::getVarLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1812] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of var string $class class containing var string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 234 of 1382

void function HTMLframesConverter::makeLeft() [line 380] void function HTMLframesConverter::Output() [line 1886]

This function is not used by HTMLdefaultConverter, but is required by Converter


void function HTMLframesConverter::postProcess($text) [line 292] Function Parameters:

$text

Uses htmlspecialchars() on the input


string function HTMLframesConverter::ProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 260] Function Parameters:

string $example boolean $tutorial $inlinesourceparse $class $linenum $filesourcepath

Used to convert the <code> tag in a docblock


int function HTMLframesConverter::rcNatCmp($a, $b) [line 1843] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array
int function HTMLframesConverter::rcNatCmp1($a, $b) [line 1859] Function Parameters:

mixed $a mixed $b

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 235 of 1382

does a nat case sort on the specified second level value of the array. this one puts constructors first

string function HTMLframesConverter::returnLink($link, $text) [line 375] Function Parameters:

string $link string $text

void function HTMLframesConverter::returnSee(&$element, [$eltext = false], [$with_a = true], 3) [line 781] Function Parameters:

boolean 3 determines whether the returned text is enclosed in an <a> tag abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link boolean $with_a this parameter is not used, and is deprecated

This function takes an abstractLink descendant and returns an html link


void function HTMLframesConverter::setTargetDir($dir) [line 1603] Function Parameters:

$dir

calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied

See Converter::setTargetDir()

void function HTMLframesConverter::SmartyInit(&$templ) [line 313] Function Parameters:

&$templ

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 236 of 1382

string function HTMLframesConverter::sourceLine($linenumber, $line, [$path = false]) [line 236] Function Parameters:

integer $linenumber line number string $line highlighted source code line false|string $path full path to @filesource file this line is a part of, from a complete file.

if this is a single line

Return a line of highlighted source code with formatted line number If the $path is a full path, then an anchor to the line number will be added as well

void function HTMLframesConverter::TutorialExample($example) [line 270] Function Parameters:

string $example

void function HTMLframesConverter::unmangle($sourcecode) [line 142] Function Parameters:

$sourcecode

Deprecated in favor of PHP 4.3.0+ tokenizer-based source highlighting

void function HTMLframesConverter::writeExample($title, $path, $source) [line 176] Function Parameters:

$title $path $source

void function HTMLframesConverter::writeNewPPage($key) [line 695] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 237 of 1382

$key

void function HTMLframesConverter::writeSource($path, $value) [line 158] Function Parameters:

string $path full path to the source file string $value fully highlighted source code

Class HTMLSmartyConverter
[line 54]

HTML output converter. This Converter takes output from the Parser and converts it to HTML-ready output for use with Smarty.

Package Converters Sub-Package HTMLSmarty Author Greg Beaver < [email protected]> Version $Revision: 234145 $ See parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar Since 1.0rc1

HTMLSmartyConverter::$base_dir string = [line 89]

target directory passed on the command-line. $targetDir is malleable, always adding package/ and package/subpackage/ subdirectories onto it.

HTMLSmartyConverter::$class_dir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 238 of 1382

string = [line 95]

output directory for the current class being processed


HTMLSmartyConverter::$current array = [line 120]

contains all of the template procedural page element loop data needed for the current template
HTMLSmartyConverter::$currentclass array = [line 126]

contains all of the template class element loop data needed for the current template
HTMLSmartyConverter::$juststarted boolean = false [line 114]

controls formatting of parser informative output Converter prints: "Converting /path/to/file.php... Procedural Page Elements... Classes..." Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that and is purely cosmetic

HTMLSmartyConverter::$leftindex array = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false) [line 76]

indexes of elements by package that need to be generated


HTMLSmartyConverter::$name string = 'Smarty' [line 71] HTMLSmartyConverter::$outputformat string = 'HTML' [line 69] HTMLSmartyConverter::$package_pages array = array() [line 102]

array of converted package page names.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 239 of 1382

Used to link to the package page in the left index

Var Format: array(package => 1)

HTMLSmartyConverter::$page_dir string = [line 82]

output directory for the current procedural page being processed


HTMLSmartyConverter::$processSpecialRoots boolean = true [line 61]

This converter knows about the new root tree processing In order to fix PEAR Bug #6389

HTMLSmartyConverter::$ric_set mixed = array() [line 128] HTMLSmartyConverter::$sort_page_contents_by_type boolean = true [line 67]

Smarty Converter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

HTMLSmartyConverter::$wrote mixed = false [line 127] Constructor void function HTMLSmartyConverter::HTMLSmartyConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 148] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 240 of 1382

&$allp &$packp &$classes &$procpages $po $pp $qm $targetDir $templateDir $title

void function HTMLSmartyConverter::convertClass(&$element) [line 1078] Function Parameters:

parserClass &$element

Converts class for template output

See Converter::getFormattedInheritedMethods(), Converter::getFormattedInheritedVars() See Converter::prepareDocBlock(), Converter::generateChildClassList(), HTMLSmartyConverter::generateFormattedClassTree(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::convertConst(&$element) [line 1106] Function Parameters:

parserDefine &$element

Converts class variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::convertDefine(&$element) [line 1147] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 241 of 1382

parserDefine &$element

Converts defines for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::ConvertErrorLog() [line 928]

Create errors.html template file output This method takes all parsing errors and warnings and spits them out ordered by file and line number.

Global Variable Used ErrorTracker $phpDocumentor_errors: We'll be using it's output facility

void function HTMLSmartyConverter::convertFunction(&$element) [line 1126] Function Parameters:

parserFunction &$element

Converts function for template output

See Converter::prepareDocBlock(), parserFunction::getFunctionCall(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::convertGlobal(&$element) [line 1157] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 242 of 1382

parserGlobal &$element

Converts global variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::convertInclude(&$element) [line 1137] Function Parameters:

parserInclude &$element

Converts include elements for template output

See Converter::prepareDocBlock()

void function HTMLSmartyConverter::convertMethod(&$element) [line 1116] Function Parameters:

parserDefine &$element

Converts class methods for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function HTMLSmartyConverter::convertPackagepage(&$element) [line 1004]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 243 of 1382

Function Parameters:

parserPackagePage &$element

Converts package page and sets its package as used in $package_pages


void function HTMLSmartyConverter::convertPage(&$element) [line 1167] Function Parameters:

parserData &$element

converts procedural pages for template output

See Converter::prepareDocBlock(), Converter::getClassesOnPage()

void function HTMLSmartyConverter::ConvertTodoList() [line 893] void function HTMLSmartyConverter::convertTutorial(&$element) [line 1034] Function Parameters:

parserTutorial &$element

void function HTMLSmartyConverter::convertVar(&$element) [line 1096] Function Parameters:

parserDefine &$element

Converts class variables for template output

See Converter::prepareDocBlock(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 244 of 1382

void function HTMLSmartyConverter::Convert_RIC($name, $contents) [line 872] Function Parameters:

README|INSTALL|CHANGELOG $name string $contents contents of the file

Convert README/INSTALL/CHANGELOG file contents to output format


void function HTMLSmartyConverter::copyMediaRecursively($media, $targetdir, [$subdir = '']) [line 1611] Function Parameters:

$media $targetdir $subdir

void function HTMLSmartyConverter::endClass() [line 344]

Writes out the template file of $class_dataand unsets the template to save memory

See Converter::endClass() See registerCurrentClass()

void function HTMLSmartyConverter::endPage() [line 523]

Writes out the template file of $page_data and unsets the template to save memory

See Converter::endPage() See registerCurrent()

void function HTMLSmartyConverter::formatIndex() [line 642]

HTMLdefaultConverter uses this function to format template index.html and packages.html This function generates the package list from $all_packages, eliminating any packages that don't have any entries in their package index (no files at all, due to @ignore

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 245 of 1382

or other factors). Then it uses the default package name as the first package index to display. It sets the right pane to be either a blank file with instructions on making packagelevel docs, or the package-level docs for the default package.

Global Variable Used string $phpDocumentor_DefaultPackageName: Used to set the starting package to display

void function HTMLSmartyConverter::formatLeftIndex() [line 740]

Generate indexes for li_package.html and classtree output files This function generates the li_package.html files from the template file left.html. It does this by iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve the pre-sorted abstractLink descendants needed for index generation. Conversion of these links to text is done by returnSee(). Then it uses generateFormattedClassTrees() to create class trees from the template file classtrees.html. Output filename is classtrees_packagename.html. This function also unsets $elements and $pkg_elements to free up the considerable memory these two class vars use

See Converter::$page_elements, Converter::$class_elements, Converter::$function_elements

void function HTMLSmartyConverter::formatPkgIndex() [line 606]

HTMLdefaultConverter chooses to format both package indexes and the complete index here This function formats output for the elementindex.html and pkgelementindex.html template files. It then writes them to the target directory

See HTMLSmartyConverter::generateElementIndex(), HTMLSmartyConverter::generatePkgElementIndex()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 246 of 1382

string function HTMLSmartyConverter::formatTutorialTOC($toc) [line 321] Function Parameters:

array $toc format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...)

Use the template tutorial_toc.tpl to generate a table of contents for HTML


void function HTMLSmartyConverter::generateElementIndex() [line 1578]

Generate alphabetical index of all elements

See Converter::$elements, Converter::walk()

array function HTMLSmartyConverter::generateFormattedClassTree($class) [line 1195] Function Parameters:

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class

Uses parserClass::getParentClassTree()

void function HTMLSmartyConverter::generateFormattedClassTrees($package) [line 1259] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 247 of 1382

See $roots, HTMLConverter::getRootTree()

void function HTMLSmartyConverter::generateFormattedInterfaceTrees($package) [line 1313] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of interface inheritance trees

See $roots, HTMLConverter::getRootTree()

void function HTMLSmartyConverter::generatePkgElementIndex($package) [line 1676] Function Parameters:

string $package name of a package

Generate alphabetical index of all elements by package and subpackage

See Converter::$pkg_elements, Converter::walk(), HTMLSmartyConverter::generatePkgElementIndexes()

void function HTMLSmartyConverter::generatePkgElementIndexes() [line 1726]

See HTMLSmartyConverter::generatePkgElementIndex()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 248 of 1382

void function HTMLSmartyConverter::getCData($value) [line 990] Function Parameters:

$value

void function HTMLSmartyConverter::getClassContents() [line 466] void function HTMLSmartyConverter::getClassLeft() [line 436] mixed function HTMLSmartyConverter::getClassLink($expr, $package, [$file = false], [$text = false], [$with_a = true]) [line 1766] Function Parameters:

string $expr name of class string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $with_a return just the URL, or enclose it in an html a tag

See Converter::getClassLink()

mixed function HTMLSmartyConverter::getConstLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1881] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of class constant string $class class containing class constant string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function HTMLSmartyConverter::getCurrentPageLink() [line 287] mixed function HTMLSmartyConverter::getDefineLink($expr, $package, [$file = false], [$text = false], 4) [line

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 249 of 1382

1798] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getDefineLink()

void function HTMLSmartyConverter::getExampleLink($path, $title) [line 190] Function Parameters:

$path $title

mixed function HTMLSmartyConverter::getFunctionLink($expr, $package, [$file = false], [$text = false], 4) [line 1782] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of function string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getFunctionLink()

mixed function HTMLSmartyConverter::getGlobalLink($expr, $package, [$file = false], [$text = false], 4) [line 1814] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 250 of 1382

string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getGlobalLink()

void function HTMLSmartyConverter::getId($element, [$fullpath = true]) [line 814] Function Parameters:

$element $fullpath

array function HTMLSmartyConverter::getIndexInformation($elt) [line 1460] Function Parameters:

parserElement $elt descendant of parserElement

Generate indexing information for given element

See HTMLSmartyConverter::generateElementIndex()

mixed function HTMLSmartyConverter::getMethodLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1847] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 251 of 1382

See Converter::getMethodLink()

void function HTMLSmartyConverter::getPageContents() [line 482] void function HTMLSmartyConverter::getPageLeft() [line 499] mixed function HTMLSmartyConverter::getPageLink($expr, $package, [$path = false], [$text = false], 4) [line 1830] Function Parameters:

boolean 4 return just the URL, or enclose it in an html a tag string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated

See Converter::getPageLink()

void function HTMLSmartyConverter::getPageName(&$element) [line 1181] Function Parameters:

&$element

string function HTMLSmartyConverter::getRootTree($tree, $package, [$noparent = false], $nounknownparent) [line 1370] Function Parameters:

array $tree output from getSortedClassTreeFromClass() string $package package boolean $nounknownparent if true, an object's parent will not be checked $noparent

return formatted class tree for the Class Trees page

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 252 of 1382

See Classes::$definitechild, HTMLSmartyConverter::generateFormattedClassTrees()

string function HTMLSmartyConverter::getSourceAnchor($sourcefile, $anchor, [$text = ''], [$link = false]) [line 211] Function Parameters:

string $sourcefile full path to source file string $anchor name of anchor string $text link text, if this is a link boolean $link returns either a link or a destination based on this

parameter

Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag.
void function HTMLSmartyConverter::getSourceLink($path) [line 195] Function Parameters:

$path

void function HTMLSmartyConverter::getTutorialId($package, $subpackage, $tutorial, $id) [line 995] Function Parameters:

$package $subpackage $tutorial $id

void function HTMLSmartyConverter::getTutorialList() [line 369] void function HTMLSmartyConverter::getTutorialTree($tutorial, [$k = false]) [line 396] Function Parameters:

$tutorial $k

mixed function HTMLSmartyConverter::getVarLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 1864]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 253 of 1382

Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of var string $class class containing var string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function HTMLSmartyConverter::makeLeft() [line 554] void function HTMLSmartyConverter::Output() [line 1938]

This function is not used by HTMLdefaultConverter, but is required by Converter


void function HTMLSmartyConverter::postProcess($text) [line 307] Function Parameters:

$text

Uses htmlspecialchars() on the input


string function HTMLSmartyConverter::ProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 255] Function Parameters:

string $example boolean $tutorial $inlinesourceparse $class $linenum $filesourcepath

Used to convert the <code> tag in a docblock


int function HTMLSmartyConverter::rcNatCmp($a, $b) [line 1895]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 254 of 1382

Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array
int function HTMLSmartyConverter::rcNatCmp1($a, $b) [line 1911] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array. this one puts constructors first

string function HTMLSmartyConverter::returnLink($link, $text) [line 549] Function Parameters:

string $link string $text

void function HTMLSmartyConverter::returnSee(&$element, [$eltext = false], [$with_a = true], 3) [line 784] Function Parameters:

boolean 3 determines whether the returned text is enclosed in an &lt;a> tag abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link boolean $with_a this parameter is not used, and is deprecated

This function takes an abstractLink descendant and returns an html link


void function HTMLSmartyConverter::setTargetDir($dir) [line 1656] Function Parameters:

$dir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 255 of 1382

calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied

See Converter::setTargetDir()

void function HTMLSmartyConverter::SmartyInit(&$templ) [line 328] Function Parameters:

&$templ

string function HTMLSmartyConverter::sourceLine($linenumber, $line, [$path = false]) [line 232] Function Parameters:

integer $linenumber line number string $line highlighted source code line false|string $path full path to @filesource file this line is a part of, from a complete file.

if this is a single line

Return a line of highlighted source code with formatted line number If the $path is a full path, then an anchor to the line number will be added as well

void function HTMLSmartyConverter::TutorialExample($example) [line 273] Function Parameters:

string $example

void function HTMLSmartyConverter::unmangle($sourcecode) [line 292] Function Parameters:

$sourcecode

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 256 of 1382

void function HTMLSmartyConverter::writeExample($title, $path, $source) [line 172] Function Parameters:

$title $path $source

void function HTMLSmartyConverter::writeNewPPage($key) [line 706] Function Parameters:

$key

void function HTMLSmartyConverter::writeRIC() [line 878] void function HTMLSmartyConverter::writeSource($path, $value) [line 154] Function Parameters:

$path $value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 257 of 1382

class.phpdocpdf.php
Cezpdf callback class customized for phpDocumentor phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package PDFdefault Author Greg Beaver < [email protected]> Version CVS: $Id: class.phpdocpdf.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2000-2006 Joshua Eichorn, Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 Filesource Source Code for this file License LGPL

include_once 'phpDocumentor/Converters/PDF/default/ParserPDF.inc' [line

42]

include_once 'phpDocumentor/Converters/PDF/default/class.ezpdf.php' [line

41]

ezPdf libraries

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 258 of 1382

ParserPDF.inc
This class handles the XML-based CezPDF markup language created to allow templates for the PDFdefaultConverter phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package PDFdefault Author Greg Beaver < [email protected]> Version CVS: $Id: ParserPDF.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2002-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 Filesource Source Code for this file License LGPL

PHPDOCUMENTOR_PDF_EVENT_CONTENT = 601 [line 45]

used for parsing stuff between <text>


PHPDOCUMENTOR_PDF_EVENT_FONT = 602 [line 49]

when <font> is found in an ezText input

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 259 of 1382

PHPDOCUMENTOR_PDF_EVENT_NEWPAGE = 603 [line 53]

when <newpage/> is found in an ezText input


PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION = 604 [line 57]

when <pdffunction> is found in an ezText input


PHPDOCUMENTOR_PDF_EVENT_TEXT = 600 [line 41]

when <text> is found in an ezText input


PHPDOCUMENTOR_PDF_STATE_CONTENT = 701 [line 47]

used for parsing stuff between <text>


PHPDOCUMENTOR_PDF_STATE_FONT = 702 [line 51]

when <font> is found in an ezText input


PHPDOCUMENTOR_PDF_STATE_NEWPAGE = 703 [line 55]

when <newpage/> is found in an ezText input


PHPDOCUMENTOR_PDF_STATE_PDFFUNCTION = 704 [line 59]

when <pdffunction> is found in an ezText input


PHPDOCUMENTOR_PDF_STATE_TEXT = 700 [line 43]

when <text> is found in an ezText input

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 260 of 1382

PDFdefaultConverter.inc
Outputs documentation in PDF format phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package PDFdefault Author Greg Beaver < [email protected]> Version CVS: $Id: PDFdefaultConverter.inc 236747 2007-05-31 02:02:42Z ashnazg $ Copyright 2002-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 Filesource Source Code for this file License LGPL

include_once 'phpDocumentor/Converters/PDF/default/class.phpdocpdf.php' [line

42]

The Cezpdf class library

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 261 of 1382

Class PDFdefaultConverter
[line 55]

PDF output converter. This Converter takes output from the Parser and converts it to PDF-ready output for use with Cezpdf. This is now beta code

Package Converters Sub-Package PDFdefault Author Greg Beaver < [email protected]> Version $Id: PDFdefaultConverter.inc 236747 2007-05-31 02:02:42Z ashnazg $ TODO Implement links to conflicts/inheritance Since 1.1

PDFdefaultConverter::$classpackage_pagenums mixed = array() [line 65] PDFdefaultConverter::$curclasspackage mixed = false [line 71] PDFdefaultConverter::$curpagepackage mixed = false [line 70] PDFdefaultConverter::$leftindex mixed = array('classes' => false, 'pages' => false, 'functions' => false, 'defines' => false, 'globals' => false) [line 63] PDFdefaultConverter::$name string = 'default' [line 69]

Var always default

PDFdefaultConverter::$outputformat string = 'PDF' [line 67]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 262 of 1382

Var always PDF

PDFdefaultConverter::$pagepackage_pagenums mixed = array() [line 64] PDFdefaultConverter::$pdf Cezpdf = false [line 76] PDFdefaultConverter::$ric_set mixed = array() [line 77] PDFdefaultConverter::$smarty_dir mixed = [line 72] PDFdefaultConverter::$sort_absolutely_everything boolean = true [line 62]

default PDF Converter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

PDFdefaultConverter::$_sourcecode array = [line 84]

Source files for appendix C are stored here Format: array(array(package => array(highlightedsource code 1, ...)))

packagename,

code

=>

Constructor void function PDFdefaultConverter::PDFdefaultConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 88] Function Parameters:

&$allp &$packp

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 263 of 1382

&$classes &$procpages $po $pp $qm $targetDir $templateDir $title

See Converter::Converter()

void function PDFdefaultConverter::convertClass(&$element) [line 461] Function Parameters:

&$element

void function PDFdefaultConverter::convertConst(&$element) [line 439] Function Parameters:

&$element

void function PDFdefaultConverter::convertDefine(&$element) [line 541] Function Parameters:

&$element

void function PDFdefaultConverter::convertDocBlock(&$element) [line 249] Function Parameters:

&$element

void function PDFdefaultConverter::convertFunction(&$element) [line 508] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 264 of 1382

&$element

void function PDFdefaultConverter::convertGlobal(&$element) [line 349] Function Parameters:

&$element

void function PDFdefaultConverter::convertInclude(&$element) [line 494] Function Parameters:

&$element

void function PDFdefaultConverter::convertMethod(&$element) [line 376] Function Parameters:

&$element

void function PDFdefaultConverter::convertPackagepage(&$element) [line 638] Function Parameters:

&$element

Deprecated html package pages just don't work with PDF, use phpDocumentor Tutorials

void function PDFdefaultConverter::convertPage(&$element) [line 562] Function Parameters:

&$element

void function PDFdefaultConverter::convertParams(&$element) [line 331] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 265 of 1382

&$element

void function PDFdefaultConverter::convertTutorial(&$element) [line 645] Function Parameters:

&$element

void function PDFdefaultConverter::convertVar(&$element) [line 416] Function Parameters:

&$element

void function PDFdefaultConverter::Convert_RIC($name, $contents) [line 244] Function Parameters:

README|INSTALL|CHANGELOG $name string $contents contents of the file

Convert README/INSTALL/CHANGELOG file contents to output format


void function PDFdefaultConverter::generateFormattedClassTrees($package) [line 665] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

See $roots, PDFdefaultConverter::getRootTree()

void function PDFdefaultConverter::getCData($value) [line 630] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 266 of 1382

$value

mixed function PDFdefaultConverter::getClassLink($expr, $package, [$file = false], [$text = false]) [line 843] Function Parameters:

string $expr name of class string $package package name string $file full path to look in (used in index generation) $text

See Converter::getClassLink()

mixed function PDFdefaultConverter::getConstLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 953] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of class constant string $class class containing class constant string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getConstLink()

mixed function PDFdefaultConverter::getDefineLink($expr, $package, [$file = false], [$text = false]) [line 873] Function Parameters:

string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 267 of 1382

See Converter::getDefineLink()

void function PDFdefaultConverter::getExampleLink($path, $title) [line 140] Function Parameters:

$path $title

void function PDFdefaultConverter::getFileSourceName($path, [$anchor = '']) [line 152] Function Parameters:

$path $anchor

mixed function PDFdefaultConverter::getFunctionLink($expr, $package, [$file = false], [$text = false]) [line 858] Function Parameters:

string $expr name of function string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getFunctionLink()

mixed function PDFdefaultConverter::getGlobalLink($expr, $package, [$file = false], [$text = false]) [line 888] Function Parameters:

string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 268 of 1382

See Converter::getGlobalLink()

void function PDFdefaultConverter::getGlobalValue($value) [line 371] Function Parameters:

$value

mixed function PDFdefaultConverter::getMethodLink($expr, $class, $package, [$file = false], [$text = false]) [line 919] Function Parameters:

string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getMethodLink()

mixed function PDFdefaultConverter::getPageLink($expr, $package, [$path = false], [$text = false]) [line 903] Function Parameters:

string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated

See Converter::getPageLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 269 of 1382

void function PDFdefaultConverter::getPageName(&$element) [line 619] Function Parameters:

&$element

string function PDFdefaultConverter::getRootTree($tree, $package) [line 684] Function Parameters:

array $tree output from getSortedClassTreeFromClass() $package

return formatted class tree for the Class Trees page

See Classes::$definitechild, PDFdefaultConverter::generateFormattedClassTrees()

string function PDFdefaultConverter::getSourceAnchor($sourcefile, $anchor, [$text = ''], [$link = false]) [line 167] Function Parameters:

string $sourcefile full path to source file string $anchor name of anchor string $text link text, if this is a link boolean $link returns either a link or a destination based on this

parameter

Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag.
void function PDFdefaultConverter::getSourceLink($path) [line 146] Function Parameters:

$path

1 function PDFdefaultConverter::getState() [line 967] void function PDFdefaultConverter::getTutorialId($package, $subpackage, $tutorial, $id) [line 625] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 270 of 1382

$package $subpackage $tutorial $id

mixed function PDFdefaultConverter::getVarLink($expr, $class, $package, [$file = false], [$text = false], 5) [line 936] Function Parameters:

boolean 5 return just the URL, or enclose it in an html a tag string $expr name of var string $class class containing var string $package package name string $file full path to look in (used in index generation) boolean $text deprecated

See Converter::getVarLink()

void function PDFdefaultConverter::mystrnatcasecmp($a, $b) [line 830] Function Parameters:

$a $b

void function PDFdefaultConverter::Output([$title = 'Generated Documentation']) [line 751] Function Parameters:

$title

calls Cezpdf::ezOutput() and writes documentation.pdf to targetDir


void function PDFdefaultConverter::postProcess($text) [line 121] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 271 of 1382

$text

string function PDFdefaultConverter::returnLink($link, $text) [line 234] Function Parameters:

string $link string $text

void function PDFdefaultConverter::returnSee(&$element, [$eltext = false]) [line 184] Function Parameters:

abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link

Returns a bookmark using Cezpdf 009


void function PDFdefaultConverter::setTemplateDir($dir) [line 960] Function Parameters:

$dir

string function PDFdefaultConverter::TranslateTag($name, $attr, $cdata, $unconvertedcdata) [line 602] Function Parameters:

string $name tag name string $attr any attributes Format: array(name => value) string $cdata the tag contents, if any string $unconvertedcdata the tag contents, if any, unpost-processed

Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template.
void function PDFdefaultConverter::unmangle($notused, $source) [line 975] Function Parameters:

$notused $source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 272 of 1382

See Converter::unmangle()

void function PDFdefaultConverter::writeExample($title, $path, $source) [line 126] Function Parameters:

$title $path $source

void function PDFdefaultConverter::writeSource($path, $value) [line 106] Function Parameters:

$path $value

Class PDFParser
[line 68]
Package Converters Sub-Package PDFdefault Author Greg Beaver < [email protected]> Version $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2000-2007 Kellin, Joshua Eichorn Since 1.2 Usedby phpdocpdf::ezText() - extracts all meta-tags and processes text for output

Constructor void function PDFParser::PDFParser() [line 89]

Sets up the wordparser for this class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 273 of 1382

void function PDFParser::getParserEventName($value) [line 549] Function Parameters:

integer $value

Return the name of the parser event


bool function PDFParser::parse($parse_data, $fontdir, &$pdf, [$debug = false]) [line 105] Function Parameters:

string $parse_data text to parse for PDFParser XML tags string $fontdir full path to the font directory phpdocpdf &$pdf boolean $debug determines whether output is saved in a variable or directly to the output

added

Parse text for PDFParser XML tags, and add the text to the PDF file

Static Variable Used integer $endrecur: used for recursion limiting if a handler for an event is not found

void function PDFParser::setupStates() [line 485]

setup the parser tokens, and the pushEvent/popEvent arrays

See Publisher::$tokens, Publisher::$pushEvent, Publisher::$popEvent

Class phpdocpdf
[line 50]
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 274 of 1382

Package Converters Sub-Package PDFdefault Author Wayne Munro, R&OS Ltd, http://www.ros.co.nz/pdf Version 009 (versioning is linked to class.pdf.php) released under a public domain licence.

phpdocpdf::$converter mixed = [line 57] phpdocpdf::$font_dir mixed = false [line 55] phpdocpdf::$indents mixed = array() [line 54] phpdocpdf::$indexContents mixed = array() [line 53] phpdocpdf::$listType mixed = 'ordered' [line 59] phpdocpdf::$reportContents mixed = array() [line 52] phpdocpdf::$set_pageNumbering mixed = false [line 56] phpdocpdf::$_colorStack mixed = array() [line 60] phpdocpdf::$_save mixed = '' [line 58] Constructor void function phpdocpdf::phpdocpdf(&$pdfconverter, $fontdir, [$paper = 'a4'], [$orientation = 'portrait']) [line 62] Function Parameters:

&$pdfconverter $fontdir $paper $orientation

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 275 of 1382

void function phpdocpdf::addMessage($message) [line 263] Function Parameters:

$message

void function phpdocpdf::bullet($Data) [line 322] Function Parameters:

$Data

Author Murray Shields

void function phpdocpdf::dots($info) [line 175] Function Parameters:

$info

void function phpdocpdf::ezNewPage([$debug = false]) [line 341] Function Parameters:

$debug

void function phpdocpdf::ezOutput([$debug = false], $template) [line 232] Function Parameters:

$debug $template

void function phpdocpdf::ezProcessText($text) [line 270] Function Parameters:

$text

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 276 of 1382

void function phpdocpdf::ezText($text, [$size = 0], [$options = array()], [$test = 0]) [line 215] Function Parameters:

$text $size $options $test

Uses PDFParser - extracts all meta-tags and processes text for output

void function phpdocpdf::getColor() [line 72]

This really should be in the parent class


void function phpdocpdf::getYPlusOffset($offset) [line 258] Function Parameters:

$offset

void function phpdocpdf::indent($info) [line 300] Function Parameters:

$info

void function phpdocpdf::index($info) [line 142] Function Parameters:

$info

void function phpdocpdf::IndexLetter($info) [line 152] Function Parameters:

$info

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 277 of 1382

void function phpdocpdf::orderedBullet($info) [line 336] Function Parameters:

$info

void function phpdocpdf::rf($info) [line 132] Function Parameters:

$info

void function phpdocpdf::setColorArray($color) [line 77] Function Parameters:

$color

void function phpdocpdf::setHTMLColor($color) [line 105] Function Parameters:

$color

void function phpdocpdf::setupTOC() [line 225] void function phpdocpdf::textcolor($info) [line 111] Function Parameters:

$info

void function phpdocpdf::validHTMLColor($color) [line 100] Function Parameters:

$color

void function phpdocpdf::_ezText($text, [$size = 0], [$options = array()], [$test = 0]) [line 253] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 278 of 1382

$text $size $options $test

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 279 of 1382

XMLDocBookpeardoc2Converter.inc
Outputs documentation in XML DocBook format, in the version expected by pear.php.net's documentation team phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package Converters Sub-Package XMLDocBook Author Greg Beaver < [email protected]> Version CVS: $Id: XMLDocBookpeardoc2Converter.inc 234423 2007-04-24 21:32:15Z ashnazg $ Copyright 2002-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 280 of 1382

XMLDocBookConverter.inc
XML output converter for DocBook. This Converter takes output from the Parser and converts it to DocBook output

Package Converters Sub-Package XMLDocBook Author Greg Beaver < [email protected]> Version $Id: XMLDocBookConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ See parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar Since 1.0

Class XMLDocBookConverter
[line 43]

XML DocBook converter. This Converter takes output from the Parser and converts it to DocBook output

Package Converters Sub-Package XMLDocBook Author Greg Beaver < [email protected]> Version $Id: XMLDocBookConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ See parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar TODO templates TODO indexes for other DocBook converters not based on peardoc Since 1.0

XMLDocBookConverter::$base_dir string = [line 101]

target directory passed on the command-line.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 281 of 1382

$targetDir is malleable, always adding package/ and package/subpackage/ subdirectories onto it.

XMLDocBookConverter::$category string = [line 162]

peardoc2 Category
XMLDocBookConverter::$class string = [line 82]

name of current class being converted


XMLDocBookConverter::$class_data Template = [line 113]

template for the class currently being processed


XMLDocBookConverter::$class_dir string = [line 107]

output directory for the current class being processed


XMLDocBookConverter::$current array = [line 138]

contains all of the template procedural page element loop data needed for the current template
XMLDocBookConverter::$currentclass array = [line 144]

contains all of the template class element loop data needed for the current template
XMLDocBookConverter::$function_data mixed = array() [line 155] XMLDocBookConverter::$juststarted

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 282 of 1382

boolean = false [line 132]

controls formatting of parser informative output Converter prints: "Converting /path/to/file.php... Procedural Page Elements... Classes..." Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that and is purely cosmetic

XMLDocBookConverter::$leftindex array = array('classes' => true, 'pages' => true, 'functions' => false, 'defines' => false, 'globals' => false) [line 59]

indexes of elements by package that need to be generated


XMLDocBookConverter::$local boolean = true [line 64]

whether a @see is going to be in the $base_dir or in a package/subpackage , subdirectory of $base_dir


XMLDocBookConverter::$method_data mixed = array() [line 156] XMLDocBookConverter::$name string = 'DocBook' [line 54] XMLDocBookConverter::$outputformat string = 'XML' [line 52] XMLDocBookConverter::$package_pages array = array() [line 120]

array of converted package page names. Used to link to the package page in the left index

Var Format: array(package => 1)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 283 of 1382

XMLDocBookConverter::$page string = [line 70]

name of current page being converted


XMLDocBookConverter::$page_data Template = [line 88]

template for the procedural page currently being processed


XMLDocBookConverter::$page_dir string = [line 94]

output directory for the current procedural page being processed


XMLDocBookConverter::$path string = [line 76]

path of current page being converted


XMLDocBookConverter::$sort_page_contents_by_type boolean = true [line 50]

XMLDocBookConverter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

XMLDocBookConverter::$sourceloc mixed = '' [line 157] XMLDocBookConverter::$template_options array = array('usepear' => false) [line 153]

template options. Currently only 1 recognized option usepear usepear tells the getLink() function to return a package link to PEAR and

Generated

by

phpDocumentor

v1.4.3

http://www.phpdoc.org

http://pear.php.net/package/PhpDocumentor

http://www.sourceforge.net/projects/phpdocu

Page 284 of 1382

PEAR_ERROR if possible, and to link directly to the fully-delimited link package#class.method or package#file.method in PEAR style, if possible, even if the package is not parsed. This will allow parsing of separate PEAR packages without parsing the entire thing at once!

Constructor void function XMLDocBookConverter::XMLDocBookConverter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 167] Function Parameters:

&$allp &$packp &$classes &$procpages $po $pp $qm $targetDir $templateDir $title

sets $base_dirto $targetDir

See Converter::Converter()

void function XMLDocBookConverter::convertClass(&$element) [line 811] Function Parameters:

parserClass &$element

Converts class for template output

See Converter::getFormattedInheritedMethods(), Converter::getFormattedInheritedVars() See XMLDocBookConverter::prepareDocBlock(), Converter::generateChildClassList(), XMLDocBookConverter::generateFormattedClassTree(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 285 of 1382

void function XMLDocBookConverter::convertDefine(&$element) [line 1021] Function Parameters:

parserDefine &$element

Converts defines for template output

See XMLDocBookConverter::prepareDocBlock(), Converter::getFormattedConflicts()

void function XMLDocBookConverter::ConvertErrorLog() [line 625]

Create errors.html template file output This method takes all parsing errors and warnings and spits them out ordered by file and line number.

Global Variable Used ErrorTracker $phpDocumentor_errors: We'll be using it's output facility

void function XMLDocBookConverter::convertFunction(&$element) [line 952] Function Parameters:

parserFunction &$element

Converts function for template output

See XMLDocBookConverter::prepareDocBlock(), parserFunction::getFunctionCall(), Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 286 of 1382

void function XMLDocBookConverter::convertGlobal(&$element) [line 1040] Function Parameters:

parserGlobal &$element

Converts global variables for template output

See XMLDocBookConverter::prepareDocBlock(), Converter::getFormattedConflicts()

void function XMLDocBookConverter::convertInclude(&$element) [line 1003] Function Parameters:

parserInclude &$element

Converts include elements for template output

See XMLDocBookConverter::prepareDocBlock()

void function XMLDocBookConverter::convertMethod(&$element) [line 873] Function Parameters:

parserMethod &$element

Converts method for template output

See XMLDocBookConverter::prepareDocBlock(), parserMethod::getFunctionCall(),

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 287 of 1382

Converter::getFormattedDescMethods(), Converter::getFormattedOverrides()

void function XMLDocBookConverter::convertPackagePage(&$element) [line 712] Function Parameters:

parserPackagePage &$element

Converts package page and sets its package as used in $package_pages


void function XMLDocBookConverter::convertPage(&$element) [line 1062] Function Parameters:

parserData &$element

converts procedural pages for template output

See XMLDocBookConverter::prepareDocBlock(), Converter::getClassesOnPage()

void function XMLDocBookConverter::convertTutorial(&$element) [line 736] Function Parameters:

&$element

void function XMLDocBookConverter::convertVar(&$element) [line 774] Function Parameters:

parserVar &$element

Converts class variables for template output.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 288 of 1382

See XMLDocBookConverter::prepareDocBlock(), Converter::getFormattedOverrides()

void function XMLDocBookConverter::endClass() [line 217]

Writes out the template file of $class_dataand unsets the template to save memory

See Converter::endClass() See registerCurrentClass()

void function XMLDocBookConverter::endPage() [line 249]

Writes out the template file of $page_data and unsets the template to save memory

See Converter::endPage() See registerCurrent()

void function XMLDocBookConverter::formatIndex() [line 360]

HTMLdefaultConverter uses this function to format template index.html and packages.html This function generates the package list from $all_packages, eliminating any packages that don't have any entries in their package index (no files at all, due to @ignore or other factors). Then it uses the default package name as the first package index to display. It sets the right pane to be either a blank file with instructions on making packagelevel docs, or the package-level docs for the default package.

Global Variable Used string $phpDocumentor_DefaultPackageName: Used to set the starting package to display

void function XMLDocBookConverter::formatLeftIndex() [line 438]

Generate indexes for li_package.html and classtree output files

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 289 of 1382

This function generates the li_package.html files from the template file left.html. It does this by iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve the pre-sorted abstractLink descendants needed for index generation. Conversion of these links to text is done by returnSee(). The $local parameter is set to false to ensure that paths are correct. Then it uses generateFormattedClassTrees() to create class trees from the template file classtrees.html. Output filename is classtrees_packagename.html. This function also unsets $elements and $pkg_elements to free up the considerable memory these two class vars use

See Converter::$page_elements, Converter::$class_elements, Converter::$function_elements

void function XMLDocBookConverter::formatPkgIndex() [line 327]

HTMLdefaultConverter chooses to format both package indexes and the complete index here This function formats output for the elementindex.html and pkgelementindex.html template files. It then writes them to the target directory

See XMLDocBookConverter::generateElementIndex(), XMLDocBookConverter::generatePkgElementIndex()

void function XMLDocBookConverter::generateElementIndex() [line 1259]

Generate alphabetical index of all elements

See Converter::$elements, Converter::walk()

array function XMLDocBookConverter::generateFormattedClassTree($class) [line 1122] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 290 of 1382

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class

Uses parserClass::getParentClassTree()

void function XMLDocBookConverter::generateFormattedClassTrees($package) [line 1172] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

See $roots, HTMLConverter::getRootTree()

void function XMLDocBookConverter::generatePkgElementIndex($package) [line 1447] Function Parameters:

string $package name of a package

Generate alphabetical index of all elements by package and subpackage

See Converter::$pkg_elements, Converter::walk(), XMLDocBookConverter::generatePkgElementIndexes()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 291 of 1382

void function XMLDocBookConverter::generatePkgElementIndexes() [line 1587]

See XMLDocBookConverter::generatePkgElementIndex()

void function XMLDocBookConverter::getCData($value) [line 703] Function Parameters:

$value

mixed function XMLDocBookConverter::getClassLink($expr, $package, [$file = false], [$text = false], [$local = true], [$with_a = true]) [line 1627] Function Parameters:

string $expr name of class string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag $with_a

See Converter::getClassLink()

mixed function XMLDocBookConverter::getDefineLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1659] Function Parameters:

string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getDefineLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 292 of 1382

mixed function XMLDocBookConverter::getFunctionLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1643] Function Parameters:

string $expr name of function string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getFunctionLink()

mixed function XMLDocBookConverter::getGlobalLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1675] Function Parameters:

string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getGlobalLink()

string function XMLDocBookConverter::getId(&$el) [line 574] Function Parameters:

mixed &$el descendant of parserElement or parserData/parserPage

Get the id value needed to allow linking

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 293 of 1382

See parserElement, parserData, parserPage

void function XMLDocBookConverter::getLink($expr, [$package = false], [$packages = false]) [line 175] Function Parameters:

$expr $package $packages

do that stuff in $template_options


mixed function XMLDocBookConverter::getMethodLink($expr, $class, $package, [$file = false], [$text = false], [$local = true]) [line 1708] Function Parameters:

string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getMethodLink()

mixed function XMLDocBookConverter::getPageLink($expr, $package, [$path = false], [$text = false], [$local = true]) [line 1691] Function Parameters:

string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 294 of 1382

See Converter::getPageLink()

void function XMLDocBookConverter::getPageName(&$element) [line 1109] Function Parameters:

&$element

string function XMLDocBookConverter::getRootTree($tree, $package) [line 1191] Function Parameters:

array $tree output from getSortedClassTreeFromClass() $package

return formatted class tree for the Class Trees page

See Classes::$definitechild, XMLDocBookConverter::generateFormattedClassTrees()

void function XMLDocBookConverter::getTutorialId($package, $subpackage, $tutorial, $id) [line 696] Function Parameters:

$package $subpackage $tutorial $id

mixed function XMLDocBookConverter::getVarLink($expr, $class, $package, [$file = false], [$text = false], [$local = true]) [line 1725] Function Parameters:

string $expr name of var string $class class containing var string $package package name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 295 of 1382

string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getVarLink()

void function XMLDocBookConverter::makeLeft() [line 282] void function XMLDocBookConverter::Output() [line 1782]

This function is not used by HTMLdefaultConverter, but is required by Converter


void function XMLDocBookConverter::postProcess($text) [line 686] Function Parameters:

$text

void function XMLDocBookConverter::prepareDocBlock(&$element, [$nopackage = true]) [line 691] Function Parameters:

&$element $nopackage

int function XMLDocBookConverter::rcNatCmp($a, $b) [line 1739] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array
int function XMLDocBookConverter::rcNatCmp1($a, $b) [line 1755] Function Parameters:

mixed $a mixed $b

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 296 of 1382

does a nat case sort on the specified second level value of the array. this one puts constructors first

string function XMLDocBookConverter::returnLink($link, $text) [line 277] Function Parameters:

string $link string $text

void function XMLDocBookConverter::returnSee(&$element, [$eltext = false], [$local = true], [$with_a = true]) [line 476] Function Parameters:

abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link boolean $local this parameter is not used, and is deprecated boolean $with_a determines whether the returned text is enclosed in an &lt;a> tag

This function takes an abstractLink descendant and returns an html link


void function XMLDocBookConverter::setTargetDir($dir) [line 1387] Function Parameters:

$dir

calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied

See Converter::setTargetDir()

void function XMLDocBookConverter::setTemplateDir($dir) [line 1377] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 297 of 1382

$dir

void function XMLDocBookConverter::SmartyInit(&$templ) [line 205] Function Parameters:

&$templ

void function XMLDocBookConverter::type_adjust($typename) [line 186] Function Parameters:

$typename

void function XMLDocBookConverter::unmangle($s, $sourcecode) [line 180] Function Parameters:

$s $sourcecode

void function XMLDocBookConverter::writeNewPPage($key) [line 406] Function Parameters:

$key

Class XMLDocBookpeardoc2Converter
[line 58]

XML DocBook converter. This Converter takes output from the Parser and converts it to DocBook output for PEAR documentation. This Converter differs from the parent DocBook Converter in that it does not recognize the possibility of procedural pages or of functions! All functions must be defined as static methods for namespace purposes. In addition, all constants and global variables for a package are grouped together as per peardoc2 requirements. Include statements are

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 298 of 1382

not documented. If you want to document a normal project, don't use the peardoc2 converter, use the DocBook converter.

Package Converters Sub-Package XMLDocBook Author Greg Beaver < [email protected]> Version $Id: XMLDocBookpeardoc2Converter.inc 234423 2007-04-24 21:32:15Z ashnazg $ Since 1.2

XMLDocBookpeardoc2Converter::$base_dir string = [line 134]

target directory passed on the command-line. $targetDir is malleable, always adding package/ and package/subpackage/ subdirectories onto it.

XMLDocBookpeardoc2Converter::$category string = [line 207]

peardoc2 Category
XMLDocBookpeardoc2Converter::$class string = [line 103]

name of current class being converted


XMLDocBookpeardoc2Converter::$class_data Template = [line 146]

template for the class currently being processed


XMLDocBookpeardoc2Converter::$class_dir string = [line 140]

output directory for the current class being processed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 299 of 1382

XMLDocBookpeardoc2Converter::$current array = [line 176]

contains all of the template procedural page element loop data needed for the current template
XMLDocBookpeardoc2Converter::$currentclass array = [line 182]

contains all of the template class element loop data needed for the current template
XMLDocBookpeardoc2Converter::$function_data mixed = array() [line 198] XMLDocBookpeardoc2Converter::$juststarted boolean = false [line 170]

controls formatting of parser informative output Converter prints: "Converting /path/to/file.php... Procedural Page Elements... Classes..." Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that and is purely cosmetic

XMLDocBookpeardoc2Converter::$leftindex array = array('classes' => true, 'pages' => false, 'functions' => false, 'defines' => true, 'globals' => true) [line 80]

indexes of elements by package that need to be generated


XMLDocBookpeardoc2Converter::$local boolean = true [line 85]

whether a @see is going to be in the $base_dir or in a package/subpackage , subdirectory of $base_dir


XMLDocBookpeardoc2Converter::$method_data mixed = array() [line 199] XMLDocBookpeardoc2Converter::$name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 300 of 1382

string = 'DocBook/peardoc2' [line 75] XMLDocBookpeardoc2Converter::$outputformat string = 'XML' [line 73] XMLDocBookpeardoc2Converter::$packagexml Smarty = [line 159]

Contents of the packagename.xml file are stored in this template variable


XMLDocBookpeardoc2Converter::$package_pages array = array() [line 153]

array of converted package page names. Used to link to the package page in the left index

Var Format: array(package => 1)

XMLDocBookpeardoc2Converter::$page string = [line 91]

name of current page being converted


XMLDocBookpeardoc2Converter::$page_data Template = [line 109]

template for the procedural page currently being processed


XMLDocBookpeardoc2Converter::$page_dir string = [line 115]

output directory for the current procedural page being processed


XMLDocBookpeardoc2Converter::$path string = [line 97]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 301 of 1382

path of current page being converted


XMLDocBookpeardoc2Converter::$processSpecialRoots boolean = true [line 65]

This converter knows about the new root tree processing In order to fix PEAR Bug #6389

XMLDocBookpeardoc2Converter::$sort_absolutely_everything mixed = true [line 187]

Pass elements by package, simplifies generation of package.xml/category.xml


XMLDocBookpeardoc2Converter::$sort_page_contents_by_type boolean = true [line 71]

XMLDocBookConverter wants elements sorted by type as well as alphabetically

See Converter::$sort_page_contents_by_type

XMLDocBookpeardoc2Converter::$sourceloc mixed = '' [line 202] XMLDocBookpeardoc2Converter::$template_options array = array('usepear' => false) [line 196]

template options. Currently only 1 recognized option usepear usepear tells the getLink() function to return a package link to PEAR and PEAR_ERROR if possible, and to link directly to the fully-delimited link package#class.method or package#file.method in PEAR style, if possible, even if the package is not parsed. This will allow parsing of separate PEAR packages without parsing the entire thing at once!

XMLDocBookpeardoc2Converter::$_peardoc2_constants

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 302 of 1382

array = false [line 121]

Constants, used for constants.tpl


XMLDocBookpeardoc2Converter::$_peardoc2_globals array = false [line 127]

Global Variables, used for globals.tpl


XMLDocBookpeardoc2Converter::$_write_constants_xml mixed = array() [line 200] XMLDocBookpeardoc2Converter::$_write_globals_xml mixed = array() [line 201] Constructor void function XMLDocBookpeardoc2Converter::XMLDocBookpeardoc2Converter(&$allp, &$packp, &$classes, &$procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) [line 220] Function Parameters:

&$allp &$packp &$classes &$procpages $po $pp $qm $targetDir $templateDir $title

sets $base_dirto $targetDir

See Converter::Converter()

void function XMLDocBookpeardoc2Converter::addSummaryToPackageXml($template_output) [line 345] Function Parameters:

$template_output

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 303 of 1382

void function XMLDocBookpeardoc2Converter::Br($input) [line 681] Function Parameters:

$input

void function XMLDocBookpeardoc2Converter::convertClass(&$element) [line 793] Function Parameters:

parserClass &$element

Converts class for template output

Uses XMLDocBookpeardoc2Converter::flushPackageXml() - creates packagename.xml file when all classes in a package have been converted

void function XMLDocBookpeardoc2Converter::convertDefine(&$element) [line 1009] Function Parameters:

parserDefine &$element

Converts defines for template output

See XMLDocBookpeardoc2Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function XMLDocBookpeardoc2Converter::ConvertErrorLog() [line 565]

Create errors.html template file output This method takes all parsing errors and warnings and spits them out ordered by file and line number.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 304 of 1382

Global Variable Used ErrorTracker $phpDocumentor_errors: We'll be using it's output facility

void function XMLDocBookpeardoc2Converter::convertFunction(&$element) [line 937] Function Parameters:

parserFunction &$element

Converts function for template output - does nothing in peardoc2!


void function XMLDocBookpeardoc2Converter::convertGlobal(&$element) [line 1049] Function Parameters:

parserGlobal &$element

Converts global variables for template output

See XMLDocBookpeardoc2Converter::prepareDocBlock(), Converter::getFormattedConflicts()

void function XMLDocBookpeardoc2Converter::convertInclude(&$element) [line 989] Function Parameters:

parserInclude &$element

Converts include elements for template output Completely ignored by this converter

void function XMLDocBookpeardoc2Converter::convertMethod(&$element) [line 861] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 305 of 1382

parserMethod &$element

Converts method for template output

See XMLDocBookpeardoc2Converter::prepareDocBlock(), parserMethod::getFunctionCall(), Converter::getFormattedDescMethods(), Converter::getFormattedOverrides()

void function XMLDocBookpeardoc2Converter::convertPackagePage(&$element) [line 708] Function Parameters:

parserPackagePage &$element

Does nothing - use tutorials for DocBook


void function XMLDocBookpeardoc2Converter::convertPage(&$element) [line 1099] Function Parameters:

parserData &$element

converts procedural pages for template output

See XMLDocBookpeardoc2Converter::prepareDocBlock(), Converter::getClassesOnPage()

void function XMLDocBookpeardoc2Converter::convertTutorial(&$element) [line 716] Function Parameters:

parserTutorial &$element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 306 of 1382

Convert tutorials for output


void function XMLDocBookpeardoc2Converter::convertVar(&$element) [line 755] Function Parameters:

parserVar &$element

Does nothing in this converter


void function XMLDocBookpeardoc2Converter::endClass() [line 322]

Writes out the template file of $class_dataand unsets the template to save memory

See registerCurrentClass() See Converter::endClass() TODO move class summary into an array to be written out at the end package

of parsing each

string function XMLDocBookpeardoc2Converter::exampleProgramExample($example, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null]) [line 276] Function Parameters:

string $example boolean $tutorial true if this is to highlight a tutorial <programlisting> $inlinesourceparse $class $linenum $filesourcepath

Used to convert the {@example} inline tag in a docblock. By default, this just wraps ProgramExample

See XMLDocBookpeardoc2Converter::exampleProgramExample

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 307 of 1382

void function XMLDocBookpeardoc2Converter::flushPackageXml($element) [line 353] Function Parameters:

parserClass|false $element is false if this is the end of all conversion

Usedby XMLDocBookpeardoc2Converter::convertClass() - creates packagename.xml file when all classes in a package have been converted

void function XMLDocBookpeardoc2Converter::formatIndex() [line 419]

Does nothing
void function XMLDocBookpeardoc2Converter::formatLeftIndex() [line 440]

Creates package/lang/categoryname/packagename.xml for each package


void function XMLDocBookpeardoc2Converter::formatPkgIndex() [line 412]

Does nothing
void function XMLDocBookpeardoc2Converter::generateChildClassList($class) [line 1165] Function Parameters:

parserClass $class class variable

returns a list of child classes

Uses parserClass::getChildClassList()

void function XMLDocBookpeardoc2Converter::generateElementIndex() [line 1378]

does nothing

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 308 of 1382

array function XMLDocBookpeardoc2Converter::generateFormattedClassTree($class) [line 1124] Function Parameters:

parserClass $class class variable

returns an array containing the class inheritance tree from the root object to the class

Uses parserClass::getParentClassTree()

void function XMLDocBookpeardoc2Converter::generateFormattedClassTrees($package) [line 1201] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of class trees

See $roots, HTMLConverter::getRootTree()

void function XMLDocBookpeardoc2Converter::generateFormattedInterfaceTrees($package) [line 1255] Function Parameters:

string $package package to generate a class tree for

returns a template-enabled array of interface inheritance trees

See $roots, HTMLConverter::getRootTree()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 309 of 1382

void function XMLDocBookpeardoc2Converter::generatePkgElementIndex($package) [line 1394] Function Parameters:

string $package name of a package

Generate alphabetical index of all elements by package and subpackage

See Converter::$pkg_elements, Converter::walk(), XMLDocBookpeardoc2Converter::generatePkgElementIndexes()

void function XMLDocBookpeardoc2Converter::generatePkgElementIndexes() [line 1402]

See XMLDocBookpeardoc2Converter::generatePkgElementIndex()

void function XMLDocBookpeardoc2Converter::getCData($value) [line 686] Function Parameters:

$value

mixed function XMLDocBookpeardoc2Converter::getClassLink($expr, $package, [$file = false], [$text = false], [$local = true], [$with_a = true]) [line 1415] Function Parameters:

string $expr name of class string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag $with_a

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 310 of 1382

See Converter::getClassLink()

mixed function XMLDocBookpeardoc2Converter::getDefineLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1447] Function Parameters:

string $expr name of define string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getDefineLink()

void function XMLDocBookpeardoc2Converter::getExampleLink($unused, $title) [line 290] Function Parameters:

$unused $title

mixed function XMLDocBookpeardoc2Converter::getFunctionLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1431] Function Parameters:

string $expr name of function string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getFunctionLink()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 311 of 1382

mixed function XMLDocBookpeardoc2Converter::getGlobalLink($expr, $package, [$file = false], [$text = false], [$local = true]) [line 1463] Function Parameters:

string $expr name of global variable string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getGlobalLink()

string function XMLDocBookpeardoc2Converter::getId(&$el, [$returnpackage = false]) [line 513] Function Parameters:

mixed &$el descendant of parserElement or parserData/parserPage boolean $returnpackage true to return the id for the package page

Get the id value needed to allow linking

See parserElement, parserData, parserPage

void function XMLDocBookpeardoc2Converter::getLink($expr, [$package = false], [$packages = false]) [line 237] Function Parameters:

$expr $package $packages

do that stuff in $template_options

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 312 of 1382

mixed function XMLDocBookpeardoc2Converter::getMethodLink($expr, $class, $package, [$file = false], [$text = false], [$local = true]) [line 1496] Function Parameters:

string $expr name of method string $class class containing method string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getMethodLink()

mixed function XMLDocBookpeardoc2Converter::getPageLink($expr, $package, [$path = false], [$text = false], [$local = true]) [line 1479] Function Parameters:

string $expr name of procedural page string $package package name string $path full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getPageLink()

void function XMLDocBookpeardoc2Converter::getPageName(&$element) [line 1111] Function Parameters:

&$element

string function XMLDocBookpeardoc2Converter::getRootTree($tree, $package, [$noparent = false], $nounknownparent) [line 1312] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 313 of 1382

array $tree output from getSortedClassTreeFromClass() string $package package boolean $nounknownparent if true, an object's parent will not be checked $noparent

return formatted class tree for the Class Trees page

See Classes::$definitechild, XMLDocBookpeardoc2Converter::generateFormattedClassTrees()

string function XMLDocBookpeardoc2Converter::getSourceAnchor($sourcefile, $anchor, [$text = ''], [$link = false]) [line 676] Function Parameters:

string $sourcefile full path to source file string $anchor name of anchor string $text link text, if this is a link boolean $link returns either a link or a destination based on this

parameter

Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. NOTE: unused

void function XMLDocBookpeardoc2Converter::getTutorialId($package, $subpackage, $tutorial, $id, $category) [line 656] Function Parameters:

$package $subpackage $tutorial $id $category

mixed function XMLDocBookpeardoc2Converter::getVarLink($expr, $class, $package, [$file = false], [$text = false], [$local = true]) [line 1513]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 314 of 1382

Function Parameters:

string $expr name of var string $class class containing var string $package package name string $file full path to look in (used in index generation) boolean $text deprecated boolean $local return just the URL, or enclose it in an html a tag

See Converter::getVarLink()

void function XMLDocBookpeardoc2Converter::makeLeft() [line 405] void function XMLDocBookpeardoc2Converter::Output() [line 1575]

Generate the constants.xml, packagename.xml, and globals.xml files


void function XMLDocBookpeardoc2Converter::postProcess($text) [line 626] Function Parameters:

$text

void function XMLDocBookpeardoc2Converter::prepareDocBlock(&$element, [$nopackage = true]) [line 631] Function Parameters:

&$element $nopackage

void function XMLDocBookpeardoc2Converter::ProgramExample($listing, [$tutorial = false], [$inlinesourceparse = null], [$class = null], [$linenum = null], [$filesourcepath = null], [$origsource = null]) [line 691] Function Parameters:

$listing $tutorial $inlinesourceparse $class $linenum $filesourcepath $origsource

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 315 of 1382

int function XMLDocBookpeardoc2Converter::rcNatCmp($a, $b) [line 1527] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array
int function XMLDocBookpeardoc2Converter::rcNatCmp1($a, $b) [line 1543] Function Parameters:

mixed $a mixed $b

does a nat case sort on the specified second level value of the array. this one puts constructors first

string function XMLDocBookpeardoc2Converter::returnLink($link, $text) [line 400] Function Parameters:

string $link string $text

void function XMLDocBookpeardoc2Converter::returnSee(&$element, [$eltext = false], [$local = true], [$with_a = true]) [line 453] Function Parameters:

abstractLink &$element a descendant of abstractlink should be passed, and never text string $eltext text to display in the link boolean $local this parameter is not used, and is deprecated boolean $with_a determines whether the returned text is enclosed in an <link> tag

This function takes an abstractLink descendant and returns an html link


void function XMLDocBookpeardoc2Converter::setTemplateDir($dir) [line 1382]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 316 of 1382

Function Parameters:

$dir

void function XMLDocBookpeardoc2Converter::type_adjust($typename) [line 296] Function Parameters:

$typename

void function XMLDocBookpeardoc2Converter::unmangle($s, $sourcecode) [line 242] Function Parameters:

$s $sourcecode

void function XMLDocBookpeardoc2Converter::wordwrap($string) [line 1567] Function Parameters:

$string

void function XMLDocBookpeardoc2Converter::writeExample($title, $path, $source) [line 285] Function Parameters:

$title $path $source

void function XMLDocBookpeardoc2Converter::writeFile($file, $data, [$binary = false]) [line 254] Function Parameters:

string $file filename string $data file contents boolean $binary true if the data is binary and not text

Writes a file to target dir, beautify any .xml files first

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 317 of 1382

void function XMLDocBookpeardoc2Converter::writeNewPPage($key) [line 426] Function Parameters:

$key

Does nothing
void function XMLDocBookpeardoc2Converter::writeSource() [line 433]

Does nothing

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 318 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 319 of 1382

Package Cpdf Procedural Elements

class.ezpdf.php
Package Cpdf

include_once 'phpDocumentor/Converters/PDF/default/class.pdf.php' 8] [line

Cpdf class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 320 of 1382

Package Cpdf Classes

Class Cezpdf
[line 23]

This class will take the basic interaction facilities of the Cpdf class and make more useful functions so that the user does not have to know all the ins and outs of pdf presentation to produce something pretty. IMPORTANT NOTE there is no warranty, implied or otherwise with this software.

Package Cpdf Author Wayne Munro, R&OS Ltd, http://www.ros.co.nz/pdf Version 009 (versioning is linked to class.pdf.php) released under a public domain licence.

Cezpdf::$ez mixed = array('fontSize'=>10) [line 39] Cezpdf::$ezPageCount mixed = 0 [line 42] Cezpdf::$ezPages mixed = array() [line 41] Cezpdf::$y mixed = [line 40] Constructor void function Cezpdf::Cezpdf([$paper = 'a4'], [$orientation = 'portrait']) [line 46] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 321 of 1382

$paper $orientation

void function Cezpdf::alink($info, [$internal = 0]) [line 1491] Function Parameters:

$info $internal

void function Cezpdf::execTemplate($id, [$data = array()], [$options = array()]) [line 1478] Function Parameters:

$id $data $options

void function Cezpdf::ezColumnsStart([$options = array()]) [line 162] Function Parameters:

$options

void function Cezpdf::ezColumnsStop() [line 195] void function Cezpdf::ezGetCurrentPageNumber() [line 284] void function Cezpdf::ezImage($image, [$pad = 5], [$width = 0], [$resize = 'full'], [$just = 'center'], [$border = '']) [line 1319] Function Parameters:

$image $pad $width $resize $just $border

void function Cezpdf::ezInsertMode([$status = 1], [$pageNum = 1], [$pos = 'before']) [line 205] Function Parameters:

$status $pageNum $pos

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 322 of 1382

void function Cezpdf::ezNewPage() [line 222] void function Cezpdf::ezOutput([$options = 0]) [line 479] Function Parameters:

$options

void function Cezpdf::ezProcessText($text) [line 1213] Function Parameters:

$text

void function Cezpdf::ezPRVTaddPageNumbers() [line 395] void function Cezpdf::ezPRVTcleanUp() [line 466] void function Cezpdf::ezPrvtGetTextWidth($size, $text) [line 609] Function Parameters:

$size $text

void function Cezpdf::ezPRVTpageNumberSearch($lbl, &$tmp) [line 378] Function Parameters:

$lbl &$tmp

void function Cezpdf::ezPrvtTableColumnHeadings($cols, $pos, $maxWidth, $height, $decender, $gap, $size, &$y, [$optionsAll = array()]) [line 544] Function Parameters:

$cols $pos $maxWidth $height $decender $gap $size &$y $optionsAll

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 323 of 1382

void function Cezpdf::ezPrvtTableDrawLines($pos, $gap, $x0, $x1, $y0, $y1, $y2, $col, $inner, $outer, [$opt = 1]) [line 515] Function Parameters:

$pos $gap $x0 $x1 $y0 $y1 $y2 $col $inner $outer $opt

void function Cezpdf::ezSetCmMargins($top, $bottom, $left, $right) [line 152] Function Parameters:

$top $bottom $left $right

void function Cezpdf::ezSetDy($dy, [$mod = '']) [line 497] Function Parameters:

$dy $mod

void function Cezpdf::ezSetMargins($top, $bottom, $left, $right) [line 264] Function Parameters:

$top $bottom $left $right

void function Cezpdf::ezSetY($y) [line 486] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 324 of 1382

$y

void function Cezpdf::ezStartPageNumbers($x, $y, $size, [$pos = 'left'], [$pattern = '{PAGENUM} of {TOTALPAGENUM}'], [$num = '']) [line 291] Function Parameters:

$x $y $size $pos $pattern $num

void function Cezpdf::ezStopPageNumbers([$stopTotal = 0], [$next = 0], [$i = 0]) [line 349] Function Parameters:

$stopTotal $next $i

void function Cezpdf::ezStream([$options = '']) [line 472] Function Parameters:

$options

void function Cezpdf::ezTable(&$data, [$cols = ''], [$title = ''], [$options = '']) [line 625] Function Parameters:

&$data $cols $title $options

void function Cezpdf::ezText($text, [$size = 0], [$options = array()], [$test = 0]) [line 1223] Function Parameters:

$text $size $options

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 325 of 1382

$test

void function Cezpdf::ezWhatPageNumber($pageNum, [$i = 0]) [line 317] Function Parameters:

$pageNum $i

void function Cezpdf::ilink($info) [line 1487] Function Parameters:

$info

void function Cezpdf::loadTemplate($templateFile) [line 1441] Function Parameters:

$templateFile

void function Cezpdf::uline($info) [line 1534] Function Parameters:

$info

Class Cpdf
[line 26]

Cpdf A PHP class to provide the basic functionality to create a pdf document without any requirement for additional modules. Note that they companion class CezPdf can be used to extend this class and dramatically simplify the creation of documents. IMPORTANT NOTE there is no warranty, implied or otherwise with this software.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 326 of 1382

LICENCE This code has been placed in the Public Domain for all to enjoy.

Package Cpdf Author Wayne Munro < [email protected]> Version 009 Link http://www.ros.co.nz/pdf

Cpdf::$addLooseObjects mixed = array() [line 114]

array contains infomation about how the loose objects are to be added to the document
Cpdf::$arc4 mixed = '' [line 159]

the ancryption array for the document encryption is stored here


Cpdf::$arc4_objnum mixed = 0 [line 163]

the object Id of the encryption information


Cpdf::$callback mixed = array() [line 179]

array which forms a stack to keep track of nested callback functions


Cpdf::$catalogId mixed = [line 39]

the objectId (number within the objects array) of the document catalog
Cpdf::$checkpoint mixed = '' [line 194]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 327 of 1382

store the stack for the transaction commands, each item in here is a record of the values of all the variables within the class, so that the user can rollback at will (from each 'start' command) note that this includes the objects array, so these can be large.
Cpdf::$currentBaseFont mixed = '' [line 52]

the current base font


Cpdf::$currentColour mixed = array('r'=>-1,'g'=>-1,'b'=>-1) [line 76]

current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active
Cpdf::$currentContents mixed = [line 68]

object number of the currently active contents block


Cpdf::$currentFont mixed = '' [line 48]

a record of the current font


Cpdf::$currentFontNum mixed = 0 [line 56]

the number of the current font within the font array


Cpdf::$currentLineStyle mixed = '' [line 84]

current style that lines are drawn in


Cpdf::$currentNode mixed = [line 60] Cpdf::$currentPage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 328 of 1382

mixed = [line 64]

object number of the current page


Cpdf::$currentStrokeColour mixed = array('r'=>-1,'g'=>-1,'b'=>-1) [line 80]

current colour for stroke operations (lines etc.)


Cpdf::$currentTextState mixed = '' [line 151]

track if the current font is bolded or italicised


Cpdf::$destinations mixed = array() [line 188]

store label->id pairs for named destinations, these will be used to replace internal links done this way so that destinations can be defined after the location that links to them

Cpdf::$encrypted mixed = 0 [line 171]

a flag to say if a document is to be encrypted or not


Cpdf::$encryptionKey mixed = '' [line 175]

the ancryption key for the encryption of all the document content (structure is not encrypted)
Cpdf::$fileIdentifier mixed = '' [line 167]

the file identifier, used to uniquely identify a pdf document


Cpdf::$firstPageId

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 329 of 1382

mixed = [line 132]

the objectId of the first page of the document


Cpdf::$fontFamilies mixed = array() [line 147]

store the information about the relationship between font families this used so that the code knows which font is the bold version of another font, etc. the value of this array is initialised in the constuctor function.

Cpdf::$fonts mixed = array() [line 44]

array carrying information about the fonts that the system currently knows about used to ensure that a font is not loaded twice, among other things

Cpdf::$infoObject mixed = 0 [line 119]

the objectId of the information object for the document this contains authorship, title etc.
Cpdf::$looseObjects mixed = array() [line 110]

an array which contains information about the objects which are not firmly attached to pages these have been added with the addObject function

Cpdf::$messages mixed = '' [line 155]

messages are stored here during processing, these can be selected afterwards to give some useful debug information
Cpdf::$nCallback mixed = 0 [line 183]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 330 of 1382

the number of callback functions in the callback array


Cpdf::$nStack mixed = 0 [line 105]

number of elements within the object Id storage stack


Cpdf::$nStateStack mixed = 0 [line 93]

number of elements within the state stack


Cpdf::$numFonts mixed = 0 [line 72]

number of fonts within the system


Cpdf::$numImages mixed = 0 [line 123]

number of images being tracked within the document


Cpdf::$numObj mixed = 0 [line 31]

the current number of pdf objects in the document


Cpdf::$numPages mixed = 0 [line 97]

number of page objects within the document


Cpdf::$objects mixed = array() [line 35]

this array contains all of the pdf objects, ready for final assembly
Cpdf::$options

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 331 of 1382

mixed = array('compression'=>1) [line 128]

an array containing options about the document it defaults to turning on the compression of the objects

Cpdf::$procsetObjectId mixed = [line 141]

the object Id of the procset object


Cpdf::$stack mixed = array() [line 101]

object Id storage stack


Cpdf::$stateStack mixed = array() [line 89]

an array which is used to save the state of the document, mainly the colours and styles it is used to temporarily change to another state, the change back to what it was before

Cpdf::$wordSpaceAdjust mixed = 0 [line 137]

used to track the last used value of the inter-word spacing, this is so that it is known when the spacing is changed.
Constructor void function Cpdf::Cpdf([$pageSize = array(0,0,612,792)]) [line 200] Function Parameters:

$pageSize

class constructor this will start a new document

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 332 of 1382

Var array of 4 numbers, defining the bottom left and upper right corner of the page. first two are normally zero.

void function Cpdf::addDestination($label, $style, [$a = 0], [$b = 0], [$c = 0]) [line 2972] Function Parameters:

$label $style $a $b $c

create a labelled destination within the document


void function Cpdf::addImage(&$img, $x, $y, [$w = 0], [$h = 0], [$quality = 75]) [line 2873] Function Parameters:

&$img $x $y $w $h $quality

add an image into the document, from a GD object this function is not all that reliable, and I would probably encourage people to use the file based functions

void function Cpdf::addInfo($label, [$value = 0]) [line 2593] Function Parameters:

$label $value

add content to the documents info object

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 333 of 1382

void function Cpdf::addInternalLink($label, $x0, $y0, $x1, $y1) [line 1176] Function Parameters:

$label $x0 $y0 $x1 $y1

add a link in the document to an internal destination (ie. within the document)
void function Cpdf::addJpegFromFile($img, $x, $y, [$w = 0], [$h = 0]) [line 2828] Function Parameters:

$img $x $y $w $h

add a JPEG image into the document, from a file


void function Cpdf::addLink($url, $x0, $y0, $x1, $y1) [line 1167] Function Parameters:

$url $x0 $y0 $x1 $y1

add a link in the document to an external URL


void function Cpdf::addMessage($message) [line 3025] Function Parameters:

$message

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 334 of 1382

used to add messages for use in debugging


void function Cpdf::addObject($id, [$options = 'add']) [line 2547] Function Parameters:

$id $options

after an object has been created, it wil only show if it has been added, using this function.
void function Cpdf::addPngFromFile($file, $x, $y, [$w = 0], [$h = 0]) [line 2640] Function Parameters:

$file $x $y $w $h

add a PNG image into the document, from a file this should work with remote files

void function Cpdf::addText($x, $y, $size, $text, [$angle = 0], [$wordSpaceAdjust = 0]) [line 2159] Function Parameters:

$x $y $size $text $angle $wordSpaceAdjust

add text to the document, at a specified location, size and angle on the page
void function Cpdf::addTextWrap($x, $y, $width, $size, $text, [$justification = 'left'], [$angle = 0], [$test = 0]) [line 2334] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 335 of 1382

$x $y $width $size $text $justification $angle $test

add text to the page, but ensure that it fits within a certain width if it does not fit then put in as much as possible, splitting at word boundaries and return the remainder. justification and angle can also be specified for the text

void function Cpdf::ARC4($text) [line 1141] Function Parameters:

$text

ARC4 encrypt a text string


void function Cpdf::ARC4_init([$key = '']) [line 1115] Function Parameters:

$key

initialize the ARC4 encryption


void function Cpdf::checkAllHere() [line 1217]

should be used for internal checks, not implemented as yet


void function Cpdf::closeObject() [line 2521]

close an object
void function Cpdf::curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3) [line 1685] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 336 of 1382

$x0 $y0 $x1 $y1 $x2 $y2 $x3 $y3

draw a bezier curve based on 4 control points


void function Cpdf::ellipse($x0, $y0, $r1, [$r2 = 0], [$angle = 0], [$nSeg = 8], [$astart = 0], [$afinish = 360], [$close = 1], [$fill = 0]) [line 1716] Function Parameters:

$x0 $y0 $r1 $r2 $angle $nSeg $astart $afinish $close $fill

draw an ellipse note that the part and filled ellipse are just special cases of this function draws an ellipse in the current line style centered at $x0,$y0, radii $r1,$r2 if $r2 is not set, then a circle is drawn nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a pretty crappy shape at 2, as we are approximating with bezier curves.

void function Cpdf::encryptInit($id) [line 1101] Function Parameters:

$id

initialize the encryption for processing a particular object

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 337 of 1382

void function Cpdf::filledEllipse($x0, $y0, $r1, [$r2 = 0], [$angle = 0], [$nSeg = 8], [$astart = 0], [$afinish = 360]) [line 1702] Function Parameters:

$x0 $y0 $r1 $r2 $angle $nSeg $astart $afinish

draw a filled ellipse


void function Cpdf::filledRectangle($x1, $y1, $width, $height) [line 1838] Function Parameters:

$x1 $y1 $width $height

a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not the coordinates of the upper-right corner

void function Cpdf::getFirstPageId() [line 1642]

function for the user to find out what the ID is of the first page that was created during startup - useful if they wish to add something to it later.
void function Cpdf::getFontDecender($size) [line 1946] Function Parameters:

$size

return the font decender, this will normally return a negative number if you add this number to the baseline, you get the level of the bottom of the font it is in the pdf user units

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 338 of 1382

void function Cpdf::getFontHeight($size) [line 1932] Function Parameters:

$size

return the height in units of the current font in the given size
void function Cpdf::getTextWidth($size, $text) [line 2251] Function Parameters:

$size $text

calculate how wide a given text string will be on a page, at a given size. this can be called externally, but is alse used by the other class functions

void function Cpdf::line($x1, $y1, $x2, $y2) [line 1678] Function Parameters:

$x1 $y1 $x2 $y2

draw a line from one set of coordinates to another


void function Cpdf::md5_16($string) [line 1089] Function Parameters:

$string

calculate the 16 byte version of the 128 bit md5 digest of the string
void function Cpdf::newPage([$insert = 0], [$id = 0], [$pos = 'after']) [line 1854]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 339 of 1382

Function Parameters:

$insert $id $pos

add a new page to the document this also makes the new page the current active object

void function Cpdf::openHere($style, [$a = 0], [$b = 0], [$c = 0]) [line 2952] Function Parameters:

$style $a $b $c

specify where the document should open when it first starts


void function Cpdf::openObject() [line 2493]

make a loose object, the output will go into this object, until it is closed, then will revert to the current one. this object will not appear until it is included within a page. the function will return the object number

void function Cpdf::output([$debug = 0]) [line 1223] Function Parameters:

$debug

return the pdf stream as a string returned from the function


void function Cpdf::o_action($id, $action, [$options = '']) [line 729] Function Parameters:

$id $action

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 340 of 1382

$options

an action object, used to link to URLS initially


void function Cpdf::o_annotation($id, $action, [$options = '']) [line 772] Function Parameters:

$id $action $options

an annotation object, this will add an annotation to the current page. initially will support just link annotations

void function Cpdf::o_catalog($id, $action, [$options = '']) [line 300] Function Parameters:

$id $action $options

define the document catalog, the overall controller for the document
void function Cpdf::o_contents($id, $action, [$options = '']) [line 893] Function Parameters:

$id $action $options

the contents objects hold all of the content which appears on pages
void function Cpdf::o_destination($id, $action, [$options = '']) [line 227] Function Parameters:

$id

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 341 of 1382

$action $options

destination object, used to specify the location for the user to jump to, presently on opening
void function Cpdf::o_encryption($id, $action, [$options = '']) [line 1018] Function Parameters:

$id $action $options

encryption object.
void function Cpdf::o_font($id, $action, [$options = '']) [line 478] Function Parameters:

$id $action $options

an object to hold the font description


void function Cpdf::o_fontDescriptor($id, $action, [$options = '']) [line 562] Function Parameters:

$id $action $options

a font descriptor, needed for including additional fonts


void function Cpdf::o_fontEncoding($id, $action, [$options = '']) [line 613] Function Parameters:

$id

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 342 of 1382

$action $options

the font encoding


void function Cpdf::o_image($id, $action, [$options = '']) [line 943] Function Parameters:

$id $action $options

an image object, will be an XObject in the document, includes description and data
void function Cpdf::o_info($id, $action, [$options = '']) [line 685] Function Parameters:

$id $action $options

define the document information


void function Cpdf::o_outlines($id, $action, [$options = '']) [line 448] Function Parameters:

$id $action $options

define the outlines in the doc, empty for now


void function Cpdf::o_page($id, $action, [$options = '']) [line 824] Function Parameters:

$id $action

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 343 of 1382

$options

a page object, it also creates a contents object to hold its contents


void function Cpdf::o_pages($id, $action, [$options = '']) [line 350] Function Parameters:

$id $action $options

object which is a parent to the pages in the document


void function Cpdf::o_procset($id, $action, [$options = '']) [line 650] Function Parameters:

$id $action $options

the document procset, solves some problems with printing to old PS printers
void function Cpdf::o_viewerPreferences($id, $action, [$options = '']) [line 262] Function Parameters:

$id $action $options

set the viewer preferences


void function Cpdf::partEllipse($x0, $y0, $astart, $afinish, $r1, [$r2 = 0], [$angle = 0], [$nSeg = 8]) [line 1695] Function Parameters:

$x0 $y0 $astart

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 344 of 1382

$afinish $r1 $r2 $angle $nSeg

draw a part of an ellipse


void function Cpdf::polygon($p, $np, [$f = 0]) [line 1821] Function Parameters:

$p $np $f

draw a polygon, the syntax for this is similar to the GD polygon command
void function Cpdf::rectangle($x1, $y1, $width, $height) [line 1846] Function Parameters:

$x1 $y1 $width $height

draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not the coordinates of the upper-right corner

void function Cpdf::reopenObject($id) [line 2508] Function Parameters:

$id

open an existing object for editing


void function Cpdf::restoreState([$pageEnd = 0]) [line 2474]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 345 of 1382

Function Parameters:

$pageEnd

restore a previously saved state


void function Cpdf::saveState([$pageEnd = 0]) [line 2450] Function Parameters:

$pageEnd

this will be called at a new page to return the state to what it was on the end of the previous page, before the stack was closed down This is to get around not being able to have open 'q' across pages

void function Cpdf::selectFont($fontName, [$encoding = ''], [$set = 1]) [line 1420] Function Parameters:

$fontName $encoding $set

if the font is not loaded then load it and make the required object else just make it the current font the encoding array can contain 'encoding'=> 'none','WinAnsiEncoding','MacRomanEncoding' or 'MacExpertEncoding' note that encoding='none' will need to be used for symbolic fonts and 'differences' => an array of mappings between numbers 0->255 and character names.

void function Cpdf::setColor($r, $g, $b, [$force = 0]) [line 1658] Function Parameters:

$r $g $b $force

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 346 of 1382

sets the colour for fill operations


void function Cpdf::setEncryption([$userPass = ''], [$ownerPass = ''], [$pc = array()]) [line 1187] Function Parameters:

$userPass $ownerPass $pc

set the encryption of the document can be used to turn it on and/or set the passwords which it will have. also the functions that the user will have are set here, such as print, modify, add

void function Cpdf::setFontFamily($family, [$options = '']) [line 2988] Function Parameters:

$family $options

define font families, this is used to initialize the font families for the default fonts and for the user to add new ones for their fonts. The default bahavious can be overridden should that be desired.
void function Cpdf::setLineStyle([$width = 1], [$cap = ''], [$join = ''], [$dash = ''], [$phase = 0]) [line 1792] Function Parameters:

$width $cap $join $dash $phase

this sets the line drawing style. width, is the thickness of the line in user units cap is the type of cap to put on the line, values can be 'butt','round','square' where the diffference between 'square' and 'butt' is that 'square' projects a flat end past the end of the line. join can be 'miter', 'round', 'bevel' dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the on and off dashes. (2) represents 2 on, 2 off, 2 on , 2 off ... (2,1) is 2 on, 1 off, 2 on, 1 off.. etc phase is a modifier on the dash pattern which is

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 347 of 1382

used to shift the point at which the pattern starts.

void function Cpdf::setPreferences($label, [$value = 0]) [line 2610] Function Parameters:

$label $value

set the viewer preferences of the document, it is up to the browser to obey these.
void function Cpdf::setStrokeColor($r, $g, $b, [$force = 0]) [line 1668] Function Parameters:

$r $g $b $force

sets the colour for stroke operations


void function Cpdf::stopObject($id) [line 2536] Function Parameters:

$id

stop an object from appearing on pages from this point on


void function Cpdf::stream([$options = '']) [line 1902] Function Parameters:

$options

output the pdf code, streaming it to the browser the relevant headers are set so that hopefully the browser will recognise it

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 348 of 1382

void function Cpdf::transaction($action) [line 3032] Function Parameters:

$action

a few functions which should allow the document to be treated transactionally.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 349 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 350 of 1382

Package HTML_TreeMenu Procedural Elements

file_dialog.php
phpDocumentor :: docBuilder Web Interface Advanced Web Interface to phpDocumentor PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package HTML_TreeMenu Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: file_dialog.php 231860 2007-03-14 12:48:37Z ashnazg $ Copyright 2003-2006 Andrew Eddie, Greg Beaver See phpdoc.php License LGPL Filesource Source Code for this file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 351 of 1382

include_once PHPDOC_WEBROOT_DIR."/docbuilder/includes/utilities.php" [line 72]

include_once PHPDOC_WEBROOT_DIR."/HTML_TreeMenu-1.1.2/TreeMenu.php" [line 71]

include_once PHPDOC_WEBROOT_DIR."/phpDocumentor/common.inc.php" [line 70]

common file information


PHPDOC_WEBROOT_DIR = 'PhpDocumentor' [line 52] require_once 'PhpDocumentor/HTML_TreeMenu-1.1.2/TreeMenu.php' [line 49]

require_once '@WEB-DIR@'.PATH_DELIMITER.'PhpDocumentor/docbuilder/includes/utilities.php' [line 50]

require_once 'PhpDocumentor/phpDocumentor/common.inc.php' [line 48]

common file information

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 352 of 1382

Package HTML_TreeMenu Classes

Class DirNode
[line 130]

Directory Node

Package HTML_TreeMenu Author Richard Heyes < [email protected]> Author Harald Radi < [email protected]>

DirNode::$path string = [line 136]

full path to this node


Constructor void function DirNode::DirNode([$text = false], [$link = false], [$icon = false], $path, [$events = array()]) [line 138] Function Parameters:

$text $link $icon $path $events

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 353 of 1382

Class HTML_TreeMenu
[line 67]

HTML_TreeMenu Class A simple couple of PHP classes and some not so simple Jabbascript which produces a tree menu. In IE this menu is dynamic, with branches being collapsable. In IE5+ the status of the collapsed/open branches persists across page refreshes.In any other browser the tree is static. Code is based on work of Harald Radi. Usage. After installing the package, copy the example php script to your servers document root. Also place the TreeMenu.js and the images folder in the same place. Running the script should then produce the tree. Thanks go to Chip Chapin (http://www.chipchapin.com) for many improvements. excellent ideas and

Package HTML_TreeMenu Author Harald Radi < [email protected]> Author Richard Heyes < [email protected]> Access public

HTML_TreeMenu::$items array = [line 73]

Indexed array of subnodes


Constructor void function HTML_TreeMenu::HTML_TreeMenu() [line 80]

Constructor

Access public

object Returns function HTML_TreeMenu::addItem(&$node, $node) [line 94] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 354 of 1382

object $node The node to add. This object should be object. &$node

a HTML_TreeNode

This function adds an item to the the tree.

Access public

Class HTML_TreeMenu_DHTML
[line 329]

HTML_TreeMenu_DHTML class This class is a presentation class for the tree structure created using the TreeMenu/TreeNode. It presents the traditional tree, static for browsers that can't handle the DHTML.

Package HTML_TreeMenu

HTML_TreeMenu_DHTML::$defaultClass mixed = [line 359]

The default CSS class for the nodes


HTML_TreeMenu_DHTML::$images string = [line 342]

Path to the images

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 355 of 1382

HTML_TreeMenu_DHTML::$isDynamic mixed = [line 336]

Dynamic status of the treemenu. If true (default) this has no effect. If false it will override all dynamic status vars and set the menu to be fully expanded an nondynamic.
HTML_TreeMenu_DHTML::$linkTarget string = [line 348]

Target for the links generated


HTML_TreeMenu_DHTML::$noTopLevelImages bool = [line 365]

Whether to skip first level branch images


HTML_TreeMenu_DHTML::$userPersistence bool = [line 354]

Whether to use clientside persistence or not


Constructor void function HTML_TreeMenu_DHTML::HTML_TreeMenu_DHTML(&$structure, [$options = array()], [$isDynamic = true], $structure) [line 386] Function Parameters:

object $structure The menu structure array $options Array of options bool $isDynamic Whether the tree is dynamic or not &$structure

Constructor, takes the tree structure as an argument and an array of options which can consist of: images - The path to the images folder. Defaults to "images" linkTarget - The target for the link. Defaults to "_self" defaultClass - The default CSS class to apply to a node. Default is none. usePersistence - Whether to use clientside persistence. This persistence is achieved using cookies. Default is true. noTopLevelImages - Whether to skip displaying the first level of images if there is multiple top level branches.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 356 of 1382

And also a boolean for whether the entire tree is dynamic or not. This overrides any perNode dynamic settings.

string function HTML_TreeMenu_DHTML::toHTML() [line 411]

Returns the HTML for the menu. This method can be used instead of printMenu() to use the menu system with a template system.

Access public

Class HTML_TreeMenu_Listbox
[line 493]

HTML_TreeMenu_Listbox class This class presents the menu as a listbox

Package HTML_TreeMenu

HTML_TreeMenu_Listbox::$indentChar string = [line 505]

The character used for indentation


HTML_TreeMenu_Listbox::$indentNum integer = [line 512]

How many of the indent chars to use per indentation level

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 357 of 1382

HTML_TreeMenu_Listbox::$linkTarget string = [line 518]

Target for the links generated


HTML_TreeMenu_Listbox::$promoText string = [line 499]

The text that is displayed in the first option


Constructor void function HTML_TreeMenu_Listbox::HTML_TreeMenu_Listbox($structure, [$options = array()]) [line 535] Function Parameters:

object $structure The menu structure array $options Options whic affect the display of the listbox. consist of: promoText The text that appears at the the top of the listbox Defaults to "Select..." indentChar The character to use for indenting the nodes Defaults to "&nbsp;" indentNum How many of the indentChars to use per indentation level Defaults to 2 linkTarget Target for the links. Defaults to "_self" submitText Text for the submit button. Defaults to "Go"

These can

Constructor
void function HTML_TreeMenu_Listbox::toHTML() [line 552]

Returns the HTML generated

Class HTML_TreeMenu_Presentation
[line 282]

HTML_TreeMenu_Presentation class Base class for other presentation classes to inherit from.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 358 of 1382

Package HTML_TreeMenu

HTML_TreeMenu_Presentation::$menu object = [line 288]

The TreeMenu structure


Constructor void function HTML_TreeMenu_Presentation::HTML_TreeMenu_Presentation(&$structure, $structure) [line 295] Function Parameters:

object $structure The menu structure &$structure

Base constructor simply sets the menu object


void function HTML_TreeMenu_Presentation::printMenu([$options = array()]) [line 310] Function Parameters:

array $options Options to set. Any options taken by specified here.

the presentation class can be

Prints the HTML generated by the toHTML() method. toHTML() must therefore be defined by the derived class.

Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 359 of 1382

Class HTML_TreeNode
[line 113]

HTML_TreeNode class This class is supplementary to the above and provides a way to add nodes to the tree. A node can have other nodes added to it.

Package HTML_TreeMenu Author Harald Radi < [email protected]> Author Richard Heyes < [email protected]> Access public

HTML_TreeNode::$cssClass string = [line 137]

The css class for this node


HTML_TreeNode::$ensureVisible bool = [line 161]

Should this node be made visible?


HTML_TreeNode::$events array = [line 173]

Javascript event handlers;


HTML_TreeNode::$expanded bool = [line 149]

Whether this node is expanded or not


HTML_TreeNode::$icon string = [line 131]

The icon for this node.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 360 of 1382

HTML_TreeNode::$isDynamic bool = [line 155]

Whether this node is dynamic or not


HTML_TreeNode::$items array = [line 143]

Indexed array of subnodes


HTML_TreeNode::$link string = [line 125]

The link for this node.


HTML_TreeNode::$parent object = [line 167]

The parent node. Null if top level


HTML_TreeNode::$text string = [line 119]

The text for this node.


Constructor void function HTML_TreeNode::HTML_TreeNode([$options = array()], [$events = array()]) [line 197] Function Parameters:

array $options An array of options which you can pass to change the way this node looks/acts. This can consist of: text The title of the node, defaults to blank link The link for the node, defaults to blank icon The icon for the node, defaults to blank class The CSS class for this node, defaults to blank expanded The default expanded status of this node, defaults to false This doesn't affect non dynamic presentation types isDynamic If this node is dynamic or not. Only affects certain presentation types. ensureVisible If true this node will be made visible despite the expanded settings, and client side persistence. Will not affect

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 361 of 1382

some presentation styles, such as Listbox. Default is false array $events An array of javascript events and the corresponding event handlers. Additionally to the standard javascript events you can specify handlers for the 'onexpand', 'oncollapse' and 'ontoggle' events which will be fired whenever a node is collapsed and/or expanded.

Constructor

Access public

void function HTML_TreeNode::addItem(&$node, $node) [line 242] Function Parameters:

object $node The new node &$node

Adds a new subnode to this node.

Access public

void function HTML_TreeNode::setOption($option, $value) [line 231] Function Parameters:

string $option Option to set string $value Value to set the option to

Allows setting of various parameters after the initial constructor call. Possible options you can set are: text link icon

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 362 of 1382

cssClass expanded isDynamic ensureVisible ie The same options as in the constructor

Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 363 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 364 of 1382

Package org-phpdoc Procedural Elements

bug-904820.php
This is a test of a package with a . in its name

Package org-phpdoc

element = true [line 12]

I'm an element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 365 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 366 of 1382

Package Smarty Procedural Elements

Config_File.class.php
Config_File class. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA You may contact the author of Config_File by e-mail at: [email protected] The latest version of Config_File can be obtained from: http://smarty.php.net/

Package Smarty Author Andrei Zmievski < [email protected]> Version 2.6.0 Copyright Copyright: 2001-2003 ispi of Lincoln, Inc. Link http://smarty.php.net/ Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 367 of 1382

Smarty.class.php
Project: Smarty: the PHP compiling template engine File: Smarty.class.php This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For questions, help, comments, discussion, etc., please join the Smarty mailing list. Send a blank e-mail to [email protected] You may contact the authors of Smarty by e-mail at: [email protected] [email protected] Or, write to: Monte Ohrt Director of Technology, ispi 237 S. 70th suite 220 Lincoln, NE 68510 The latest version of Smarty can be obtained from: http://smarty.php.net/

Package Smarty Author Monte Ohrt < [email protected]> Author Andrei Zmievski < [email protected]> Version 2.6.0 Copyright 2001-2003 ispi of Lincoln, Inc. Link http://smarty.php.net/

DIR_SEP = DIRECTORY_SEPARATOR [line 52]

DIR_SEP isn't used anymore, but third party apps might


SMARTY_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR [line 62]

set SMARTY_DIR to absolute path to Smarty library files. if not defined, include_path will be used. Sets SMARTY_DIR only if user application has not already defined it.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 368 of 1382

SMARTY_PHP_ALLOW = 3 [line 68] SMARTY_PHP_PASSTHRU = 0 [line 65] SMARTY_PHP_QUOTE = 1 [line 66] SMARTY_PHP_REMOVE = 2 [line 67]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 369 of 1382

Smarty_Compiler.class.php
Project: Smarty: the PHP compiling template engine File: Smarty_Compiler.class.php This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA You may contact the authors of Smarty by e-mail at: [email protected] [email protected] Or, write to: Monte Ohrt Director of Technology, ispi 237 S. 70th suite 220 Lincoln, NE 68510 The latest version of Smarty can be obtained from: http://smarty.php.net/

Package Smarty Author Andrei Zmievski < [email protected]> Author Monte Ohrt < [email protected]> Version 2.6.0 Copyright 2001-2003 ispi of Lincoln, Inc. Link http://smarty.php.net/

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 370 of 1382

Package Smarty Classes

Class Config_File
[line 39]

Config file reading class

Package Smarty

Config_File::$booleanize boolean = true [line 53]

Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically. Options

Config_File::$fix_newlines boolean = true [line 64]

Controls whether or not to fix mac or dos formatted newlines. Options If set to true, \r or \r\n will be changed to \n.

Config_File::$overwrite boolean = true [line 47]

Controls whether variables with the same name overwrite each other.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 371 of 1382

Options

Config_File::$read_hidden boolean = true [line 58]

Controls whether hidden config sections/vars are read from the file. Options

Config_File::$_config_data mixed = array() [line 69] Constructor void function Config_File::Config_File([$config_path = NULL]) [line 77] Function Parameters:

string $config_path (optional) path to the config files

Constructs a new config file class.


void function Config_File::clear([$file_name = NULL]) [line 218] Function Parameters:

string $file_name file to clear config data for

Clear loaded config data for a certain file or all files.


string|array function Config_File::get($file_name, [$section_name = NULL], [$var_name = NULL]) [line 113] Function Parameters:

string $file_name config file to get info for string $section_name (optional) section to get info for string $var_name (optional) variable to get info for

Retrieves config info based on the file, section, and variable name.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 372 of 1382

Usedby Config_File::get_key() - retrieves information from config file and returns it

array function Config_File::get_file_names() [line 165]

Get all loaded config file names.


string|array function Config_File::get_key($config_key) [line 153] Function Parameters:

$file_name $config_key string config key (filename/section/var)

Retrieves config info based on the key.

Uses Config_File::get() - retrieves information from config file and returns it

array function Config_File::get_section_names($file_name) [line 177] Function Parameters:

string $file_name config file to get section names from

Get all section names from a loaded file.


array function Config_File::get_var_names($file_name, [$section = NULL], $section_name) [line 196] Function Parameters:

string $file_name config file to get info for string $section_name (optional) section to get info for $section

Get all global or section variable names.


void function Config_File::load_file($file_name, [$prepend_path = true]) [line 234] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 373 of 1382

string $file_name file name to load boolean $prepend_path whether current config path should be prepended to the filename

Load a configuration file manually.


void function Config_File::set_path($config_path) [line 89] Function Parameters:

string $config_path path to the config files

Set the path where configuration files can be found.

Class Smarty
[line 73]
Package Smarty

Smarty::$autoload_filters array = array() [line 357]

This indicates which filters are automatically loaded into Smarty. Smarty Configuration Section

Var array of filter names

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 374 of 1382

Smarty::$cache_dir string = 'cache' [line 169]

The name of the directory for cache files. Smarty Configuration Section

Smarty::$cache_handler_func null|string = null [line 333]

The function used for cache file handling. If not set, built-in caching is used. Smarty Configuration Section

Var function name

Smarty::$cache_lifetime integer = 3600 [line 180]

This is the number of seconds cached content will persist. Smarty Configuration Section 0 = always regenerate cache -1 = never expires

Smarty::$cache_modified_check boolean = false [line 190]

Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent. Smarty Configuration Section This way repeated hits to a cached page do not send the entire page to the client every time.

Smarty::$caching integer = 0 [line 162]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 375 of 1382

This enables template caching. Smarty Configuration Section 0 = no caching 1 = use class cache_lifetime value 2 = use cache_lifetime in cache file

Smarty::$compiler_class string = 'Smarty_Compiler' [line 411]

The class used for compiling templates.


Smarty::$compiler_file string = 'Smarty_Compiler.class.php' [line 404]

The file that contains the compiler class. This can a full pathname, or relative to the php_include path.
Smarty::$compile_check boolean = true [line 143]

This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed. Smarty Configuration Section Typically you enable this during development, and disable for production.

Smarty::$compile_dir string = 'templates_c' [line 91]

The directory where compiled templates are located. Smarty Configuration Section

Smarty::$compile_id string = null [line 293]

Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages. Smarty Configuration Section Instead of creating separate sets of templates per language, you set different compile_ids like 'en' and 'de'.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 376 of 1382

Smarty::$config_booleanize boolean = true [line 373]

This tells whether or not to automatically booleanize config file variables. If enabled, then the strings "on", "true", and "yes" are treated as boolean true, and "off", "false" and "no" are treated as boolean false.

Smarty::$config_class string = 'Config_File' [line 418]

The class used to load config vars.


Smarty::$config_dir string = 'configs' [line 98]

The directory where config files are located. Smarty Configuration Section

Smarty::$config_fix_newlines boolean = true [line 387]

This tells whether or not automatically fix newlines in config files. It basically converts \r (mac) or \r\n (dos) to \n

Smarty::$config_overwrite boolean = true [line 366]

This tells if config file vars of the same name overwrite each other or not. if disabled, same name variables are accumulated in an array.

Smarty::$config_read_hidden boolean = false [line 381]

This tells whether hidden sections [.foobar] are readable from the tempalates or

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 377 of 1382

not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot.
Smarty::$debugging boolean = false [line 114]

If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows) Smarty Configuration Section

Smarty::$debugging_ctrl string = 'NONE' [line 133]

This determines if debugging is enable-able from the browser. Smarty Configuration Section NONE => no debugging control allowed URL => enable debugging when SMARTY_DEBUG is found in the URL.

Link http://www.foo.dom/index.php?SMARTY_DEBUG

Smarty::$debug_tpl string = '' [line 122]

This is the path to the debug console template. If not set, the default one will be used. Smarty Configuration Section

Smarty::$default_modifiers array = array() [line 312]

This is a list of the modifiers to apply to all template variables. Smarty Configuration Section Put each modifier in a separate array element in the order you want them applied. example:
1 array('escape:"htmlall"' );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 378 of 1382

Smarty::$default_resource_type array = 'file' [line 326]

This is the resource type to be used when not specified Smarty Configuration Section at the beginning of the resource path. examples: $smarty->display('file:index.tpl'); $smarty->display('db:index.tpl'); $smarty>display('index.tpl'); // will use default resource type {include file="file:index.tpl"} {include file="db:index.tpl"} {include file="index.tpl"} {* will use default resource type *}

Smarty::$default_template_handler_func string = '' [line 396]

If a template cannot be found, this PHP function will be executed. Useful for creating templates on-the-fly or other special action.

Var function name

Smarty::$force_compile boolean = false [line 151]

This forces templates to compile every time. Useful for development or debugging. Smarty Configuration Section

Smarty::$global_assign array = array('HTTP_SERVER_VARS' => array('SCRIPT_NAME')) [line 343]

These are the variables from the globals array that are assigned to all templates automatically. This isn't really necessary any more, you can use the $smarty var to access them directly. Smarty Configuration Section

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 379 of 1382

Usedby Smarty::Smarty() - uses assign() to assign each corresponding value from $GLOBALS to the template vars

Smarty::$left_delimiter string = '{' [line 257]

The left delimiter used for the template tags. Smarty Configuration Section

Smarty::$php_handling integer = SMARTY_PHP_PASSTHRU [line 204]

This determines how Smarty handles "<?php ... ?>" tags in templates. Smarty Configuration Section possible values: SMARTY_PHP_PASSTHRU -> print tags as plain text SMARTY_PHP_QUOTE -> escape tags as entities SMARTY_PHP_REMOVE -> remove php tags SMARTY_PHP_ALLOW -> execute php tags

Smarty::$plugins_dir array = array('plugins') [line 105]

An array of directories searched for plugins. Smarty Configuration Section

Smarty::$request_use_auto_globals boolean = false [line 283]

Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false) Smarty Configuration Section are uses as request-vars or $_*[]-vars. note: if request_use_auto_globals is true, then $request_vars_order has no effect, but the phpini-value "gpc_order"

Smarty::$request_vars_order

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 380 of 1382

string = "EGPCS" [line 273]

The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server Smarty Configuration Section

Smarty::$right_delimiter string = '}' [line 264]

The right delimiter used for the template tags. Smarty Configuration Section

Smarty::$secure_dir array = array() [line 223]

This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly. Smarty Configuration Section

Smarty::$security boolean = false [line 214]

This enables template security. When enabled, many things are restricted Smarty Configuration Section in the templates that normally would go unchecked. This is useful when untrusted parties are editing templates and you want a reasonable level of security. (no direct execution of PHP in templates for example)

Smarty::$security_settings array = array( 'PHP_HANDLING' => false, 'IF_FUNCS' => array('array', 'list', 'isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'true','false'),'INCLUDE_ANY'=>false,'PHP_TAGS'=>false,'MODIFIER_FUNCS'=>array('count'),'ALLOW _CONSTANTS'=>false) [line 231]

These are the security settings for Smarty. They are used only when $securityis

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 381 of 1382

enabled. Smarty Configuration Section

Smarty::$template_dir string = 'templates' [line 84]

The name of the directory where templates are located. Smarty Configuration Section

Smarty::$trusted_dir array = array() [line 250]

This is an array of directories where trusted php scripts reside. Smarty Configuration Section $security is disabled during their inclusion/execution.

Smarty::$undefined null = null [line 350]

The value of "undefined". Leave it alone :-) Smarty Configuration Section

Smarty::$use_sub_dirs boolean = true [line 303]

This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled. Smarty Configuration Section

Constructor void function Smarty::Smarty() [line 597]

The class constructor.

Uses Smarty::$global_assign - uses assign() to assign each corresponding value from $GLOBALS to the template vars

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 382 of 1382

void function Smarty::append($tpl_var, [$value = null], [$merge = false]) [line 657] Function Parameters:

array|string $tpl_var the template variable name(s) mixed $value the value to append $merge

appends values to template variables


void function Smarty::append_by_ref($tpl_var, &$value, [$merge = false], $value) [line 697] Function Parameters:

string $tpl_var the template variable name mixed $value the referenced value to append &$value $merge

appends values to template variables by reference


void function Smarty::assign($tpl_var, [$value = null]) [line 625] Function Parameters:

array|string $tpl_var the template variable name(s) mixed $value the value to assign

assigns values to template variables


void function Smarty::assign_by_ref($tpl_var, &$value, $value) [line 645] Function Parameters:

string $tpl_var the template variable name mixed $value the referenced value to assign &$value

assigns values to template variables by reference

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 383 of 1382

void function Smarty::clear_all_assign() [line 1062]

clear all the assigned template variables.


boolean function Smarty::clear_all_cache([$exp_time = null]) [line 1015] Function Parameters:

string $exp_time expire time

clear the entire contents of cache (all templates)


void function Smarty::clear_assign($tpl_var) [line 719] Function Parameters:

string $tpl_var the template variable to clear

clear the given assigned template variable.


boolean function Smarty::clear_cache([$tpl_file = null], [$cache_id = null], [$compile_id = null], [$exp_time = null]) [line 983] Function Parameters:

string $tpl_file name of template file string $cache_id name of cache_id string $compile_id name of compile_id string $exp_time expiration time

clear cached content for the given template and cache id


boolean function Smarty::clear_compiled_tpl([$tpl_file = null], [$compile_id = null], [$exp_time = null]) [line 1077] Function Parameters:

string $tpl_file string $compile_id string $exp_time

clears compiled version of specified template resource, or all compiled template


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 384 of 1382

files if one is not specified. This function is for advanced use only, not normally needed.

void function Smarty::clear_config([$var = null]) [line 1381] Function Parameters:

string $var

clear configuration values


void function Smarty::config_load($file, [$section = null], [$scope = 'global']) [line 1354] Function Parameters:

string $file string $section string $scope

load configuration values


void function Smarty::display($resource_name, [$cache_id = null], [$compile_id = null]) [line 1155] Function Parameters:

string $resource_name string $cache_id string $compile_id

executes & displays the template results


void function Smarty::fetch($resource_name, [$cache_id = null], [$compile_id = null], [$display = false]) [line 1168] Function Parameters:

string $resource_name string $cache_id string $compile_id boolean $display

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 385 of 1382

executes & returns or displays the template results


array function Smarty::get_config_vars([$name = null], $type) [line 1127] Function Parameters:

string $name string $type

Returns an array containing config variables


object function Smarty::get_registered_object($name) [line 1366] Function Parameters:

string $name

return a reference to a registered object


array function Smarty::get_template_vars([$name = null], $type) [line 1110] Function Parameters:

string $name string $type

Returns an array containing template variables


string|false function Smarty::is_cached($tpl_file, [$cache_id = null], [$compile_id = null]) [line 1040] Function Parameters:

string $tpl_file name of template file string $cache_id string $compile_id

test to see if valid cache exists for this template


void function Smarty::load_filter($type, $name) [line 957]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 386 of 1382

Function Parameters:

string $type filter type string $name filter name

load a filter of specified type and name


void function Smarty::register_block($block, $block_impl, [$cacheable = true], [$cache_attrs = null]) [line 786] Function Parameters:

string $block name of template block string $block_impl PHP function to register $cacheable $cache_attrs

Registers block function to be used in templates


void function Smarty::register_compiler_function($function, $function_impl, [$cacheable = true]) [line 808] Function Parameters:

string $function name of template function string $function_impl name of PHP function to register $cacheable

Registers compiler function


void function Smarty::register_function($function, $function_impl, [$cacheable = true], [$cache_attrs = null]) [line 735] Function Parameters:

string $function the name of the template function string $function_impl the name of the PHP function to register $cacheable $cache_attrs

Registers custom function to be used in templates

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 387 of 1382

void function Smarty::register_modifier($modifier, $modifier_impl) [line 830] Function Parameters:

string $modifier name of template modifier string $modifier_impl name of PHP function to register

Registers modifier to be used in templates


void function Smarty::register_object($object, &$object_impl, [$allowed = array()], [$smarty_args = true], [$block_methods = array()], $block_functs) [line 761] Function Parameters:

string $object name of template object object &$object_impl the referenced PHP object to register null|array $allowed list of allowed methods (empty = all) boolean $smarty_args smarty argument format, else traditional null|array $block_functs list of methods that are block format $block_methods

Registers object to be used in templates


void function Smarty::register_outputfilter($function) [line 934] Function Parameters:

string $function name of PHP function

Registers an output filter function to apply to a template output


void function Smarty::register_postfilter($function) [line 911] Function Parameters:

string $function name of PHP function to register

Registers a postfilter function to apply to a compiled template after compilation


void function Smarty::register_prefilter($function) [line 888] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 388 of 1382

string $function name of PHP function to register

Registers a prefilter function to apply to a template before compiling


void function Smarty::register_resource($type, $functions) [line 852] Function Parameters:

string $type name of resource array $functions array of functions to handle resource

Registers a resource to fetch a template


boolean function Smarty::template_exists($tpl_file) [line 1097] Function Parameters:

string $tpl_file

Checks whether requested template exists.


void function Smarty::trigger_error($error_msg, [$error_type = E_USER_WARNING]) [line 1142] Function Parameters:

string $error_msg integer $error_type

trigger Smarty error


void function Smarty::unregister_block($block) [line 797] Function Parameters:

string $block name of template function

Unregisters block function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 389 of 1382

void function Smarty::unregister_compiler_function($function) [line 819] Function Parameters:

string $function name of template function

Unregisters compiler function


void function Smarty::unregister_function($function) [line 747] Function Parameters:

string $function name of template function

Unregisters custom function


void function Smarty::unregister_modifier($modifier) [line 841] Function Parameters:

string $modifier name of template modifier

Unregisters modifier
void function Smarty::unregister_object($object) [line 774] Function Parameters:

string $object name of template object

Unregisters object
void function Smarty::unregister_outputfilter($function) [line 946] Function Parameters:

string $function name of PHP function

Unregisters an outputfilter function


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 390 of 1382

void function Smarty::unregister_postfilter($function) [line 923] Function Parameters:

string $function name of PHP function

Unregisters a postfilter function


void function Smarty::unregister_prefilter($function) [line 900] Function Parameters:

string $function name of PHP function

Unregisters a prefilter function


void function Smarty::unregister_resource($type) [line 877] Function Parameters:

string $type name of resource

Unregisters a resource
boolean function Smarty::_compile_resource($resource_name, $compile_path) [line 1446] Function Parameters:

string $resource_name string $compile_path

compile the template


boolean function Smarty::_compile_source($resource_name, &$source_content, &$compiled_content, [$cache_include_path = null], $source_content, $compiled_content) [line 1485] Function Parameters:

string $resource_name string $source_content

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 391 of 1382

string $compiled_content &$source_content &$compiled_content $cache_include_path

compile the given source


string function Smarty::_dequote($string) [line 1732] Function Parameters:

string $string

Remove starting and ending quotes from the string


mixed function Smarty::_eval($code, [$params = null]) [line 2000] Function Parameters:

$code $params

wrapper for eval() retaining $this


boolean function Smarty::_fetch_resource_info(&$params, $resource_name, $source_content, $resource_timestamp, $get_source, $quiet) [line 1565] Function Parameters:

string $resource_name string $source_content integer $resource_timestamp boolean $get_source boolean $quiet &$params

fetch the template info. Gets timestamp, and source if get_source is true sets $source_content to the source of the template, and $resource_timestamp to its time stamp

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 392 of 1382

string function Smarty::_get_auto_filename($auto_base, [$auto_source = null], [$auto_id = null]) [line 1796] Function Parameters:

string $auto_base string $auto_source string $auto_id

get a concrete filename for automagically created content

Static Variable Used string|null 1: Static Variable Used string|null $_cache_info:

string|null function Smarty::_get_auto_id([$cache_id = null], [$compile_id = null]) [line 1854] Function Parameters:

string $cache_id string $compile_id

returns an auto_id for auto-file-functions


string function Smarty::_get_compile_path($resource_name) [line 1545] Function Parameters:

string $resource_name

Get the compile path for this resource


string|false function Smarty::_get_plugin_filepath($type, $name) [line 1399] Function Parameters:

string $type string $name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 393 of 1382

get filepath of requested plugin


mixed function Smarty::_include($filename, [$once = false], [$params = null]) [line 1986] Function Parameters:

$filename $once $params

wrapper for include() retaining $this


boolean function Smarty::_is_compiled($resource_name, $compile_path) [line 1413] Function Parameters:

string $resource_name string $compile_path

test if resource needs compiling


boolean function Smarty::_parse_resource_name(&$params, $resource_base_path, $resource_name, $resource_type) [line 1647] Function Parameters:

string $resource_base_path string $resource_name string $resource_type &$params

parse out the type and name from the resource


string function Smarty::_process_compiled_include_callback($match) [line 1894] Function Parameters:

$match

callback function for preg_replace, to call a non-cacheable block

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 394 of 1382

string function Smarty::_read_file($filename, [$start = null], [$lines = null]) [line 1751] Function Parameters:

string $filename integer $start integer $lines

read in a file from line $start for $lines. read the entire file if $start and $lines are null.

string function Smarty::_run_mod_handler($modifier_name, $map_array) [line 1711] Function Parameters:

string|null $modifier_name array|null $map_array

Handle modifiers
array function Smarty::_smarty_cache_attrs($cache_serial, $count) [line 1963] Function Parameters:

$cache_serial $count

get or set an array of cached attributes for function that is not cacheable

void function Smarty::_smarty_include($params, $_smarty_include_tpl_file, $_smarty_include_vars) [line 1913] Function Parameters:

string $_smarty_include_tpl_file string $_smarty_include_vars $params

called for included templates

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 395 of 1382

void function Smarty::_trigger_fatal_error($error_msg, [$tpl_file = null], [$tpl_line = null], [$file = null], [$line = null], [$error_type = E_USER_ERROR]) [line 1873] Function Parameters:

string $error_msg string $tpl_file integer $tpl_line string $file integer $line integer $error_type

trigger Smarty plugin error


void function Smarty::_unlink($resource, [$exp_time = null]) [line 1836] Function Parameters:

string $resource integer $exp_time

unlink a file, possibly using expiration time

Class Smarty_Compiler
[line 48]

Template compiling class

Package Smarty

Constructor void function Smarty_Compiler::Smarty_Compiler() [line 95]

The class constructor.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 396 of 1382

void function Smarty_Compiler::_add_plugin($type, $name, [$delayed_loading = null]) [line 1856] Function Parameters:

string $type string $name boolean? $delayed_loading

add plugin
void function Smarty_Compiler::_compile_arg_list($type, $name, $attrs, &$cache_code) [line 1306] Function Parameters:

$type $name $attrs &$cache_code

boolean function Smarty_Compiler::_compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output, $output) [line 621] Function Parameters:

string $tag_command string $tag_args string $tag_modifier string $output &$output

compile block function tag sets $output to compiled block function tag

string function Smarty_Compiler::_compile_capture_tag($start, [$tag_args = '']) [line 1116] Function Parameters:

boolean $start true if this is the {capture} tag string $tag_args

Compile {capture} .. {/capture} tags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 397 of 1382

boolean function Smarty_Compiler::_compile_compiler_tag($tag_command, $tag_args, &$output, $output) [line 552] Function Parameters:

string $tag_command string $tag_args string $output &$output

compile the custom compiler tag sets $output to the compiled custom compiler tag

string function Smarty_Compiler::_compile_custom_tag($tag_command, $tag_args, $tag_modifier) [line 706] Function Parameters:

string $tag_command string $tag_args string $tag_modifier

compile custom function tag


true function Smarty_Compiler::_compile_file($resource_name, $source_content, &$compiled_content, $compiled_content) [line 227] Function Parameters:

string $resource_name string $source_content string $compiled_content &$compiled_content

compile a resource sets $compiled_content to the compiled source

string function Smarty_Compiler::_compile_foreach_start($tag_args) [line 1050] Function Parameters:

string $tag_args

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 398 of 1382

Compile {foreach ...} tag.


string function Smarty_Compiler::_compile_if_tag($tag_args, [$elseif = false]) [line 1151] Function Parameters:

string $tag_args boolean $elseif if true, uses elseif instead of if

Compile {if ...} tag


string function Smarty_Compiler::_compile_include_php_tag($tag_args) [line 914] Function Parameters:

string $tag_args

Compile {include ...} tag


string function Smarty_Compiler::_compile_include_tag($tag_args) [line 861] Function Parameters:

string $tag_args

Compile {include ...} tag


string function Smarty_Compiler::_compile_insert_tag($tag_args) [line 827] Function Parameters:

string $tag_args

Compile {insert ...} tag


string function Smarty_Compiler::_compile_plugin_call($type, $name) [line 1986] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 399 of 1382

string $type string $name

compiles call to plugin of type $type with name $name returns a string containing the function-name or method call without the paramter-list that would have follow to make the call valid php-syntax

string function Smarty_Compiler::_compile_registered_object_tag($tag_command, $attrs, $tag_modifier) [line 735] Function Parameters:

string $tag_command array $attrs string $tag_modifier

compile a registered object tag


string function Smarty_Compiler::_compile_section_start($tag_args) [line 945] Function Parameters:

string $tag_args

Compile {section ...} tag


string function Smarty_Compiler::_compile_smarty_ref(&$indexes, $indexes) [line 1875] Function Parameters:

string $indexes &$indexes

Compiles references of type $smarty.foo


string function Smarty_Compiler::_compile_tag($template_tag) [line 406] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 400 of 1382

string $template_tag

Compile a template tag


string function Smarty_Compiler::_expand_quoted_text($var_expr) [line 1556] Function Parameters:

string $var_expr

expand quoted text with embedded variables


void function Smarty_Compiler::_load_filters() [line 2010]

load pre- and post-filters


array function Smarty_Compiler::_parse_attrs($tag_args) [line 1407] Function Parameters:

string $tag_args

Parse attribute string


void function Smarty_Compiler::_parse_conf_var($conf_var_expr) [line 1741] Function Parameters:

string $conf_var_expr

parse configuration variable expression into PHP code


array function Smarty_Compiler::_parse_is_expr($is_arg, $tokens) [line 1346] Function Parameters:

string $is_arg array $tokens

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 401 of 1382

Parse is expression
void function Smarty_Compiler::_parse_modifiers(&$output, $modifier_string, $output) [line 1787] Function Parameters:

string $output string $modifier_string &$output

parse modifier chain into PHP code sets $output to parsed modified chain

string function Smarty_Compiler::_parse_parenth_args($parenth_args) [line 1725] Function Parameters:

string $parenth_args

parse arguments in function call parenthesis


string function Smarty_Compiler::_parse_section_prop($section_prop_expr) [line 1762] Function Parameters:

string $section_prop_expr

parse section property expression into PHP code


string function Smarty_Compiler::_parse_var($var_expr, $output) [line 1582] Function Parameters:

string $var_expr string $output

parse variable expression into PHP code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 402 of 1382

void function Smarty_Compiler::_parse_vars_props(&$tokens, $tokens) [line 1491] Function Parameters:

array $tokens &$tokens

compile multiple variables and section properties tokens into PHP code
string function Smarty_Compiler::_parse_var_props($val, $tag_attrs) [line 1506] Function Parameters:

string $val string $tag_attrs

compile single variable and section properties token into PHP code
string function Smarty_Compiler::_pop_cacheable_state($type, $name) [line 2090] Function Parameters:

$type $name

check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.
string function Smarty_Compiler::_push_cacheable_state($type, $name) [line 2072] Function Parameters:

$type $name

check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition.
string function Smarty_Compiler::_quote_replace($string) [line 2041] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 403 of 1382

string $string

Quote subpattern references


void function Smarty_Compiler::_syntax_error($error_msg, [$error_type = E_USER_ERROR], [$file = null], [$line = null]) [line 2054] Function Parameters:

string $error_msg integer $error_type string $file integer $line

display Smarty syntax error

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 404 of 1382

core.assemble_plugin_filepath.php
Smarty plugin

Package Smarty Sub-Package plugins

string|false function smarty_core_assemble_plugin_filepath($params, &$smarty, $type, $name) [line 15] Function Parameters:

string $type string $name $params &$smarty

assemble filepath of requested plugin

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 405 of 1382

core.assign_smarty_interface.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_assign_smarty_interface($params, &$smarty) [line 17] Function Parameters:

array $params Format: null Smarty &$smarty

Smarty assign_smarty_interface core plugin Type: core Name: assign_smarty_interface Purpose: assign the $smarty interface variable

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 406 of 1382

core.create_dir_structure.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_create_dir_structure($params, &$smarty, $dir) [line 16] Function Parameters:

string $dir $params &$smarty

create full directory structure

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 407 of 1382

core.display_debug_console.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_display_debug_console($params, &$smarty) [line 17] Function Parameters:

array $params Format: null Smarty &$smarty

Smarty debug_console function plugin Type: core Name: display_debug_console Purpose: display the javascript debug console window

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 408 of 1382

core.get_include_path.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_get_include_path(&$params, &$smarty, $file_path, $new_file_path) [line 19] Function Parameters:

string $file_path string $new_file_path &$params &$smarty

Get path to file from include_path

Static Variable Used array|null $_path_array:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 409 of 1382

core.get_microtime.php
Smarty plugin

Package Smarty Sub-Package plugins

double function smarty_core_get_microtime($params, &$smarty) [line 12] Function Parameters:

$params &$smarty

Get seconds and microseconds

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 410 of 1382

core.get_php_resource.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_get_php_resource(&$params, &$smarty, $resource, $resource_type, 2) [line 18] Function Parameters:

string $resource string $resource_type $php_resource 2 &$params &$smarty

Retrieves PHP script resource sets $php_resource to the returned resource

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 411 of 1382

core.is_secure.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_is_secure($params, &$smarty, $resource_type, $resource_name) [line 18] Function Parameters:

string $resource_type string $resource_name $params &$smarty

determines if a resource is secure or not.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 412 of 1382

core.is_trusted.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_is_trusted($params, &$smarty, $resource_type, $resource_name) [line 21] Function Parameters:

string $resource_type string $resource_name $params &$smarty

determines if a resource is trusted or not

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 413 of 1382

core.load_plugins.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_load_plugins($params, &$smarty, $plugins) [line 16] Function Parameters:

array $plugins $params &$smarty

Load requested plugins

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 414 of 1382

core.load_resource_plugin.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_load_resource_plugin($params, &$smarty, $type) [line 16] Function Parameters:

string $type $params &$smarty

load a resource plugin

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 415 of 1382

core.process_cached_inserts.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_core_process_cached_inserts($params, &$smarty, $results) [line 14] Function Parameters:

string $results $params &$smarty

Replace cached inserts with the actual results

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 416 of 1382

core.process_compiled_include.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_core_process_compiled_include($params, &$smarty, $compiled_tpl, $cached_source) [line 17] Function Parameters:

string $compiled_tpl string $cached_source $params &$smarty

Replace nocache-tags by results of the corresponding non-cacheable functions and return it

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 417 of 1382

core.read_cache_file.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_read_cache_file(&$params, &$smarty, $tpl_file, $cache_id, $compile_id, $results) [line 21] Function Parameters:

string $tpl_file string $cache_id string $compile_id string $results &$params &$smarty

read a cache file, determine if it needs to be regenerated or not

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 418 of 1382

core.rmdir.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_rmdir($params, &$smarty, $dirname, $level, $exp_time) [line 20] Function Parameters:

string $dirname integer $level integer $exp_time $params &$smarty

delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it!

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 419 of 1382

core.rm_auto.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_rm_auto($params, &$smarty, $auto_base, $auto_source, $auto_id, $exp_time) [line 20] Function Parameters:

string $auto_base string $auto_source string $auto_id integer $exp_time $params &$smarty

delete an automagically created file by name and id

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 420 of 1382

core.run_insert_handler.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_core_run_insert_handler($params, &$smarty, $args) [line 14] Function Parameters:

array $args $params &$smarty

Handle insert tags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 421 of 1382

core.smarty_include_php.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_core_smarty_include_php($params, &$smarty, $smarty_file, $smarty_assign, $smarty_once, $smarty_include_vars) [line 21] Function Parameters:

string $smarty_file string $smarty_assign variable to assign the included template's boolean $smarty_once uses include_once if this is true array $smarty_include_vars associative array of vars from file="blah" var=$var} $params &$smarty

output into {include

called for included php files within templates

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 422 of 1382

core.write_cache_file.php
Smarty plugin

Package Smarty Sub-Package plugins

true|null function smarty_core_write_cache_file($params, &$smarty, $tpl_file, $cache_id, $compile_id, $results) [line 21] Function Parameters:

string $tpl_file string $cache_id string $compile_id string $results $params &$smarty

Prepend the cache information to the cache file and write it

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 423 of 1382

core.write_compiled_include.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_write_compiled_include($params, &$smarty, $compile_path, $template_compiled, $template_timestamp) [line 17] Function Parameters:

string $compile_path string $template_compiled integer $template_timestamp $params &$smarty

Extract non-cacheable parts out of compiled template and write it

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 424 of 1382

core.write_compiled_resource.php
Smarty plugin

Package Smarty Sub-Package plugins

true function smarty_core_write_compiled_resource($params, &$smarty, $compile_path, $compiled_content, $resource_timestamp) [line 16] Function Parameters:

string $compile_path string $compiled_content integer $resource_timestamp $params &$smarty

write the compiled resource

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 425 of 1382

core.write_file.php
Smarty plugin

Package Smarty Sub-Package plugins

boolean function smarty_core_write_file($params, &$smarty, $filename, $contents, $create_dirs) [line 16] Function Parameters:

string $filename string $contents boolean $create_dirs $params &$smarty

write out a file to disk

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 426 of 1382

block.strip.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_block_strip($params, $content, &$this) [line 21] Function Parameters:

array $params unused, no parameters for this block string $content content of {strip}{/strip} tags Smarty &$this clever method emulation

Smarty {strip}{/strip} block plugin Type: block function Name: strip Purpose: strip unwanted white space from text

Link {strip} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 427 of 1382

block.textformat.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_block_textformat($params, $content, &$smarty) [line 30] Function Parameters:

array $params Params: style: string (email) indent: integer (0) wrap: integer (80) wrap_char string ("\n") indent_char: string (" ") wrap_boundary: boolean (true) string $content contents of the block Smarty &$smarty clever simulation of a method

Smarty {textformat}{/textformat} block plugin Type: block function Name: textformat Purpose: format text a certain way with preset styles settings

or custom wrap/indent

Link {textformat} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 428 of 1382

function.assign.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_function_assign($params, &$smarty) [line 19] Function Parameters:

array $params Format: array('var' => variable name, 'value' => value to assign) Smarty &$smarty

Smarty {assign} function plugin Type: function Name: assign Purpose: assign a value to a template variable

Link {assign} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 429 of 1382

function.assign_debug_info.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_function_assign_debug_info($params, &$smarty) [line 18] Function Parameters:

array $params unused in this plugin, this plugin uses Smarty::$_config, Smarty::$_tpl_vars and Smarty::$_smarty_debug_info Smarty &$smarty

Smarty {assign_debug_info} function plugin Type: function Name: assign_debug_info Purpose: assign debug info to the template

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 430 of 1382

function.config_load.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_function_config_load($params, &$smarty) [line 25] Function Parameters:

array $params Format: array('file' => required config file name, 'section' => optional config file section to load 'scope' => local/parent/global 'global' => overrides scope, setting to parent if true) Smarty &$smarty

Smarty {config_load} function plugin Type: function Name: config_load Purpose: load config file vars

Link {config_load} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 431 of 1382

function.counter.php
Smarty plugin

Package Smarty Sub-Package plugins

string|null function smarty_function_counter($params, &$smarty) [line 21] Function Parameters:

array $params parameters Smarty &$smarty

Smarty {counter} function plugin Type: function Name: counter Purpose: print out a counter value

Link {counter} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 432 of 1382

function.cycle.php
Smarty plugin

Package Smarty Sub-Package plugins

string|null function smarty_function_cycle($params, &$smarty) [line 44] Function Parameters:

array $params Smarty &$smarty

Smarty {cycle} function plugin Type: function Name: cycle Date: May 3, 2002 Purpose: cycle through given values Input: name = name of cycle (optional) values = comma separated list of values to cycle, or an array of values to cycle (this can be left out for subsequent calls) reset = boolean - resets given var to true print = boolean - print var or not. default is true advance = boolean - whether or not to advance the cycle delimiter = the value delimiter, default is "," assign = boolean, assigns to template var instead of printed. Examples: {cycle values="#eeeeee,#d0d0d0d"} {cycle name=row values="one,two,three" reset=true} {cycle name=row}

Author Monte Ohrt < [email protected]> Author credit to Mark Priatel < [email protected]> Author credit to Gerard < [email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 433 of 1382

Author credit to Jason Sweat < [email protected]> Version 1.3 Link {cycle} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 434 of 1382

function.debug.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_debug($params, &$smarty) [line 24] Function Parameters:

array $params Smarty &$smarty

Smarty {debug} function plugin Type: function Name: debug Date: July 1, 2002 Purpose: popup debug window

Author Monte Ohrt < [email protected]> Version 1.0 Link {debug} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 435 of 1382

function.eval.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_function_eval($params, &$smarty) [line 20] Function Parameters:

array $params Smarty &$smarty

Smarty {eval} function plugin Type: function Name: eval Purpose: evaluate a template variable as a template

Link {eval} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 436 of 1382

function.fetch.php
Smarty plugin

Package Smarty Sub-Package plugins

string|null function smarty_function_fetch($params, &$smarty) [line 22] Function Parameters:

array $params Smarty &$smarty

Smarty {fetch} plugin Type: function Name: fetch Purpose: fetch file, web or ftp data and display results

Link {fetch} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 437 of 1382

function.html_checkboxes.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_checkboxes($params, &$smarty) [line 40] Function Parameters:

array $params Smarty &$smarty

Smarty {html_checkboxes} function plugin File: function.html_checkboxes.php Type: function Name: html_checkboxes Date: 24.Feb.2003 Purpose: Prints out a list of checkbox input types Input: name (optional) - string default "checkbox" values (required) - array options (optional) - associative array checked (optional) - array default not set separator (optional) - ie or &nbsp; output (optional) - without this one the buttons don't have names Examples: {html_checkboxes values=$ids output=$names} {html_checkboxes values=$ids name='box' separator='<br>' output=$names} {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}

Author credits to Monte Ohrt < [email protected]> Author Christopher Kvarme < [email protected]> Version 1.0 Link {html_checkboxes} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 438 of 1382

Uses smarty_function_escape_special_chars()

void function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) [line 118] Function Parameters:

$name $value $output $selected $extra $separator $labels

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 439 of 1382

function.html_image.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_image($params, &$smarty) [line 37] Function Parameters:

array $params Smarty &$smarty

Smarty {html_image} function plugin Type: function Name: html_image Date: Feb 24, 2003 Purpose: format HTML tags for the image Input: file = file (and path) of image (required) border = border width (optional, default 0) height = image height (optional, default actual height) image =image width (optional, default actual width) basedir = base directory for absolute paths, default is environment variable DOCUMENT_ROOT Examples: {html_image file="images/masthead.gif"} Output: src="images/masthead.gif" border=0 width=400 height=23>

<img

Author credits to Duda < [email protected]> - wrote first image function helped with lots of functionality Author Monte Ohrt < [email protected]> Version 1.0 Link {html_image} (Smarty online manual) Uses smarty_function_escape_special_chars()

in repository,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 440 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 441 of 1382

function.html_options.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_options($params, &$smarty) [line 29] Function Parameters:

array $params Smarty &$smarty

Smarty {html_options} function plugin Type: function Name: html_options Input: name (optional) - string default "select" values (required if no options supplied) - array options (required if no values supplied) - associative array selected (optional) - string default not set output (required if not options supplied) - array Purpose: Prints the list of <option> tags generated from parameters

the passed

Link {html_image} (Smarty online manual) Uses smarty_function_escape_special_chars()

void function smarty_function_html_options_optgroup($key, $values, $selected) [line 107] Function Parameters:

$key

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 442 of 1382

$values $selected

void function smarty_function_html_options_optoutput($key, $value, $selected) [line 94] Function Parameters:

$key $value $selected

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 443 of 1382

function.html_radios.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_radios($params, &$smarty) [line 40] Function Parameters:

array $params Smarty &$smarty

Smarty {html_radios} function plugin File: function.html_radios.php Type: function Name: html_radios Date: 24.Feb.2003 Purpose: Prints out a list of radio input types Input: name (optional) - string default "radio" values (required) - array options (optional) - associative array checked (optional) - array default not set separator (optional) - ie or &nbsp; output (optional) - without this one the buttons don't have names Examples: {html_radios values=$ids output=$names} {html_radios values=$ids name='box' separator='<br>' output=$names} {html_radios values=$ids checked=$checked separator='<br>' output=$names}

Author credits to Monte Ohrt < [email protected]> Author Christopher Kvarme < [email protected]> Version 1.0 Link {html_radios} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 444 of 1382

Uses smarty_function_escape_special_chars()

void function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels) [line 121] Function Parameters:

$name $value $output $selected $extra $separator $labels

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 445 of 1382

function.html_select_date.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_select_date($params, &$smarty) [line 33] Function Parameters:

array $params Smarty &$smarty

Smarty {html_select_date} plugin Type: function Name: html_select_date Purpose: Prints the dropdowns for date selection. ChangeLog: 1.0 initial release 1.1 added support for +/- N syntax for begin and end year values. (Monte) 1.2 added support for yyyy-mm-dd syntax for time value. (Jan Rosier) 1.3 added support for choosing format for month values (Gary Loescher) 1.3.1 added support for choosing format for day values (Marcus Bointon)

Author Andrei Zmievski Version 1.3 Link {html_select_date} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 446 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 447 of 1382

function.html_select_time.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_select_time($params, &$smarty) [line 22] Function Parameters:

array $params Smarty &$smarty

Smarty {html_select_time} function plugin Type: function Name: html_select_time Purpose: Prints the dropdowns for time selection

Link {html_select_time} (Smarty online manual) Uses smarty_make_timestamp()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 448 of 1382

function.html_table.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_html_table($params, &$smarty) [line 44] Function Parameters:

array $params Smarty &$smarty

Smarty {html_table} function plugin Type: function Name: html_table Date: Feb 17, 2003 Purpose: make an html table from an array of data Input: loop = array to loop through cols = number of columns rows = number of rows table_attr = table attributes tr_attr = table row attributes (arrays are cycled) td_attr = table cell attributes (arrays are cycled) trailpad = value to pad trailing cells with vdir = vertical direction (default: "down", means top-to-bottom) hdir = horizontal direction (default: "right", means left-to-right) inner = inner loop (default "cols": print $loop line by line, $loop will be printed column by column otherwise)

Examples: {table loop=$data} {table loop=$data cols=4 tr_attr='"bgcolor=red"'} {table loop=$data cols=4 tr_attr=$colors}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 449 of 1382

Author Monte Ohrt < [email protected]> Version 1.0 Link {html_table} (Smarty online manual)

void function smarty_function_html_table_cycle($name, $var, $no) [line 100] Function Parameters:

$name $var $no

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 450 of 1382

function.mailto.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_mailto($params, &$smarty) [line 49] Function Parameters:

array $params Smarty &$smarty

Smarty {mailto} function plugin Type: function Name: mailto Date: May 21, 2002 Purpose: automate mailto address link creation, and optionally encode them. Input: address = e-mail address text = (optional) text to display, default is address encode = (optional) can be one of: * none : no encoding (default) * javascript : encode with javascript * hex : encode with hexidecimal (no javascript) cc = (optional) address(es) to carbon copy bcc = (optional) address(es) to blind carbon copy subject = (optional) e-mail subject newsgroups = (optional) newsgroup(s) to post to followupto = (optional) address(es) to follow up to extra = (optional) extra tags for the href link Examples: {mailto address="[email protected]"} {mailto address="[email protected]" encode="javascript"} {mailto address="[email protected]" encode="hex"} {mailto address="[email protected]" subject="Hello to you!"} {mailto address="[email protected]" cc="[email protected],[email protected]"} {mailto address="[email protected]" extra='class="mailto"'}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 451 of 1382

Author Monte Ohrt < [email protected]> Author credits to Jason Sweat (added cc, bcc and subject functionality) Version 1.2 Link {mailto} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 452 of 1382

function.math.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_math($params, &$smarty) [line 21] Function Parameters:

array $params Smarty &$smarty

Smarty {math} function plugin Type: function Name: math Purpose: handle math computations in template

Link {math} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 453 of 1382

function.popup.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_popup($params, &$smarty) [line 21] Function Parameters:

array $params Smarty &$smarty

Smarty {popup} function plugin Type: function Name: popup Purpose: make text pop up in windows via overlib

Link {popup} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 454 of 1382

function.popup_init.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_function_popup_init($params, &$smarty) [line 21] Function Parameters:

array $params Smarty &$smarty

Smarty {popup_init} function plugin Type: function Name: popup_init Purpose: initialize overlib

Link {popup_init} (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 455 of 1382

function.var_dump.php
Package Smarty Sub-Package plugins

void function smarty_function_var_dump($params, &$smarty) [line 13] Function Parameters:

$params &$smarty

Smarty plugin ------------------------------------------------------------- Type: function Name: assign Purpose: assign a value to a template variable ------------------------------------------------------------

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 456 of 1382

modifier.capitalize.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_capitalize($string) [line 20] Function Parameters:

string $string

Smarty capitalize modifier plugin Type: modifier Name: capitalize Purpose: capitalize words in the string

Link capitalize (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 457 of 1382

modifier.cat.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_cat($string, $cat) [line 26] Function Parameters:

string $string string $cat

Smarty cat modifier plugin Type: modifier Name: cat Date: Feb 24, 2003 Purpose: catenate a value to a variable Input: catenate Example: {$var|cat:"foo"}

string to

Author Monte Ohrt < [email protected]> Version 1.0 Link cat (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 458 of 1382

modifier.count_characters.php
Smarty plugin

Package Smarty Sub-Package plugins

integer function smarty_modifier_count_characters($string, [$include_spaces = false]) [line 21] Function Parameters:

string $string boolean $include_spaces include whitespace in the character count

Smarty count_characters modifier plugin Type: modifier Name: count_characteres Purpose: count the number of characters in a text

Link count_characters (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 459 of 1382

modifier.count_paragraphs.php
Smarty plugin

Package Smarty Sub-Package plugins

integer function smarty_modifier_count_paragraphs($string) [line 20] Function Parameters:

string $string

Smarty count_paragraphs modifier plugin Type: modifier Name: count_paragraphs Purpose: count the number of paragraphs in a text

Link count_paragraphs (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 460 of 1382

modifier.count_sentences.php
Smarty plugin

Package Smarty Sub-Package plugins

integer function smarty_modifier_count_sentences($string) [line 20] Function Parameters:

string $string

Smarty count_sentences modifier plugin Type: modifier Name: count_sentences Purpose: count the number of sentences in a text

Link count_sentences (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 461 of 1382

modifier.count_words.php
Smarty plugin

Package Smarty Sub-Package plugins

integer function smarty_modifier_count_words($string) [line 20] Function Parameters:

string $string

Smarty count_words modifier plugin Type: modifier Name: count_words Purpose: count the number of words in a text

Link count_words (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 462 of 1382

modifier.date_format.php
Smarty plugin

Package Smarty Sub-Package plugins

require_once $smarty->_get_plugin_filepath('shared','make_timestamp') [line 11]

Include theshared.make_timestamp.php plugin


string|void function smarty_modifier_date_format($string, [$format = "%b %e, %Y"], [$default_date = null]) [line 30] Function Parameters:

string $string string $format string $default_date

Smarty date_format modifier plugin Type: modifier Name: date_format Purpose: format datestamps via strftime Input: string: input date string format: strftime format for output default_date: default date if $string is empty

Link date_format (Smarty online manual) Uses smarty_make_timestamp()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 463 of 1382

modifier.debug_print_var.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_debug_print_var($var, [$depth = 0], [$length = 40]) [line 22] Function Parameters:

array|object $var integer $depth integer $length

Smarty debug_print_var modifier plugin Type: modifier Name: debug_print_var Purpose: formats variable contents for display in the console

Link debug_print_var (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 464 of 1382

modifier.default.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_default($string, [$default = '']) [line 21] Function Parameters:

string $string string $default

Smarty default modifier plugin Type: modifier Name: default Purpose: designate default value for empty variables

Link default (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 465 of 1382

modifier.escape.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_escape($string, [$esc_type = 'html']) [line 21] Function Parameters:

string $string html|htmlall|url|quotes|hex|hexentity|javascript $esc_type

Smarty escape modifier plugin Type: modifier Name: escape Purpose: Escape the string according to escapement type

Link escape (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 466 of 1382

modifier.htmlentities.php
Package Smarty Sub-Package plugins

void function smarty_modifier_htmlentities($string) [line 13] Function Parameters:

$string

Smarty plugin ------------------------------------------------------------- Type: modifier Name: upper Purpose: convert string to uppercase -------------------------------------------------------------

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 467 of 1382

modifier.indent.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_indent($string, [$chars = 4], [$char = " "]) [line 22] Function Parameters:

string $string integer $chars string $char

Smarty indent modifier plugin Type: modifier Name: indent Purpose: indent lines of text

Link indent (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 468 of 1382

modifier.lower.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_lower($string) [line 20] Function Parameters:

string $string

Smarty lower modifier plugin Type: modifier Name: lower Purpose: convert string to lowercase

Link lower (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 469 of 1382

modifier.nl2br.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_nl2br($string) [line 28] Function Parameters:

string $string

Smarty plugin Type: modifier Name: nl2br Date: Feb 26, 2003 Purpose: convert \r\n, \r or \n to <br> Input: contents = contents to replace preceed_test = if true, includes preceeding break tags in replacement Example: {$text|nl2br}

Author Monte Ohrt < [email protected]> Version 1.0 Link nl2br (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 470 of 1382

modifier.rawurlencode.php
Package Smarty Sub-Package plugins

void function smarty_modifier_rawurlencode($string) [line 13] Function Parameters:

$string

Smarty plugin ------------------------------------------------------------- Type: modifier Name: rawurlencode Purpose: encode string for use in PDFdefaultConverter TOC ------------------------------------------------------------

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 471 of 1382

modifier.regex_replace.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_regex_replace($string, $search, $replace) [line 22] Function Parameters:

string $string string|array $search string|array $replace

Smarty regex_replace modifier plugin Type: modifier Name: regex_replace Purpose: regular epxression search/replace

Link regex_replace (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 472 of 1382

modifier.replace.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_replace($string, $search, $replace) [line 22] Function Parameters:

string $string string $search string $replace

Smarty replace modifier plugin Type: modifier Name: replace Purpose: simple search/replace

Link replace (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 473 of 1382

modifier.spacify.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_spacify($string, [$spacify_char = ' ']) [line 21] Function Parameters:

string $string string $spacify_char

Smarty spacify modifier plugin Type: modifier Name: spacify Purpose: add spaces between characters in a string

Link spacify (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 474 of 1382

modifier.string_format.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_string_format($string, $format) [line 21] Function Parameters:

string $string string $format

Smarty string_format modifier plugin Type: modifier Name: string_format Purpose: format strings via sprintf

Link string_format (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 475 of 1382

modifier.strip.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_strip($text, [$replace = ' ']) [line 26] Function Parameters:

string $text string $replace

Smarty strip modifier plugin Type: modifier Name: strip Purpose: Replace all repeated spaces, newlines, tabs with a single space or supplied replacement string. Example: {$var|strip} {$var|strip:"&nbsp;"} Date: September 25th, 2002

Author Monte Ohrt < [email protected]> Version 1.0 Link strip (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 476 of 1382

modifier.strip_tags.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_strip_tags($string, [$replace_with_space = true]) [line 21] Function Parameters:

string $string boolean $replace_with_space

Smarty strip_tags modifier plugin Type: modifier Name: strip_tags Purpose: strip html tags from text

Link strip_tags (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 477 of 1382

modifier.truncate.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_truncate($string, [$length = 80], [$etc = '...'], [$break_words = false]) [line 25] Function Parameters:

string $string integer $length string $etc boolean $break_words

Smarty truncate modifier plugin Type: modifier Name: truncate Purpose: Truncate a string to a certain length if necessary, the middle of a word, and appending the $etc string.

optionally splitting in

Link truncate (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 478 of 1382

modifier.upper.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_upper($string) [line 20] Function Parameters:

string $string

Smarty upper modifier plugin Type: modifier Name: upper Purpose: convert string to uppercase

Link upper (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 479 of 1382

modifier.wordwrap.php
Smarty plugin

Package Smarty Sub-Package plugins

string function smarty_modifier_wordwrap($string, [$length = 80], [$break = "\n"], [$cut = false]) [line 23] Function Parameters:

string $string integer $length string $break boolean $cut

Smarty wordwrap modifier plugin Type: modifier Name: wordwrap Purpose: wrap a string of text at a given length

Link wordwrap (Smarty online manual)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 480 of 1382

outputfilter.trimwhitespace.php
Smarty plugin

Package Smarty Sub-Package plugins

void function smarty_outputfilter_trimwhitespace($source, &$smarty) [line 28] Function Parameters:

string $source Smarty &$smarty

Smarty trimwhitespace outputfilter plugin File: outputfilter.trimwhitespace.php Type: outputfilter Name: trimwhitespace Date: Jan 25, 2003 Purpose: trim leading white space and blank lines from template source after it gets interpreted, cleaning up code and saving bandwidth. Does not affect <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks. Install: Drop into the plugin directory, call
1 $smarty-> load_filter('output','trimwhitespace');

from application.

Author Contributions from Lars Noschinski < [email protected]> Author Monte Ohrt < [email protected]> Version 1.3

void function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) [line 64] Function Parameters:

$search_str $replace &$subject

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 481 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 482 of 1382

shared.escape_special_chars.php
Smarty shared plugin

Package Smarty Sub-Package plugins

string function smarty_function_escape_special_chars($string) [line 18] Function Parameters:

string $string

escape_special_chars common function Function: smarty_function_escape_special_chars Purpose: used by other smarty functions to escape already escaped ones

special chars except for

Usedby smarty_function_html_checkboxes() Usedby smarty_function_html_image() Usedby smarty_function_html_options() Usedby smarty_function_html_radios()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 483 of 1382

shared.make_timestamp.php
Smarty shared plugin

Package Smarty Sub-Package plugins

string function smarty_make_timestamp($string) [line 16] Function Parameters:

string $string

Function: smarty_make_timestamp Purpose: used by other smarty functions to make a timestamp string.

from a

Usedby smarty_modifier_date_format() Usedby smarty_function_html_select_time()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 484 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 485 of 1382

Package tests Procedural Elements

bug-441275.php
Package tests

void function test2_441275([$foo = array("item1","item2",'item3' => "item4",array("item5","item6"),'item7'=>array('item8','item9',"array('it em9','item10')"))], $foobar) [line 13] Function Parameters:

$foo $foobar

This tests some more advanced cases to make sure to handle them
void function test_441275([$foo = array()]) [line 6] Function Parameters:

$foo

This makes sure the basic element of bug 44127 is fixed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 486 of 1382

bug-441278.php
Package tests

array function test_441278() [line 14]

Test description. anything said here

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 487 of 1382

bug-441287.php
Package tests

void function test_441287() [line 12]

sdesc 1234567890 Test Test2

void function test_4412872() [line 25]

Check to see if we are stripping whitespace before the * 1234567890 Test Test2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 488 of 1382

bug-441289.php
Package tests

void function test6() [line 58]

This desc tries to fool the non period short desc systems junk should only show the first line since we dont' look that far down for the short desc line break

void function test7() [line 69]

This desc tries to fool the non period short desc systems junk junk

void function test8() [line 90]

This is a test case where i think things break extended desc many lines of desc many lines of desc many lines of desc many lines of desc many lines of desc many lines of desc many lines of desc many lines of desc more extended desc that ends with a period. without a line limiter everything til period. would be part of the short desc allowing this many lines to be part of the short desc seemed like a problem to me so now using both the period and line break as a seperator you can only have a 4 line extended desc. the first line is usually blank since its the /** line

void function test_441289() [line 9]

This is a long comment which needs more than one line. This is the detailed documentation. This is another line of detailed docs

void function test_4412892() [line 17]

I started my short desc on the first line. This is the detailed documentation.

void function test_4412893() [line 25]

I am using just the first line as my short desc

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 489 of 1382

since i didn't use a period anywhere in this desc

void function test_4412894() [line 35]

I am using a blank line to end my short desc I think this looks the nicest when writing your readable

code and makes the code more

void function test_4412895() [line 44]

This is a test to see if the desc is fooled by 2.4 the short desc ends here. This is the detailed documentation.

void function test_bug_567455() [line 100]

This example is really tricky The short desc should end on the blank line even though this line ends with a period. Here is the long desc

void function test_bug_567455_2() [line 111]

This example is also really tricky The tries to break the parser test. Here is the long desc

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 490 of 1382

bug-441433.php
Package tests

void function SendEMail([$sendto = "\"Your Name\" <[email protected]>"]) [line 6] Function Parameters:

$sendto

This is a Test
void function test_441433([$test = "Some stuff in a quote"]) [line 16] Function Parameters:

$test

a second test. Make sure that we are clearing out quote data after using it since how we set that values has changed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 491 of 1382

bug-443153.php
Package tests

void function test_443153() [line 8]

test function

Author Joshua Eichorn < [email protected]> Author Test Person < [email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 492 of 1382

bug-445298.php
Package tests

void function test_445298() [line 9]

test function

See link2 See link1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 493 of 1382

bug-445305.php
Package tests

void function test_445305($foo) [line 8] Function Parameters:

String $foo A string to use in a function, if you really want to.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 494 of 1382

bug-445820.php
Package tests

void function test_445820([$val = array("1","2",'3' => 4)], $string, $my_array) [line 5] Function Parameters:

$val $string $my_array

test function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 495 of 1382

bug-540368.php
Package tests

void function blah() [line 20]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 496 of 1382

bug-542586.php
Package tests

void function func() [line 11] testie = 1 [line 4]

testie

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 497 of 1382

bug-550489.php
Package tests

thisisdumbbutworks = 'I'.'parse this' [line 8]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 498 of 1382

bug-551120.php
Package tests

include ('test'.'me').'.php' [line 6]

include

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 499 of 1382

bug-553137.php
Package tests

void function func1() [line 8]

func 1
void function func2() [line 12] void function func3() [line 19]

See func1(), func2()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 500 of 1382

bug-554712.php
Package tests

void function passbyref(&$varname) [line 15] Function Parameters:

&$varname

passes a variable by reference


void function returnsme() [line 8]

returns a reference

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 501 of 1382

bug-557861.php
bug is fixed. to test, remove this page-level docblock

Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 502 of 1382

bug-558031.php
Package tests

void function test_558031() [line 10]

Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 503 of 1382

bug-558051.php
Package tests

void function one() [line 11]

Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 504 of 1382

bug-559467.php
Package tests

CONSTANT1 = 1 [line 8]

blah blah short description blah blah long description

See CONSTANT2

CONSTANT2 = 2 [line 15]

blah blah short description blah blah long description

See CONSTANT1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 505 of 1382

bug-559494.php
tests variable names with the word 'array' in them

Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 506 of 1382

bug-559668.php
Package tests

include PEAR.'test'.'me' [line 8]

include 'file.ext' [line 7]

include 'file.ext' [line 6]

require PEAR.'test'.'me' [line 5]

include tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 507 of 1382

Config
Config file for MLib File includes all of the static variables that controls the default behavior of MLib.

Package tests Author Joe Stump < [email protected]> Version 0.1 See MLib Access public Name Config

$_MLIB_GLOBAL_DSN array = array('db_type'=&gt; 'mysql', 'username' =&gt; 'nobody', 'password' =&gt; '', 'database' =&gt; 'miester', 'server' =&gt; 'localhost') [line 99]

Global DSN to be used by classes The DSN to be used. Please see the PEAR documentation information.

Author Joe Stump < [email protected]> See TemplateDB Link http://pear.php.net

MLIB_GLOBAL_DEBUG = false [line 85]

Global debugging By turning on global debugging you enable debugging in ALL classes derived from MLib on ALL pages. BE CAREFUL SETTING THIS TO TRUE!!

Author Joe Stump < [email protected]> See MLib, MLIB::$debug, MLib::MLib()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 508 of 1382

MLIB_INCLUDE_PATH = '/home/jstump/public_html/v3/includes' [line 24]

MLib include path

Author Joe Stump < [email protected]> The absolute path to the directory where MLib resides.

MLIB_LOG_FILE = '/tmp/mlib.log' [line 36]

Default log file The log file where you wish all class errors to be Must be writable by the webserver.

Author Joe Stump < [email protected]> See MLIB_USE_SYSLOG

MLIB_SYSLOG_PRIORITY = LOG_WARNING [line 60]

Syslog priority The PHP function syslog takes a priority as a parameter. do not know what this means do NOT change this variable.

Author Joe Stump < [email protected]> See MLIB_USE_SYSLOG Link http://www.php.net/manual/en/function.syslog.php

MLIB_TEMPLATE_PATH = MLIB_INCLUDE_PATH.'/templates' [line 73]

Template path MLib comes with a template class that lets you separate your code from your HTML. This is the path where the template reside.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 509 of 1382

Author Joe Stump < [email protected]> See Template, MLIB_INCLUDE_PATH

MLIB_USE_SYSLOG = false [line 47]

Use syslog If set to true MLib will send errors to syslog instead of MLIB_LOG_FILE

the file defined in

Author Joe Stump < [email protected]> See MLIB_LOG_FILE

require_once MLIB_INCLUDE_PATH.'/Template/TemplateVar.php' [line 151]

TemplateVar include file

See TemplateVar

require_once MLIB_INCLUDE_PATH.'/DSN.php' [line 121]

DSN include file

See DSN

require_once MLIB_INCLUDE_PATH.'/Debug.php' [line 115]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 510 of 1382

Debug include file

See Debug

require_once MLIB_INCLUDE_PATH.'/Table.php' [line 127]

Table include file

See Table

require_once MLIB_INCLUDE_PATH.'/Template.php' [line 133]

Template include file

See Template

require_once MLIB_INCLUDE_PATH.'/Template/TemplateDB.php' [line 145]

TemplateDB include file

See TemplateDB

require_once MLIB_INCLUDE_PATH.'/Template/TemplateFile.php' [line 139]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 511 of 1382

TemplateFile include file

See TemplateFile

require_once MLIB_INCLUDE_PATH.'/MLib.php' [line 109]

MLib include file

See MLib

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 512 of 1382

bug-560578.php
page-level stuff

Package tests Author test @

require_once MLIB_INCLUDE_PATH.'/Debug.php' [line 12]

Debug include file

Author test @ See Debug

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 513 of 1382

bug-560595.php
Package tests

one = 'two' [line 10]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 514 of 1382

bug-562997.php
This page returns a class with name "%s"'."\n", and shouldn't find class at all

Package tests

PDERROR_MULTIPLE_PARENT = 1 [line 9]

warning triggered when inheritance could be from more than one class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 515 of 1382

bug-566200.php
Package tests

void function ezStartPageNumbers($x, $y, $size, [$pos = 'left'], [$pattern = '{PAGENUM} of {TOTALPAGENUM}'], [$num = '']) [line 8] Function Parameters:

$x $y $size $pos $pattern $num

tests function param bug

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 516 of 1382

bug-566600.php
Package tests

void function a() [line 20]

test links to methods and vars

See a::d() See a::$a

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 517 of 1382

bug-567059.php
Package tests

void function aa_567059(&$test, $two) [line 21] Function Parameters:

integer &$test testing @ param integer testing $two

test links to methods and vars

See a::a() See a::$a

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 518 of 1382

bug-645588.php
Global functions

Package tests Author Mark van Renswoude Version 1.0 Since 26-03-2002 15:56

string function globalGetVar($name) [line 40] Function Parameters:

string $name the name of the variable to return

Get a variable's value globalGetVar returns the value of an internal variable. This variable must be previously assigned using either globalSetVar, or an indirect setvar-tag in a loaded template.

See globalSetVar()

string function globalSetVar($name, $value) [line 22] Function Parameters:

string $name the name of the variable to set string $value new value

Set a variable, used by the template engine but available to all scripts globalSetVar sets an internal variable. This variable may later be retrieved using globalGetVar, and is automagically available to templates using the getvar-tag.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 519 of 1382

See globalGetVar()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 520 of 1382

bug-698356.php
This is a test of bug 698356. Must be parsed with -pp on to test should not throw error.

Package tests

void function bug698356_Output() [line 26]

Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler create a CHM file The output function generates the table of contents (contents.hhc) and file (phpdoc.hhp) files used to create a .CHM by the free MS HTML Help compiler. {@, a of all separate .html files is created in CHM format, and written to phpdoc.hhp. This was generated by writefile. Next, a call to the table of contents: finishes things off}}

to list list list

Link http://www.microsoft.com/downloads/release.asp?releaseid=33071 Uses generateTOC() - assigns to the toc template variable

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 521 of 1382

bug-authoremail.php
Package tests

void function test_authoremail() [line 8]

test function

Author Joshua Eichorn < [email protected]> Link http://www.phpdoc.org

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 522 of 1382

bug-defineparse.php
Package tests

SMART_PATH_DELIMITER = (substr(PHP_OS,0,3)=='WIN')?'\\':'/' [line 6]

does not parse correctly because of function in definition

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 523 of 1382

bug-eofquotes.php
Package tests

void function test_eofquotes() [line 7]

tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 524 of 1382

bug-escaping.php
Package tests

void function test_escape() [line 5]

tests
void function test_escape2() [line 11]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 525 of 1382

bug-loseprocedural.php
Package tests

void function test() [line 4]

test2 was lost, isn't any more


void function test2() [line 15]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 526 of 1382

bug-pageleveldocsblocks.php
Im a page level docblock

Package tests

void function dummy() [line 12]

Im a dummy function currently you need at least one function in your procedural page for this to work

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 527 of 1382

bug-quote_new_parser.php
Package tests

$bqnp_tester string = &quot;testing this testing this $parser;$me thingo\&quot;&quot; [line 15]

The tokenizer splits up strings that have inline variables and will fool the GLOBAL_VALUE handler here

bqnp_tester = "testing this testing this $parser($me thingo\"" [line 9]

The tokenizer splits up strings that have inline variables and will fool the DEFINE_PARAMS_PARENTHESIS handler here

void function bqnp_testie() [line 22]

The tokenizer splits up strings that have inline variables and will fool the STATICVAR handler here

Static Variable Used string $test:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 528 of 1382

bug-shortdesc.php
Package tests

testContantBlah = "hi" [line 11]

Short Desc Test. This is the Extended Comment and so is this

testContantBlah2 = "hi" [line 18]

Short Desc 2.0 Test. This is the Extended Comment and so is this

testContantBlah3 = "hi" [line 24]

Short Desc 2.0 Test. This is the Extended Comment and so is this

testContantBlah4 = "hi" [line 30]

Short Desc 2.0 Test This is still the short desc Comment and this is the extended

testContantBlah5 = "hi" [line 38]

Short Desc 2.0 Test This is still the short desc Comment and so is this Now were to the extended

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 529 of 1382

Package tests Classes

Class a
[line 8]

tests linking to methods and vars

Package tests

a::$a mixed = [line 9] a::$c mixed = [line 11] void function a::b() [line 10]

Class b553607_Parser
[line 9]
Package tests See b553607_Parser

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 530 of 1382

Class baby
[line 8]
Package tests

baby::$oopsieindexing mixed = [line 10]

Class brokenlinkstovars
[line 8]
Package tests

brokenlinkstovars::$broken mixed = [line 10] Constructor void function brokenlinkstovars::brokenlinkstovars() [line 14]

See brokenlinkstovars::$broken

Class bug540341
[line 4]
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 531 of 1382

Package tests

void function bug540341::get_header2($atate) [line 6] Function Parameters:

$atate

Class bug557861
[line 9]

this page will not be shown in the package list and should be

Package tests

Class bug_489398
[line 4]
Package tests

bug_489398::$test_01 mixed = '$Id: bug-489398.php 198623 2005-10-17 18:37:50Z jeichorn $' [line 9]

Checking the single quote var case

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 532 of 1382

bug_489398::$test_02 mixed = "Double quoted value" [line 14]

checking the double quote var case


bug_489398::$test_03 mixed = false [line 19]

Checking the no quote cause


bug_489398::$test_04 mixed = array() [line 24]

Checking the empty array case


bug_489398::$test_05 mixed = array("test1","test2" => "value") [line 29]

Checking the array with data case

Class childofpriv
[line 58]

what happens here? testing bug 564135

Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 533 of 1382

Class ClubBase
[line 103]
Package tests

ClubBase::$_bPrintFlush mixed = false [line 146] Constructor void function ClubBase::ClubBase() [line 158]

ClubBase() Der Konstruktor Macht nicht viel mehr, als fuer alle abgeleiteten Klassen abzusetzten und PEAR-Funktionen einzubinden

eine Debug-Meldung

Access public

array function ClubBase::getAllProperties([$simplify = false], [$exclude = array()]) [line 216] Function Parameters:

array $exclude diese Eigenschaften werden ignoriert $simplify

getAllProperties() Gibt die Wert aller Eigenschaften einer Klasse zurueck Es werden nur 'oeffentliche' Eigenschaften (ohne '_' davor) zurueckgegeben/bearbeitet Wird ein optionales 'Target' angegeben wird versucht den Werte eines Hashes auszulesen (z.B. $class->$target[$property]) bzw. zu schreiben

See ClubBase::getProperty(), ClubBase::getAllProperties(), ClubBase::setProperty(), ClubBase::getPropType() Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 534 of 1382

mixed function ClubBase::getProperty($property, [$target = ''], [$index = 0], [$simplify = false]) [line 176] Function Parameters:

string $property Name der Eigenschaft/Schluessel string $target Name des Targets $index $simplify

getProperty() Gibt den Wert einer Eigenschaft zurueck Es werden nur 'oeffentliche' Eigenschaften (ohne '_' davor) zurueckgegeben/bearbeitet Wird ein optionales 'Target' angegeben wird versucht den Werte eines Hashes auszulesen (z.B. $class->$target[$property]) bzw. zu schreiben

See ClubBase::getProperty(), ClubBase::getAllProperties(), ClubBase::setProperty(), ClubBase::getPropType() Access public

string function ClubBase::getPropType($property, [$target = null], [$index = 0]) [line 271] Function Parameters:

$property $target $index

getPropType gibt den Datentyp eines Objekt-Eigenschaft zurueck.

Access public

void function ClubBase::loadClass($classname, [$path = './'], [$ext = '.class.inc'], [$require = false]) [line 333] Function Parameters:

$classname $path

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 535 of 1382

$ext $require

void function ClubBase::printFlush() [line 319] void function ClubBase::printVar($var, [$info = '']) [line 326] Function Parameters:

$var $info

void function ClubBase::setDebug($level, [$hide = true], [$file = ''], [$print = true], [$flush = false]) [line 298] Function Parameters:

integer $level Level, bis zu dem Debugausgaben angezeigt werden boolean $hide Sollen Debugausgaben im HTML in Kommentare gepackt werden? string $file Soll in eine Datei geschrieben werden (null = nein) boolean $print Sollen Kommentare in HTML geschrieben werden, wenn schon in Datei geloggt wird? $flush

auch

set_debug() Debug-Level fuer die Klasse setzen Wird diese Methode statisch (ClubBase::set_debug()) aufgerufen, dann wird die globale Variable $_ClubDebugOptions gesetzt. Diese gilt fuer ALLE KLASSEN, die keine eigenen Werte mit $obj->set_debug() gestzt haben.

Global Variable Used array $_ClubDebugOptions: Globale Debugging-Einstellungen See $_ClubDebugOptions, ClubBase::set_debug(), ClubBase::_PHPDOCUMENTOR_DEBUG() See $_bDebugLevel, $_bHideDebug, $_sLogFile, $_bPrintDebug Static Access public

mixed function ClubBase::setProperty($property, $value, [$target = ''], [$index = 0], [$force = false]) [line 240] Function Parameters:

mixed $value Wert der der Eigenschaft zugewiesen werden soll $property $target

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 536 of 1382

$index $force

setProperty() Setzt den Wert einer Eigenschaft

Access public

void function ClubBase::_ERROR([$message = 'unknown error'], [$code = PHPDOCUMENTOR_DEBUG_ERROR], [$mode = null], [$options = null], [$userinfo = null], [$error_class = null]) [line 423] Function Parameters:

$message $code $mode $options $userinfo $error_class

_ERROR() Fehler registrieren und ggf. zur Debug-Ausgabe weiterleiten Dies muss erst noch implementiert werden ;-))

Static Final Access public

void function ClubBase::_PHPDOCUMENTOR_DEBUG($message, [$level = PHPDOCUMENTOR_DEBUG_INFO]) [line 375] Function Parameters:

string $message Meldungstext integer $level das Debuglevel der Meldung

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 537 of 1382

_PHPDOCUMENTOR_DEBUG() Debugmeldungen ausgeben Mit dieser Funktion koennen alle Klassen einheitlich Debug-Meldungnen ausgeben.

Global Variable Used array $_ClubDebugOptions: Globale Debugging-Einstellungen See $_ClubDebugOptions, ClubBase::set_debug(), ClubBase::_PHPDOCUMENTOR_DEBUG() See $_bDebugLevel, $_bHideDebug, $_sLogFile, $_bPrintDebug Static Access public

Class ctest
[line 23]
Package tests

ctest::$t1 mixed = [line 25] ctest::$t3 mixed = [line 28] Constructor void function ctest::ctest() [line 29] void function ctest::btest() [line 38]

Class few
[line 8]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 538 of 1382

Package tests

few::$pfh mixed = [line 13]

****===really fancy===**** my * is ignored

Class functionincomment
[line 8]
Package tests

void function functionincomment::process($trxtype, [$tender = 'C']) [line 14] Function Parameters:

$trxtype $tender

Class iConverter
[line 34]

Base class for all output converters. A Converter takes output from the Parser and converts it to template-friendly output. A converter for the standard phpDocumentor template, HTMLConverter, is provided with this release. Future releases will have support for other formats and templates, including DocBook, XML, and possibly other HTML templates. The converter takes output directly from NewRender and using walk() it "walks" over an array of phpDocumentor elements, as represented by descendants of parserElement

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 539 of 1382

a converter must define the abstract function Convert (an example is HTMLConverter::Convert()), a function that takes a passed object and uses it to generate structures for an output template, or directly generates output. Since all elements have their DocBlocks linked directly, this allows for more logical parsing than earlier versions of phpDocumentor. A Converter is passed several data structures in its constructor, all of which are optional in output and may be handled in any way the converter would like. These structures are arrays: array of methods by class (see NewRender::$methods) array of variables by class (see NewRender::$vars) array of links to documented elements (see NewRender::$links) array of class parents by name (see NewRender::$classtree) array of class packages by classname (see NewRender::$classpackages) array of packages to document (see NewRender::$packageoutput) array of extended classes by parent classname (see NewRender::$class_children) array of all documented elements by name (see NewRender::$elements) array of all documented elements by name, split by package (see NewRender::$pkg_elements) boolean option, set to true to parse all elements marked @access private (see NewRender::$parsePrivate) boolean option, set to true to stop informative output while parsing (good for cron jobs) (see NewRender::$quietMode)

Package tests See parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar Abstract Element

void function iConverter::walk() [line 37]

Class iHTMLConverter
[line 49]

Base class for all output converters. A Converter takes output from the Parser and converts it to template-friendly output. A converter for the standard phpDocumentor template, HTMLConverter, is provided with this release. Future releases will have support for other formats and templates, including

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 540 of 1382

DocBook, XML, and possibly other HTML templates. The converter takes output directly from NewRender and using walk() it "walks" over an array of phpDocumentor elements, as represented by descendants of parserElement a converter must define the abstract function Convert (an example is HTMLConverter::Convert()), a function that takes a passed object and uses it to generate structures for an output template, or directly generates output. Since all elements have their DocBlocks linked directly, this allows for more logical parsing than earlier versions of phpDocumentor. A Converter is passed several data structures in its constructor, all of which are optional in output and may be handled in any way the converter would like. These structures are arrays: array of methods by class (see NewRender::$methods) array of variables by class (see NewRender::$vars) array of links to documented elements (see NewRender::$links) array of class parents by name (see NewRender::$classtree) array of class packages by classname (see NewRender::$classpackages) array of packages to document (see NewRender::$packageoutput) array of extended classes by parent classname (see NewRender::$class_children) array of all documented elements by name (see NewRender::$elements) array of all documented elements by name, split by package (see NewRender::$pkg_elements) boolean option, set to true to parse all elements marked @access private (see NewRender::$parsePrivate) boolean option, set to true to stop informative output while parsing (good for cron jobs) (see NewRender::$quietMode)

Package tests

void function iHTMLConverter::Convert() [line 51]

Class iiparserBase
[line 8]
Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 541 of 1382

iiparserBase::$type string = 'base' [line 14]

always base
iiparserBase::$value mixed = false [line 20]

set to different things by its descendants

Abstract Element

string function iiparserBase::getType() [line 25] mixed function iiparserBase::getValue() [line 41] void function iiparserBase::setValue($value) [line 33] Function Parameters:

mixed $value set the value of this element

Class iNewRender
[line 66]
Package tests

iNewRender::$classpackage string = 'default' [line 233]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 542 of 1382

set to the name of the package of the current class being parsed
iNewRender::$classpackages array = array() [line 153]

used in Converter::getClassPackage() to inherit package from parent classes. format: array(classname => array(array(package,subpackage), array(package1,subpackage1),.... If a name conflict exists between two packages, automatic inheritance will not work, and the packages will need to be documented separately.

iNewRender::$classsubpackage string = '' [line 239]

set to the name of the subpackage of the current class being parsed
iNewRender::$classtree array = array() [line 140]

a tree of class inheritance by name. format: array(childname => parentname, rootname => 0, ... )

childname1 => parentname1,

See Converter::generateClassTreeFromClass()

iNewRender::$class_children array = array() [line 183]

An array of extended classes by package and parent class array(packagename => array(parentclass => array(childclassname1, childclassname2,... ) ) )

Format:

iNewRender::$data

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 543 of 1382

parserData = [line 227]

data contains parsed structures for the current page being parsed

See parserData

iNewRender::$elements mixed = array() [line 185] iNewRender::$event_handlers mixed = array( 'docblock' => 'handleDocBlock', 'page' => 'handlePage', 'class' => 'handleClass', 'define' => 'handleDefine', 'function' => 'handleFunction', 'method' => 'handleMethod', 'var' => 'handleVar', 'packagepage' => 'handlePackagePage', 'include' => 'handleInclude', ) [line 210]

the functions which handle output from the Parser

See handleEvent(), handleDocBlock(), handlePage(), handleClass(), handleDefine(), handleFunction(), handleMethod(), handleVar(), handlePackagePage(), handleInclude()

iNewRender::$links array = array() [line 128]

the workhorse of linking. This array is an array of link objects of format: [package][subpackage][eltype][elname] = descendant of abstractLink eltype can be page|include|function|define|class|method|var if eltype is method or var, the array format is: [package][subpackage][eltype][class][elname]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 544 of 1382

See functionLink, pageLink, classLink, defineLink, methodLink, varLink

iNewRender::$methods array = array() [line 83]

array of methods by package, subpackage and class format: array(packagename => array(subpackagename => array(classname => array(methodname1 => parserMethod class, methodname2 => parserMethod class,...) ) ) ) )

See Converter

iNewRender::$packageoutput mixed = false [line 203]

array of packages to parser and output documentation for, if not all packages should be documented Format: array(package1,package2,...) or false if not set Use this option to limit output similar to ignoring files. If you have some temporary files that you don't want to specify by name but don't want included in output, set a package name for all the elements in your project, and set packageoutput to that name. the default package will be ignored. Parsing speed does not improve. If you want to ignore files for speed reasons, use the ignore command-line option

See Io

iNewRender::$pages mixed = array() [line 189] iNewRender::$parsePrivate

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 545 of 1382

bool = false [line 107]

set in phpdoc.inc the value of the parserprivate commandline option. to If this option is true, elements with an @access private tag will be parsed and displayed

iNewRender::$pkg_elements mixed = array() [line 187] iNewRender::$private_class mixed = false [line 116]

this variable is used to prevent parsing of private elements if $parsePrivate is false. it is also used by the packageoutput setting to prevent parsing of elements that aren't in the desired output packages

See iNewRender::$parsePrivate See iNewRender::$packageoutput

iNewRender::$quietMode bool = false [line 246]

set in phpdoc.inc the value of the quitemode commandline option. to If this option is true, informative output while parsing will not be displayed (documentation is unaffected)

iNewRender::$targetDir mixed = [line 159]

used to set the output directory

See setTargetDir()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 546 of 1382

iNewRender::$vars array = array() [line 100]

array of class variables by package, subpackage and class format: array(packagename => array(subpackagename => array(classname => array(variablename1 => parserMethod class, variablename2 => parserMethod class,...) ) ) ) )

See Converter

Class iParser
[line 45]
Package tests

Class iparserElement
[line 59]
Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 547 of 1382

Class kiddie_b587733
[line 25]
Package tests

Constructor void function kiddie_b587733::kiddie_b587733() [line 27]

Class mama
[line 8]
Package tests

Class metoo
[line 26]
Package tests

metoo::$mine mixed = 'but this' [line 28]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 548 of 1382

Class multipl
[line 18]
Package tests

multipl::$manyvars string = [line 24]

Var first var

string function multipl::func() [line 30]

Class parent_b587733
[line 6]

inherited functions with @access private should not be shown in inherited list of child

Package tests

Class priv1
[line 44]
Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 549 of 1382

Class RecordWarning
[line 19]
Package tests

Class summary_form
[line 4]
Package tests

summary_form::$dp mixed = [line 6] void function summary_form::blah() [line 16] void function summary_form::get_header2($atate) [line 11] Function Parameters:

$atate

See blah()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 550 of 1382

Class test
[line 9]

I'm a odd test case the @ sign is my friend @ at teh beggining of a line

Package tests

Class test2
[line 19]

tags demonstration, but this @version tag is ignored

Package tests Author this tag is parsed

Class testarraybug
[line 10]

tests variable names with the word 'array' in them

Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 551 of 1382

testarraybug::$arrayType mixed = 'name should be arrayType' [line 12] testarraybug::$arrayType1 mixed = [line 17]

test with no default, should be arrayType1


testarraybug::$myarrayName mixed = 'name should be myarrayName' [line 13] testarraybug::$myarrayName1 mixed = [line 21]

test with no default, should be myarrayName1

Class testClass
[line 8]
Package tests

Constructor void function testClass::testClass() [line 10]

Class testme
[line 13]
Package tests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 552 of 1382

testme::$me mixed = array('item1' => 2, # 'NOTME' => hahaha, // 'MENEITHER' => oops, 'item2' => 3) [line 17]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 553 of 1382

bug-541886.php
Test for bug #541886 Multiple @package or @subpackage tags causing a warning

Package tests Sub-Package blah

Class test_541886
[line 20]

Test for bug #541886 Multiple @package or @subpackage tags causing a warning

Package tests Sub-Package blah

Class notseen
[line 10]
Package tests Sub-Package notparsed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 554 of 1382

HighlightParserGetInlineTagsTests.php
Unit Tests for the HighlightParser->getInlineTags() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 51]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.4.0a2

require_once "PHPUnit/Framework/TestSuite.php" [line 32]

TestSuite required by PHPUnit

Since 1.4.0a2

require_once "PHPUnit/Framework/TestCase.php" [line 25]

TestCase required by PHPUnit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 555 of 1382

Since 1.4.0a2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 556 of 1382

IntermediateParserAddPrivatePageTests.php
Unit Tests for the IntermediateParser->addPrivatePage() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 51]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.4.0a2

require_once "PHPUnit/Framework/TestSuite.php" [line 32]

TestSuite required by PHPUnit

Since 1.4.0a2

require_once "PHPUnit/Framework/TestCase.php" [line 25]

TestCase required by PHPUnit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 557 of 1382

Since 1.4.0a2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 558 of 1382

ParserClassGetSourceLocationTests.php
Unit Tests for the ParserClass->getSourceLocation() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess TODO research possibility of refactoring ParserClass->getSourceLocation() and ParserPage->getSourceLocation() into a common method... also, there might be more occurrences of similar getSourceLocation() methods in other classes. Since 1.4.0a1

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 58]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.4.0a1

require_once "PHPUnit/Framework/TestSuite.php" [line 39]

TestSuite required by PHPUnit

Since 1.4.0a1

require_once "PHPUnit/Framework/TestCase.php" [line 32]

TestCase

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 559 of 1382

required by PHPUnit

Since 1.4.0a1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 560 of 1382

ParserPageGetSourceLocationTests.php
Unit Tests for the ParserPage->getSourceLocation() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess TODO research possibility of refactoring ParserClass->getSourceLocation() and ParserPage->getSourceLocation() into a common method... also, there might be more occurrences of similar getSourceLocation() methods in other classes. Since 1.4.0a1

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 58]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.4.0a1

require_once "PHPUnit/Framework/TestSuite.php" [line 39]

TestSuite required by PHPUnit

Since 1.4.0a1

require_once "PHPUnit/Framework/TestCase.php" [line 32]

TestCase

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 561 of 1382

required by PHPUnit

Since 1.4.0a1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 562 of 1382

phpDocumentorSetupCleanConverterNamePieceTests.php
Unit Tests for the phpDocumentor_setup->cleanConverterNamePiece() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.3.2

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 51]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.3.2

require_once "PHPUnit/Framework/TestSuite.php" [line 32]

TestSuite required by PHPUnit

Since 1.3.2

require_once "PHPUnit/Framework/TestCase.php" [line 25]

TestCase required by PHPUnit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 563 of 1382

Since 1.3.2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 564 of 1382

phpDocumentorSetupDecideOnOrOffTests.php
Unit Tests for the phpDocumentor_setup->decideOnOrOff() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.3.2

PHPDOCUMENTOR_BASE = dirname(dirname(__FILE__)) [line 42]

Base directory of code Needed by some of the objects being tested in the suites.

Since 1.4.1

PHPUnit_MAIN_METHOD = "phpDocumentorSetupDecideOnOrOffTests::main" [line 17]

PHPUnit main() hack "Call class::main() if this source file is executed directly."

Since 1.3.2

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 51]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 565 of 1382

Since 1.3.2

require_once "PHPUnit/Framework/TestSuite.php" [line 32]

TestSuite required by PHPUnit

Since 1.3.2

require_once "PHPUnit/Framework/TestCase.php" [line 25]

TestCase required by PHPUnit

Since 1.3.2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 566 of 1382

phpDocumentorTParserGetInlineTagsTests.php
Unit Tests for the phpDocumentorTParser->getInlineTags() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

require_once 'PhpDocumentor/phpDocumentor/Setup.inc.php' [line 51]

PhpDocumentor Setup required by PhpDocumentor to instantiate the environment

Since 1.4.0a2

require_once "PHPUnit/Framework/TestSuite.php" [line 32]

TestSuite required by PHPUnit

Since 1.4.0a2

require_once "PHPUnit/Framework/TestCase.php" [line 25]

TestCase required by PHPUnit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 567 of 1382

Since 1.4.0a2

Class tests_HighlightParserGetInlineTagsTests
[line 60]

Unit Testing of the HighlightParser's getInlineTags() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

void function tests_HighlightParserGetInlineTagsTests::main() [line 81]

Runs the test methods of this class.

Since 1.4.0a2 Static Access public

void function tests_HighlightParserGetInlineTagsTests::setUp() [line 94]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.4.0a2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 568 of 1382

Access protected

void function tests_HighlightParserGetInlineTagsTests::tearDown() [line 108]

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.4.0a2 Access protected

void function tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyArg() [line 131]

Shows correct behavior when called with no actual value and no $endinternal flag arg

Since 1.4.0a2 Access public

void function tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyArgAndFalse() [line 139]

Shows correct behavior when called with no actual value and a FALSE $endinternal flag arg

Since 1.4.0a2 Access public

void function tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyArgAndTrue() [line 147]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 569 of 1382

Shows correct behavior when called with no actual value and a TRUE $endinternal flag arg

Since 1.4.0a2 Access public

Class tests_IntermediateParserAddPrivatePageTests
[line 60]

Unit Testing of the IntermediateParser's addPrivatePage() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

void function tests_IntermediateParserAddPrivatePageTests::main() [line 99]

Runs the test methods of this class.

Since 1.4.0a2 Static Access public

void function tests_IntermediateParserAddPrivatePageTests::setUp() [line 112]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 570 of 1382

Since 1.4.0a2 Access protected

void function tests_IntermediateParserAddPrivatePageTests::tearDown() [line 131]

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.4.0a2 Access protected

void function tests_IntermediateParserAddPrivatePageTests::testShowCorrectBehaviorWhenPrivatePageArrayIsEmpty() [line 200]

Shows correct behavior for adding a private page object, when the privatepages array is completely empty

Since 1.4.0a2 Access public

void function tests_IntermediateParserAddPrivatePageTests::testShowCorrectBehaviorWhenPrivatePageArrayIsNotAlready Empty() [line 157]

Shows correct behavior for adding a private page object, when the privatepages array already has an element

Since 1.4.0a2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 571 of 1382

Class tests_ParserClassGetSourceLocationTests
[line 67]

Unit Testing of the ParserClass's getSourceLocation() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a1

void function tests_ParserClassGetSourceLocationTests::main() [line 88]

Runs the test methods of this class.

Since 1.4.0a1 Static Access public

void function tests_ParserClassGetSourceLocationTests::setUp() [line 101]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.4.0a1 Access protected

void function tests_ParserClassGetSourceLocationTests::tearDown() [line 116]

Tears down the fixture, for example, close a network connection.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 572 of 1382

This method is called after a test is executed.

Since 1.4.0a1 Access protected

void function tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeFalse() [line 149]

Shows correct behavior when sourceLocation is not set yet with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeNull() [line 140]

Shows correct behavior when sourceLocation is not set yet with no pearize value set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeTrue() [line 158]

Shows correct behavior when sourceLocation is not set yet with pearize explicitly true

Since 1.4.0a1 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 573 of 1382

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeFalse() [line 178]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeNull() [line 168]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with no pearize value set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeTrue() [line 188]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with pearize explicitly true

Since 1.4.0a1 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 574 of 1382

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeFalse() [line 238]

Include a ".." in an absolute, non-PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeNull() [line 229]

Include a ".." in an absolute, non-PEAR path, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeTrue() [line 247]

Include a ".." in an absolute, non-PEAR path, with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeFalse() [line 266]

Include a ".." in a relative, non-PEAR path,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 575 of 1382

with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeNull() [line 257]

Include a ".." in a relative, non-PEAR path, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeTrue() [line 275]

Include a ".." in a relative, non-PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeFalse() [line 209]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize explicitly false

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 576 of 1382

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeNull() [line 199]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeTrue() [line 219]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeFalse() [line 294]

Include a ".." in an absolute, PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 577 of 1382

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeNull() [line 285]

Include a ".." in an absolute, PEAR path, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeTrue() [line 303]

Include a ".." in an absolute, PEAR path, with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeFalse() [line 322]

Include a ".." in a relative, PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeNull() [line 313]

Include a ".." in a relative, PEAR path,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 578 of 1382

with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeTrue() [line 331]

Include a ".." in a relative, PEAR path, with pearize explicitly true

Since 1.4.0a1 Access public

Class tests_ParserPageGetSourceLocationTests
[line 67]

Unit Testing of the ParserPage's getSourceLocation() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a1

void function tests_ParserPageGetSourceLocationTests::main() [line 88]

Runs the test methods of this class.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 579 of 1382

Since 1.4.0a1 Static Access public

void function tests_ParserPageGetSourceLocationTests::setUp() [line 101]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.4.0a1 Access protected

void function tests_ParserPageGetSourceLocationTests::tearDown() [line 116]

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.4.0a1 Access protected

void function tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeFalse() [line 148]

Shows correct behavior when sourceLocation is not set yet with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeNull() [line 139]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 580 of 1382

Shows correct behavior when sourceLocation is not set yet with no pearize value set

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeTrue() [line 157]

Shows correct behavior when sourceLocation is not set yet with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeFalse() [line 177]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeNull() [line 167]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with no pearize value set

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 581 of 1382

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeTrue() [line 190]

Shows correct behavior when sourceLocation is set to an absolute path that is not a "pear" location, with pearize explicitly true

TODO Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation(). Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeFalse() [line 240]

Include a ".." in an absolute, non-PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeNull() [line 231]

Include a ".." in an absolute, non-PEAR path, with pearize not set

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 582 of 1382

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAndPearizeTrue() [line 252]

Include a ".." in an absolute, non-PEAR path, with pearize explicitly true

TODO Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation(). Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeFalse() [line 271]

Include a ".." in a relative, non-PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeNull() [line 262]

Include a ".." in a relative, non-PEAR path, with pearize not set

Since 1.4.0a1 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 583 of 1382

void function tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPearizeTrue() [line 283]

Include a ".." in a relative, non-PEAR path, with pearize explicitly false

TODO Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation(). Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeFalse() [line 211]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeNull() [line 201]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize not set

Since 1.4.0a1 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 584 of 1382

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeTrue() [line 221]

Show correct behavior when sourceLocation is set to an absolute path that IS a "pear" location, with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeFalse() [line 302]

Include a ".." in an absolute, PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeNull() [line 293]

Include a ".." in an absolute, PEAR path, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPearizeTrue() [line 311]

Include a ".." in an absolute, PEAR path,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 585 of 1382

with pearize explicitly true

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeFalse() [line 330]

Include a ".." in a relative, PEAR path, with pearize explicitly false

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeNull() [line 321]

Include a ".." in a relative, PEAR path, with pearize not set

Since 1.4.0a1 Access public

void function tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeTrue() [line 339]

Include a ".." in a relative, PEAR path, with pearize explicitly true

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 586 of 1382

Since 1.4.0a1 Access public

Class tests_phpDocumentorSetupCleanConverterNamePiece Tests


[line 61]

Unit Testing of the phpDocumentor_setup's cleanConverterNamePiece() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.3.2

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::main() [line 97]

Runs the test methods of this class.

Since 1.3.2 Static Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::setUp() [line 110]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.3.2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 587 of 1382

Access protected

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::tearDown() [line 123]

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.3.2 Access protected

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingOnPrimaryWithOneA rg() [line 412]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses one arg with value of "/var/log/HTML"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingOnPrimaryWithTwoA rgs() [line 421]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "/var/log/HTML"

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 588 of 1382

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingOnSecondary() [line 430]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "/var/log/frames"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingOnTertiary() [line 439]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "/var/log/default"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvalidSecondary() [line 478]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses two args with value of "..//.frames"

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 589 of 1382

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvalidTertiaryA() [line 487]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses two arg with value of "/./default/.##/"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvalidTertiaryB() [line 496]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses two arg with value of "//default//"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValidPrimaryWithOneAr g() [line 451]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses one arg with value of "H/.T./M##L"

Since 1.3.2 Access public

void function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 590 of 1382

tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValidPrimaryWithTwoAr gs() [line 460]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses two args with value of "H/.T./M##L"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValidSecondary() [line 469]

Extreme example of messy input... the resulting converter names are generally invalid. This test uses two args with value of "....frames"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryDefault() [line 230]

Shows correct behavior for handling the perfect expected "default" secondary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryDocbookPeardoc2() [line 238]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 591 of 1382

Shows correct behavior for handling "DocBook/peardoc2" secondary value when called with two args

the

perfect

expected

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryFrames() [line 214]

Shows correct behavior for handling the perfect expected "frames" secondary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondarySmarty() [line 222]

Shows correct behavior for handling the perfect expected "Smarty" secondary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDefault() [line 247]

Shows correct behavior for handling the perfect expected "default" tertiary value when called with two args

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 592 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomDefault() [line 312]

Shows correct behavior "DOM/default" tertiary value when called with two args

for

handling

the

perfect

expected

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomEarthli() [line 320]

Shows correct behavior for handling the perfect expected "DOM/earthli" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomL0l33t() [line 328]

Shows correct behavior for handling the perfect expected "DOM/l0l33t" tertiary value when called with two args

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 593 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomPhpdocde() [line 336]

Shows correct behavior for "DOM/phpdoc.de" tertiary value when called with two args

handling

the

perfect

expected

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomPhphtmllib() [line 344]

Shows correct behavior for "DOM/phphtmllib" tertiary value when called with two args

handling

the

perfect

expected

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryEarthli() [line 255]

Shows correct behavior for handling the perfect expected "earthli" tertiary value when called with two args

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 594 of 1382

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryHands() [line 287]

Shows correct behavior for handling the perfect expected "HandS" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryL0l33t() [line 263]

Shows correct behavior for handling the perfect expected "l0l33t" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPear() [line 295]

Shows correct behavior for handling the perfect expected "PEAR" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhp() [line 303]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 595 of 1382

Shows correct behavior for handling the perfect expected "PHP" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhpdocde() [line 271]

Shows correct behavior for handling the perfect expected "phpdoc.de" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhphtmllib() [line 279]

Shows correct behavior for handling the perfect expected "phphtmllib" tertiary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimaryCHM() [line 148]

Shows correct behavior for handling the perfect expected "CHM" primary value when called with one arg

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 596 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimaryHTML() [line 156]

Shows correct behavior for handling the perfect expected "HTML" primary value when called with one arg

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimaryPDF() [line 164]

Shows correct behavior for handling the perfect expected "PDF" primary value when called with one arg

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimaryXML() [line 172]

Shows correct behavior for handling the perfect expected "XML" primary value when called with one arg

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 597 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrimaryCHM() [line 181]

Shows correct behavior for handling the perfect expected "CHM" primary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrimaryHTML() [line 189]

Shows correct behavior for handling the perfect expected "HTML" primary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrimaryPDF() [line 197]

Shows correct behavior for handling the perfect expected "PDF" primary value when called with two args

Since 1.3.2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 598 of 1382

Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrimaryXML() [line 205]

Shows correct behavior for handling the perfect expected "XML" primary value when called with two args

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathingOnPrimaryWithO neArg() [line 375]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses one arg with value of "../../HTML"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathingOnPrimaryWithT woArgs() [line 384]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "../../HTML"

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 599 of 1382

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathingOnSecondary() [line 393]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "../../frames"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathingOnTertiary() [line 402]

Verify no up-to-parent pathing is allowed... the resulting converter names are generally invalid. This test uses two args with value of "../../default"

Since 1.3.2 Access public

void function tests_phpDocumentorSetupCleanConverterNamePieceTests::testUserDefinedTertiaryValue() [line 353]

Shows correct behavior for handling the perfect expected "b2evo.v-110" tertiary value (an example of a user-defined template not packaged with PhpDocumentor) when called with two args

Since 1.4.0 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 600 of 1382

Class tests_phpDocumentorSetupDecideOnOrOffTests
[line 60]

Unit Testing of the phpDocumentor_setup's decideOnOrOff() method

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.3.2

void function tests_phpDocumentorSetupDecideOnOrOffTests::main() [line 75]

Runs the test methods of this class.

Since 1.3.2 Static Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::setUp() [line 88]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.3.2 Access protected

void function tests_phpDocumentorSetupDecideOnOrOffTests::tearDown() [line 99]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 601 of 1382

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.3.2 Access protected

void function tests_phpDocumentorSetupDecideOnOrOffTests::testBasicOff() [line 120]

Shows correct behavior for handling the perfect expected "off" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testBasicOn() [line 127]

Shows correct behavior for handling the perfect expected "on" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyEmpty() [line 199]

Shows correct behavior for handling the fuzzy "" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseA() [line 170]

Shows correct behavior for handling the fuzzy "false" value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 602 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseB() [line 177]

Shows correct behavior for handling the fuzzy "False" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseC() [line 184]

Shows correct behavior for handling the fuzzy "FALSE" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoA() [line 149]

Shows correct behavior for handling the fuzzy "no" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoB() [line 156]

Shows correct behavior for handling the fuzzy "No" value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 603 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoC() [line 163]

Shows correct behavior for handling the fuzzy "NO" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOffA() [line 135]

Shows correct behavior for handling the fuzzy "Off" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOffB() [line 142]

Shows correct behavior for handling the fuzzy "OFF" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOnA() [line 206]

Shows correct behavior for handling the fuzzy "On" value

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 604 of 1382

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOnB() [line 213]

Shows correct behavior for handling the fuzzy "ON" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOne() [line 276]

Shows correct behavior for handling the fuzzy "1" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueA() [line 255]

Shows correct behavior for handling the fuzzy "true" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueB() [line 262]

Shows correct behavior for handling the fuzzy "True" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueC() [line 269]

Shows correct behavior for handling the fuzzy "TRUE" value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 605 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesA() [line 220]

Shows correct behavior for handling the fuzzy "y" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesB() [line 227]

Shows correct behavior for handling the fuzzy "Y" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesC() [line 234]

Shows correct behavior for handling the fuzzy "yes" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesD() [line 241]

Shows correct behavior for handling the fuzzy "Yes" value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 606 of 1382

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesE() [line 248]

Shows correct behavior for handling the fuzzy "YES" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyZero() [line 191]

Shows correct behavior for handling the fuzzy "0" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedGreatLiterature() [line 324]

Shows correct behavior for handling an odd "ash nazg durbatuluk" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedLargeNumber() [line 317]

Shows correct behavior for handling an odd "10" value

Since 1.3.2 Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 607 of 1382

void function tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedNegative() [line 310]

Shows correct behavior for handling an odd "-1" value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedNull() [line 303]

Shows correct behavior for handling an odd NULL value

Since 1.3.2 Access public

void function tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedSpaces() [line 296]

Shows correct behavior for handling an odd " " value

Since 1.3.2 Access public

Class tests_phpDocumentorTParserGetInlineTagsTests
[line 60]

Unit Testing of the phpDocumentorTParser's getInlineTags() method

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 608 of 1382

Package tests Sub-Package PhpDocumentorUnitTests Author Chuck Burgess Since 1.4.0a2

void function tests_phpDocumentorTParserGetInlineTagsTests::main() [line 87]

Runs the test methods of this class.

Since 1.4.0a2 Static Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::setUp() [line 100]

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Since 1.4.0a2 Access protected

void function tests_phpDocumentorTParserGetInlineTagsTests::tearDown() [line 115]

Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Since 1.4.0a2 Access protected

void function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 609 of 1382

tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineExampleWhenParsePrivate Off() [line 209]

Shows correct behavior for handling an inline example tag e.g. {at-example path-tofile} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineExampleWhenParsePrivate On() [line 183]

Shows correct behavior for handling an inline example tag e.g. {at-example path-tofile} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineInternalWhenParsePrivateOf f() [line 347]

Shows correct behavior for handling an inline internal tag e.g. {at-internal blahblah-blah} There SHOULD be differences in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineInternalWhenParsePrivateO

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 610 of 1382

n() [line 331]

Shows correct behavior for handling an inline internal tag e.g. {at-internal blahblah-blah} There SHOULD be differences in results due to --parseprivate flag This test demonstrates PEAR Bug #10871

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineLinkWhenParsePrivateOff() [line 162]

Shows correct behavior for handling an inline link tag e.g. {at-link URL link-text} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineLinkWhenParsePrivateOn() [line 142]

Shows correct behavior for handling an inline link tag e.g. {at-link URL link-text} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineSourceWhenParsePrivateOff () [line 260]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 611 of 1382

Shows correct behavior for handling an inline source tag e.g. {at-source} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineSourceWhenParsePrivateOn () [line 236]

Shows correct behavior for handling an inline source tag e.g. {at-source} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineTutorialWhenParsePrivateOf f() [line 306]

Shows correct behavior for handling an inline tutorial tag e.g. {at-tutorial path-topkgfile} There should be NO difference in results due to --parseprivate flag

Since 1.4.0a2 Access public

void function tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineTutorialWhenParsePrivateO n() [line 285]

Shows correct behavior for handling an inline tutorial tag e.g. {at-tutorial path-topkgfile} There should be NO difference in results due to --parseprivate flag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 612 of 1382

Since 1.4.0a2 Access public

Class bug_556894_base
[line 11]

Base Class

Package tests Sub-Package test1

bug_556894_base::$test mixed = [line 16]

I'm a test var


void function bug_556894_base::test() [line 21]

I'm a test method

Class bug_556894_sub1
[line 32]

Subclass in same subpackage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 613 of 1382

Package tests Sub-Package test1

Class bug_556894_sub2
[line 42]

Subclass in different subpackage

Package tests Sub-Package test2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 614 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 615 of 1382

Package XML_Beautifier Procedural Elements

Plain.php
XML/Beautifier/Renderer/Plain.php

Package XML_Beautifier Author Stephan Schmidt < [email protected]>

require_once 'XML/Beautifier/Renderer.php' [line 34]

Renderer base class


require_once 'XML/Util.php' [line 29]

XML_Util is needed to create the tags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 616 of 1382

Package XML_Beautifier Classes

Class PHPDoc_XML_Beautifier_Renderer_Plain
[line 45]

Basic XML Renderer for XML Beautifier

Package XML_Beautifier Author Stephan Schmidt < [email protected]> TODO option to specify inline tags TODO automatically create <![CDATA[ ]]> sections TODO option to specify treatment of whitespac in data sections

string function PHPDoc_XML_Beautifier_Renderer_Plain::serialize($tokens) [line 54] Function Parameters:

array $tokens XML tokens

Serialize the XML tokens

Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 617 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 618 of 1382

Package phpDocumentor Procedural Elements

actions.php
phpDocumentor :: docBuilder Web Interface PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: actions.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2003-2006 Andrew Eddie, Greg Beaver License LGPL

include_once "$path/includes/utilities.php" [line 38]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 619 of 1382

include_once "@WEB-DIR@/PhpDocumentor/docbuilder/includes/utilities.php" [line 36]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 620 of 1382

builder.php
phpDocumentor :: docBuilder Web Interface Advanced Web Interface to phpDocumentor PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: builder.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2003-2006 Andrew Eddie, Greg Beaver See phpdoc.php License LGPL Filesource Source Code for this file

include "$root_dir/phpDocumentor/phpdoc.inc" [line 122]

phpdoc.inc
include_once "$root_dir/phpDocumentor/common.inc.php" [line 69]

common file information

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 621 of 1382

include_once "$root_dir/phpDocumentor/common.inc.php" [line 52]

common file information

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 622 of 1382

config.php
phpDocumentor :: docBuilder Web Interface Advanced Web Interface to phpDocumentor PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: config.php 234145 2007-04-19 20:20:57Z ashnazg $ Copyright 2003-2006 Andrew Eddie, Greg Beaver See phpdoc.php License LGPL Filesource Source Code for this file

include_once "$root_dir/docbuilder/includes/utilities.php" [line 79]

include_once "$root_dir/phpDocumentor/common.inc.php" [line 78]

common file information


include_once "@WEB-DIR@/PhpDocumentor/docbuilder/includes/utilities.php" [line 53]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 623 of 1382

include_once "PhpDocumentor/phpDocumentor/common.inc.php" [line 52]

common file information

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 624 of 1382

utilities.php
phpDocumentor :: docBuilder Web Interface PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: utilities.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2003-2006 Andrew Eddie, Greg Beaver License LGPL

void function getDir($path, &$node) [line 74] Function Parameters:

$path &$node

void function htmlArraySelect(&$arr, $select_name, $select_attribs, $selected, $arr) [line 63] Function Parameters:

array $arr array of the key-text pairs string $select_name The name of the select box

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 625 of 1382

string $select_attribs Additional attributes to insert into the html select tag string $selected The key value of the selected eleme &$arr

Returns a select box based on an key,value array where selected is based on key
include_once 'PhpDocumentor/HTML_TreeMenu-1.1.2/TreeMenu.php' [line 36]

include_once dirname(realpath(__FILE__))."/../../HTML_TreeMenu-1.1.2/TreeMenu.php" [line 38]

void function recurseDir($path, &$node) [line 96] Function Parameters:

$path &$node

void function showImage($src, [$wid = ''], [$hgt = ''], [$alt = '']) [line 48] Function Parameters:

string $src path to the source image int $wid width on the image [optional] int $hgt height on the image [optional] string $alt hover text for the image [optional]

Allows png's with alpha transparency to be displayed in IE 6


void function switchDirTree($path, &$node) [line 125] Function Parameters:

$path &$node

void function vdump_par($tree) [line 205] Function Parameters:

$tree

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 626 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 627 of 1382

top.php
phpDocumentor :: docBuilder Web Interface Advanced Web Interface to phpDocumentor PHP versions 4 and 5 Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Author Andrew Eddie Version CVS: $Id: top.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2003-2006 Andrew Eddie, Greg Beaver See phpdoc.php License LGPL Filesource Source Code for this file

include_once "$path/phpDocumentor/common.inc.php" [line 43]

include_once "PhpDocumentor/phpDocumentor/common.inc.php" [line 40]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 628 of 1382

new_phpdoc.php
Advanced Web Interface to phpDocumentor PHP versions 4 and 5

Package phpDocumentor Author Chuck Burgess < [email protected]> Author Joshua Eichorn < [email protected]> Author Juan Pablo Morales < [email protected]> Author Gregory Beaver < [email protected]> See phpdoc.php Link http://pear.php.net/package/PhpDocumentor Deprecated redirects automatically to docbuilder (see docbuilder/index.html) TODO CS cleanup - change package to PhpDocumentor License LGPL Filesource Source Code for this file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 629 of 1382

phpdoc.php
Original Web Interface to phpDocumentor PHP versions 4 and 5

Package phpDocumentor Author Chuck Burgess < [email protected]> Author Joshua Eichorn < [email protected]> Author Juan Pablo Morales < [email protected]> Author Gregory Beaver < [email protected]> Link http://pear.php.net/package/PhpDocumentor Deprecated redirects automatically to docbuilder (see docbuilder/index.html) TODO CS cleanup - change package to PhpDocumentor License LGPL Filesource Source Code for this file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 630 of 1382

Classes.inc
Intermediate class parsing structure. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2007 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Version CVS: $Id: Classes.inc 243933 2007-10-10 01:18:25Z ashnazg $ Copyright 2001-2007 Gregory Beaver See parserDocBlock, parserInclude, parserPage, parserClass See parserDefine, parserFunction, parserMethod, parserVar Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 License LGPL Filesource Source Code for this file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 631 of 1382

clone.inc.php
Object clone method phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Version CVS: $Id: clone.inc.php 243202 2007-09-30 02:08:08Z ashnazg $ Copyright 2001-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 Filesource Source Code for this file License LGPL

object the function phpDocumentor_clone($obj) [line 48] Function Parameters:

object $obj the object to be cloned

Clone an object in PHP 4

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 632 of 1382

TODO CS cleanup - rename function to PhpDocumentor_clone

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 633 of 1382

clone5.inc.php
Object clone method phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Version CVS: $Id: clone5.inc.php 243202 2007-09-30 02:08:08Z ashnazg $ Copyright 2001-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 634 of 1382

common.inc.php
Common information needed by all portions of the application phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Greg Beaver < [email protected]> Version CVS: $Id: common.inc.php 288074 2009-09-05 02:16:26Z ashnazg $ Copyright 2001-2008 Gregory Beaver See parserDocBlock, parserInclude, parserPage, parserClass See parserDefine, parserFunction, parserMethod, parserVar Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename constant to TOKENIZER_EXT Since 1.0rc1 License LGPL Filesource Source Code for this file

void function debug($s) [line 266] Function Parameters:

string $s the "debug message" string to echo out

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 635 of 1382

Debugging output

TODO CS Cleanup - can't avoid "prefixed by package" error

void function fancy_debug($s, $v) [line 279] Function Parameters:

string $s string to display mixed $v unlimited number of variables to display with var_dump()

Returns a formatted var_dump for debugging purposes.


PATH_DELIMITER = '/' [line 62] array function phpDocumentor_ConfigFileList($directory) [line 97] Function Parameters:

string $directory a directory string

used in phpdoc.php and new_phpdoc.php

TODO CS cleanup - rename function to PhpDocumentor_ConfigFileList

string function phpDocumentor_get_class($object) [line 304] Function Parameters:

object $object the object to get the classname for

Returns a lower-cased version of get_class for PHP 5 get_class() returns case as declared in the file in PHP 5

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 636 of 1382

TODO CS cleanup - rename function to PhpDocumentor_get_class

array function phpDocumentor_parse_ini_file($filename, [$process_sections = false]) [line 146] Function Parameters:

string $filename full path to the ini file bool $process_sections add an associative index brackets]

for each section [in

Parse an .ini file Works like http://www.php.net/parse_ini_file, except it will take a section like: [MYVAR] value1 value2 value3 and return an associative array(MYVAR => array(value1, value2, value3))

TODO CS cleanup - rename function to PhpDocumentor_parse_ini_file

PHPDOCUMENTOR_VER = "1.4.3" [line 49] PHPDOCUMENTOR_WEBSITE = "http://www.phpdoc.org" [line 53] PHPDOCUMENTOR_WINDOWS = substr(PHP_OS,0,3)=='WIN' [line 64] require_once $cloneClassDir.DIRECTORY_SEPARATOR.$cloneClassFile [line 81]

SMART_PATH_DELIMITER = DIRECTORY_SEPARATOR [line 56] tokenizer_ext = extension_loaded('tokenizer')&&version_compare(phpversion(),"4.3.0",">=") [line 58] _IN_PHP5 = phpversion()=='5.0.0RC1-dev'||phpversion()=='5.0.0RC2dev'||version_compare(phpversion(),'5.0.0','ge') [line 66]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 637 of 1382

EventStack.inc
An Event Stack for inter-program communication, particularly for parsing phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2007 Joshua Eichorn LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Joshua Eichorn < [email protected]> Version CVS: $Id: EventStack.inc 243937 2007-10-10 02:27:42Z ashnazg $ Copyright 2000-2007 Joshua Eichorn Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 0.1 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 638 of 1382

IntermediateParser.inc
The phpDocumentor_IntermediateParser Class The Intermediary Data Parser (intermediate between Parse and Converter) phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Gregory Beaver < [email protected]> Version CVS: $Id: IntermediateParser.inc 247821 2007-12-09 06:11:35Z ashnazg $ Copyright 2002-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.1 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 639 of 1382

Io.inc
File and input handling routines This class parses command-line options, and works with files to generate lists of files to parse based on the ignore/include options phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Joshua Eichorn < [email protected]> Author Gregory Beaver < [email protected]> Version CVS: $Id: Io.inc 286921 2009-08-08 05:01:24Z ashnazg $ Copyright 2000-2006 Joshua Eichorn, Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 0.1 Filesource Source Code for this file License LGPL

void function get_include_path() [line 987] void function Ioinc_mystrucsort($a, $b) [line 913] Function Parameters:

string $a

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 640 of 1382

string $b

Sorting functions for the file list


void function Ioinc_sortfiles($a, $b) [line 908] Function Parameters:

string $a string $b

Sorting functions for the file list


array function setup_dirs($struc, $dir, $contents) [line 956] Function Parameters:

array $struc struc is array('dir' => array of files in dir,'dir/subdir' => array of files in dir/subdir,...) array $dir array form of 'dir/subdir/subdir2' array('dir','subdir','subdir2') $contents

Recursively move contents of $struc into associative array The contents of $struc have many indexes like 'dir/subdir/subdir2'. converts them to array('dir' => array('subdir' => array('subdir2')))

This function

Usedby Io::getDirTree()

array function set_dir($dir, $contents) [line 934] Function Parameters:

array $dir array $contents

Recursively add all the subdirectories of $contents to $dir without erasing anything

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 641 of 1382

in $dir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 642 of 1382

ParserDescCleanup.inc
All of the functions to clean up and handle the long description of a DocBlock are in this file. The primary functionality is based on Parser and WordParser, and modified to recognize only the tokens defined in the PHPDOCUMENTOR_PDP_* constants phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version CVS: $Id: ParserDescCleanup.inc 286923 2009-08-08 06:00:39Z ashnazg $ Copyright 2002-2006 Gregory Beaver See Parser, WordParser Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 License LGPL

PHPDOCUMENTOR_PDP_EVENT_B = 605 [line 68]

when <b> is found in a desc parserDescParser token constants

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 643 of 1382

PHPDOCUMENTOR_PDP_EVENT_BR = 607 [line 76]

when <br> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_CODE = 600 [line 48]

when <code> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_DOUBLECR = 602 [line 56]

when \n\n is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_ESCAPE = 608 [line 80]

when the << potential escape for tags is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_ESCAPE_CODE = 610 [line 88]

when << /code>> is found in a <code></code> section parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_ESCAPE_PRE = 609 [line 84]

when << /pre>> is found in a <pre></pre> section parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_I = 606 [line 72]

when <i> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_KBD = 613 [line 100]

when <kbd> is found in a desc parserDescParser token constants

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 644 of 1382

PHPDOCUMENTOR_PDP_EVENT_LIST = 604 [line 64]

when <ul>/<ol> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_P = 601 [line 52]

when <p> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_PRE = 603 [line 60]

when <pre> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_SAMP = 612 [line 96]

when <samp> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_EVENT_SIMLIST = 614 [line 111]

when a simple list is found in a desc parserDescParser token constants like o item 2

o item 1

PHPDOCUMENTOR_PDP_EVENT_VAR = 611 [line 92]

when <var> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_B = 705 [line 70]

when <b> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_BR = 707 [line 78]

when <br> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_CODE = 700 [line 50]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 645 of 1382

when <code> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_DOUBLECR = 702 [line 58]

when \n\n is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_ESCAPE = 708 [line 82]

when the << potential escape for tags is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_ESCAPE_CODE = 710 [line 90]

when << /code>> is found in a <code></code> section parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_ESCAPE_PRE = 709 [line 86]

when << /pre>> is found in a <pre></pre> section parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_I = 706 [line 74]

when <i> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_KBD = 713 [line 102]

when <kbd> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_LIST = 704 [line 66]

when <ul>/<ol> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_P = 701 [line 54]

when <p> is found in a desc parserDescParser token constants

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 646 of 1382

PHPDOCUMENTOR_PDP_STATE_PRE = 703 [line 62]

when <pre> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_SAMP = 712 [line 98]

when <samp> is found in a desc parserDescParser token constants

PHPDOCUMENTOR_PDP_STATE_SIMLIST = 714 [line 120]

when a simple list is found in a desc parserDescParser token constants like o item 2

o item 1

PHPDOCUMENTOR_PDP_STATE_VAR = 711 [line 94]

when <var> is found in a desc parserDescParser token constants

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 647 of 1382

phpdoc.inc
startup file phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2007 Joshua Eichorn, Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Joshua Eichorn < [email protected]> Author Gregory Beaver < [email protected]> Version CVS: $Id: phpdoc.inc 243933 2007-10-10 01:18:25Z ashnazg $ Copyright 2000-2007 Joshua Eichorn, Gregory Beaver Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change package to PhpDocumentor Since 0.1 License LGPL Filesource Source Code for this file

require_once "phpDocumentor/Setup.inc.php" [line

60]

All command-line handling from previous version has moved to here Many settings also moved to phpDocumentor.ini

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 648 of 1382

ProceduralPages.inc
Intermediate procedural page parsing structure. This structure parses defines, functions, and global variables by file, iterates over the elements to document conflicts. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA and then

Package phpDocumentor Author Gregory Beaver < [email protected]> Version CVS: $Id: ProceduralPages.inc 253641 2008-02-24 02:35:44Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.1 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 649 of 1382

Publisher.inc
a class for handling the publishing of data phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2007 Kellin, Joshua Eichorn LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Kellin < [email protected]> Author Joshua Eichorn < [email protected]> Version CVS: $Id: Publisher.inc 244033 2007-10-11 03:30:34Z ashnazg $ Copyright 2000-2007 Kellin, Joshua Eichorn Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 0.1 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 650 of 1382

Setup.inc.php
This was all in phpdoc.inc and now encapsulates the complexity , phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Author Gregory Beaver < [email protected]> Version CVS: $Id: Setup.inc.php 258122 2008-04-22 15:48:55Z ashnazg $ Copyright 2002-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.2 License LGPL

$interface array = $_GET['interface'] [line 75]

$interface is either 'web' or is not set at all


$phpDocumentor_DefaultCategoryName string = 'default' [line 95]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 651 of 1382

default package name, set using -dn --defaultcategoryname

Name $phpDocumentor_DefaultCategoryName

$phpDocumentor_DefaultPackageName string = 'default' [line 88]

default package name, set using -dn --defaultpackagename

Name $phpDocumentor_DefaultPackageName

$_phpDocumentor_setting array = $_GET['setting'] [line 80]

$_phpDocumentor_setting is either the value from the web interface, or is set up by Io::parseArgv()
void function checkForBugCondition($php_version, [$php_bug_number = 'none'], [$pear_bug_number = 'none']) [line 971] Function Parameters:

string $php_version the PHP version that contains the bug string $php_bug_number the PHP bug number (if any) string $pear_bug_number the PEAR bug number (if any)

Crash in case of known, dangerous bug condition Checks the PHP version that is executing PhpDocumentor, in case a known PHP/PEAR bug condition could be triggered by the PhpDocumentor execution.

boolean function decideOnOrOff([$value_to_guess = 'NO VALUE WAS PASSED']) [line 930] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 652 of 1382

string $value_to_guess the command-line option to analyze

Fuzzy logic to interpret the boolean args' intent


include_once "phpDocumentor/ParserDescCleanup.inc" 63] [line

include_once "phpDocumentor/TutorialHighlightParser.inc" 62] [line

include_once "phpDocumentor/HighlightParser.inc" 61] [line

include_once "phpDocumentor/PackagePageElements.inc" 64] [line

include_once "phpDocumentor/Errors.inc" 68] [line

include_once "phpDocumentor/phpDocumentorTParser.inc" 60] [line

include_once "phpDocumentor/Converter.inc" 67] [line

include_once "phpDocumentor/LinkClasses.inc" 66] [line

include_once "phpDocumentor/XMLpackagePageParser.inc" 65] [line

include_once "phpDocumentor/phpDocumentorTWordParser.inc" 59] [line

include_once "phpDocumentor/IntermediateParser.inc" 49] [line

include_once "phpDocumentor/WordParser.inc" 50] [line

include_once "phpDocumentor/ProceduralPages.inc" 48] [line

include_once "phpDocumentor/Classes.inc" 47] [line

include_once "phpDocumentor/Io.inc" 45] [line

include_once "phpDocumentor/Publisher.inc" 46] [line

include_once "phpDocumentor/EventStack.inc" 51] [line

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 653 of 1382

include_once "phpDocumentor/ParserData.inc" 52] [line

include_once "phpDocumentor/ParserDocBlock.inc" 56] [line

include_once "phpDocumentor/ParserElements.inc" 57] [line

include_once "phpDocumentor/Parser.inc" 58] [line

include_once "phpDocumentor/DescHTML.inc" 55] [line

include_once "phpDocumentor/DocBlockTags.inc" 54] [line

include_once "phpDocumentor/common.inc.php" 43] [line

common settings
include_once "phpDocumentor/InlineTags.inc" 53] [line

void function phpDocumentor_out($string) [line 951] Function Parameters:

$string

Print parse information if quiet setting is off

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 654 of 1382

HighlightParserTests.php
Package phpDocumentor

require_once 'HighlightParserGetInlineTagsTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 655 of 1382

IntermediateParserTests.php
Package phpDocumentor

require_once 'IntermediateParserAddPrivatePageTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 656 of 1382

ParserClassTests.php
Package phpDocumentor

require_once 'ParserClassGetSourceLocationTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 657 of 1382

ParserPageTests.php
Package phpDocumentor

require_once 'ParserPageGetSourceLocationTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 658 of 1382

phpDocumentorSetupTests.php
Package phpDocumentor

require_once 'phpDocumentorSetupDecideOnOrOffTests.php' 11] [line

require_once 'phpDocumentorSetupCleanConverterNamePieceTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 659 of 1382

phpDocumentorTParserTests.php
Package phpDocumentor

PHPUnit_MAIN_METHOD = 'phpDocumentorTParserTests::main' [line 3] require_once 'phpDocumentorTParserGetInlineTagsTests.php' 10] [line

require_once 'PHPUnit/TextUI/TestRunner.php' [line 7]

require_once 'PHPUnit/Framework.php' [line 6]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 660 of 1382

Package phpDocumentor Classes

Class bug_772441
[line 2]
Package phpDocumentor

Class Classes
[line 70]

Intermediate class parsing structure. The phpDocumentor_IntermediateParser class uses this class and its cousin, ProceduralPages to organize all parsed source code elements. Data is fed to each immediately after it is parsed, and at conversion time, everything is organized. The Classes class is responsible for all inheritance, including resolving name conflicts between classes, determining which classes extend other classes, and is responsible for all inheritance of documentation.

Package phpDocumentor Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2001-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 661 of 1382

TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 License LGPL

void function Classes::addClass(&$element) [line 393] Function Parameters:

parserClass &$element element is a parserClass

While parsing, add a class to the list of parsed classes sets up the $classesbyfile, $classesbynamefile, $extendsbyfile, $classchildrenbyfile, $roots arrays, and sets $curclass

Uses Classes::addPackageToFile() - marks the current class's package as being present in a file

void function Classes::addConst(&$element) [line 466] Function Parameters:

parserConst &$element element is a parserConst

While parsing, add a variable to the list of parsed variables sets up the $constsbyfile array using $curfile and $curclass

void function Classes::addMethod(&$element) [line 434] Function Parameters:

parserMethod &$element element is a parserMethod

While parsing, add a method to the list of parsed methods sets up the $methodsbyfile array using $curfile and $curclass

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 662 of 1382

void function Classes::addPackageToFile($package) [line 497] Function Parameters:

string $package package name

Mark a package as being used in a class 1 function addPackageToFile($package ) 2 { 3 if (!isset( $this -> revcpbf[$this -> curfile][ package $ ])) 4 $this -> classpackagebyfile[ $this -> curfile][] = $package ; 5 $this -> revcpbf[$this -> curfile][ package = 1; $ ] 6 }

Usedby Classes::addClass() - marks the current class's package as being present in a file

void function Classes::addVar(&$element) [line 450] Function Parameters:

parserVar &$element element is a parserVar

While parsing, add a variable to the list of parsed variables sets up the $varsbyfile array using $curfile and $curclass

parserClass function Classes::getClass($class, $file) [line 943] Function Parameters:

string $class classname string $file file classname is located in

Get the parserClass representation of a class from its name and file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 663 of 1382

mixed function Classes::getClassByPackage($class, $package) [line 1189] Function Parameters:

string $class classname string $package package classname is in

Search for a class in a package


mixed function Classes::getClassesInPath($path) [line 960] Function Parameters:

string $path full path to filename

Used by parserData::getClasses()to retrieve classes defined in file $path retrieves the array entry from $classesbyfile for $path

mixed function Classes::getConflicts($class) [line 630] Function Parameters:

mixed $class the class name to search for

If a package contains two classes with the same name, this function finds that conflict Returns the $classconflicts entry for class $class, minus its own path

mixed function Classes::getDefiniteChildren($parclass, $file) [line 1349] Function Parameters:

string $parclass name of parent class string $file file parent class is found in

Get all classes confirmed in parsing to be descended class $parclass in file $file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 664 of 1382

See parserClass::getChildClassList() Uses $definitechild

mixed function Classes::getParentClass($class, $file) [line 1227] Function Parameters:

string $class classname string $file file classname is located in

Find the parent class of a class in file $file uses 3 tests to find the parent classname:
1. 2. 3.

only one class with the parent classname more than one class, but only one in the same file as the child only one parent class in the same package as the child

Usedby Classes::setClassParent() - to find the parent class

array function Classes::getRoots([$all = false]) [line 1292] Function Parameters:

boolean $all [since phpDocumentor 1.3.0RC6] determines whether to class trees that extend non-parsed classes

return

Get a list of all root classes indexed by package. Used to generate class trees by Converter
void function Classes::Inherit(&$render) [line 546] Function Parameters:

phpDocumentor_IntermediateParser &$render the renderer object

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 665 of 1382

Main processing engine for setting up class inheritance. This function uses $roots to traverse the inheritance tree via processChild() and returns the data structures phpDocumentor_IntermediateParser needs to convert parsed data to output using phpDocumentor_IntermediateParser::Convert()

TODO CS Cleanup - rename to "inherit" for CamelCaps naming standard Uses Classes::processChild() - set up inheritance

void function Classes::nextFile($file) [line 482] Function Parameters:

string $file file currently being parsed

Prepare to parse a new file sets $curfile to $file and $curclass to false (no class being parsed)

void function Classes::processChild(&$render, $class, $file, [$furb = false]) [line 690] Function Parameters:

phpDocumentor_IntermediateParser &$render the renderer object string $class class to process string $file name of file $class is located in boolean $furb flag used privately to control informational output while parsing (used when processing leftover classes in Inherit()

This function recursively climbs up the class tree, setting inherited information like package and adds the elements to phpDocumentor_IntermediateParser. Using structures defined in Classes, the function first sets package information, and then seeks out child classes. It uses 3 tests to determine whether a class is a child class. child class is in the same file as the parent class and extends parent class 2. child class is in a different file and specifies
1.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 666 of 1382

the parent's @package in its docblock child class is in a different file and is in a 3. different @package, with one possible parent class

Global Variable Used string $phpDocumentor_DefaultPackageName: default package, usually "default" Usedby Classes::Inherit() - set up inheritance

void function Classes::setClassParent($class, $file) [line 518] Function Parameters:

string $class child class to find parent class string $file file child class is located in

Find the parent class of $class, and set up structures to note this fact Modifies the parserClass element in $classesbyfile to use the parent's package, and inherit methods/vars

Uses Classes::getParentClass() - to find the parent class Uses $definitechild - if a match is made between a parent class and parameter $class in file $file, then definitechild is set here

Class EventStack
[line 52]

An event Stack

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 667 of 1382

Package phpDocumentor Author Joshua Eichorn < [email protected]> Version Release: @VER@ Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

EventStack::$num integer = 0 [line 64]

The number of events in the stack


EventStack::$stack array = array(PARSER_EVENT_NOEVENTS) [line 58]

The stack
int function EventStack::getEvent() [line 94]

Get the current event


int function EventStack::popEvent() [line 83]

Pop an event from the stack


void function EventStack::pushEvent($event) [line 73] Function Parameters:

int $event All events must be constants

Push an event onto the stack

Class Io
[line 50]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 668 of 1382

Class to handle file and user io opperations

Package phpDocumentor Author Gregory Beaver < [email protected]> Author Joshua Eichorn < [email protected]> Version $Id: Io.inc 286921 2009-08-08 05:01:24Z ashnazg $

Io::$ignore false|array = [line 63]

Format: array(array(regexp-ready string to search for whole path, regexp-ready string to search for basename of ignore strings),...)

Io::$phpDocOptions mixed = [line 57]

Holds all the options that are avaible to the cmd line interface and to the different web interfaces

Io::$valid_booleans array = array ( '', ' ', 'on', 'y', 'yes', 'true', '1', 'off', 'n', 'no', 'false', '0' ) [line 71]

A specific array of values that boolean-based arguments can understand, aided by the decideOnOrOff() helper method. Use lowercase letters always, to simplify string comparisons

Constructor void function Io::Io() [line 87]

creates an array $this->phpDocOptions and sets program options in it. Array is in the format of: [filename][tag][] = "f"; [filename][tag][] = "-file"; [filename][desc] "name of file to parse"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 669 of 1382

bool function Io::checkIgnore($file, $path, $ignore, [$ignore_no_ext = true], [$ignoresymlinks = false]) [line 717] Function Parameters:

string $file just the file name of the file or directory, this is the last dir string $path the path to consider (should be checked by and may be relative) array $ignore bool $ignore_no_ext bool $ignoresymlinks Ignore symlinks?

in the case of directories realpath() before,

Tell whether to ignore a file or a directory allows * and ? wildcards

Author Greg Beaver < [email protected]> Usedby Io::getDirTree()

array function Io::dirList($orig_directory, [$hidden = false], [$ignore_symlinks = false], $directory) [line 377] Function Parameters:

string $directory full path to the directory you want the list of bool $hidden whether to list files that begin with . like .bash_history bool $ignore_symlinks whether to ignore symlinks $orig_directory

Usedby Io::getAllFiles() Usedby Io::getDirTree()

string function Io::displayHelpMsg() [line 204]

create the help message for display on the command-line


mixed function Io::getAllFiles($file) [line 888] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 670 of 1382

string $file a full path from the -f command-line parameter, with potential * and ? wildcards.

Take a filename with wildcards and return all files that match the wildcards

Author Greg Beaver < [email protected]> Uses Io::removeNonMatches() Uses Io::dirList()

void function Io::getBase($filelist) [line 444] Function Parameters:

array $filelist array of strings

Retrieve common directory (case-insensitive in windows) takes the list of files, and returns the subdirectory they share in common, so in this list:
1 2 3 4 array( "/dir1/dir2/subdir/dir3/filename.ext" "/dir1/dir2/subdir/dir4/filename.ext" "/dir1/dir2/mydir/dir5/filename.ext"

, , );

getBase will return "/dir1/dir2"

void function Io::getDirTree($dir, $base_dir, [$ignore = array()], [$hidden = false], [$ignoresymlinks = false]) [line 564] Function Parameters:

string $dir directory string $base_dir base directory array $ignore array of ignored items boolean $hidden the "hidden" flag boolean $ignoresymlinks the "ignoresymlinks" flag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 671 of 1382

Uses setup_dirs() Uses Io::dirList() Uses Io::checkIgnore()

array function Io::getReadmeInstallChangelog($base, $filelist) [line 537] Function Parameters:

string $base base directory from getBase() array $filelist file list from dirList()

string function Io::getRegExpableSearchString($s) [line 832] Function Parameters:

string $s string with wildcards ? and *

Converts $s into a string that can be used with preg_match

Author Greg Beaver < [email protected]>

array function Io::getTutorials($filelist) [line 493] Function Parameters:

array $filelist array of paths (strings)

Retrieve tutorial subdirectories and their contents from the list of files to parse

boolean function Io::isIncludeable($filename) [line 245] Function Parameters:

string $filename

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 672 of 1382

calls http://www.php.net/file_exists each value in include_path, for then calls http://www.php.net/is_readable when it finds the file

array function Io::parseArgv() [line 277]

Parses $_SERVER['argv'] and creates a setup array

Global Variable Used array $argv: command-line arguments TODO replace with Console_* ?

void function Io::readPhpFile($path, [$quietMode = false]) [line 648] Function Parameters:

string $path $quietMode

Reads a file and returns it as a string Does basic error checking file extensions are set in phpdoc.inc

Global Variable Used array $_phpDocumentor_cvsphpfile_exts: PHP File extensions, used to validate that $path is a PHP File Global Variable Used array $_phpDocumentor_phpfile_exts: PHP File extensions in a CVS repository, used to validate that $path is a PHP File

string|array function Io::removeNonMatches($dir, $match) [line 859] Function Parameters:

array $dir array of filenames (full path) string $match search string with wildcards

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 673 of 1382

Removes files from the $dir array that do not match the search string in $match

Author Greg Beaver < [email protected]> Usedby Io::getAllFiles()

void function Io::_setupIgnore($ignore) [line 796] Function Parameters:

array $ignore strings of files/paths/wildcards to ignore

Construct the $ignorearray

Author Greg Beaver < [email protected]> Access protected

Class phpDocumentor_IntermediateParser
[line 60]

The phpDocumentor_IntermediateParser Class This class performs the work of organizing raw data from the parser in the format of descendants of the parserElement class. This is also where processing of package pages occurs, in phpDocumentor_IntermediateParser::handleClass() for class-level packages and phpDocumentor_IntermediateParser::handleDocBlock() for page-level packages. Most of the work of this parser goes to matching up DocBlocks with the elements that they are documenting. Since DocBlocks are passed before the element they document, the last DocBlock is stored in phpDocumentor_IntermediateParser::$last and then placed into the $docblock parameter of the parserElement descendant object.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 674 of 1382

Package phpDocumentor Author Gregory Beaver Version $Id: IntermediateParser.inc 247821 2007-12-09 06:11:35Z ashnazg $ Copyright 2002 Gregory Beaver

phpDocumentor_IntermediateParser::$all_packages array = array() [line 186]

list of all packages encountered while documenting. Used in automatic linking. Converter::getLink() first checks if an ambiguous link is found in the current package. If not, it then checks in parent packages, and if still not found, uses this array to check in the rest of the packages before giving up

Var Format: array(packagename => 1, packagename => 1,...) See Converter::getLink()

phpDocumentor_IntermediateParser::$classes Classes = false [line 268]

used to keep track of inheritance at the smartest level possible for a dumb computer

phpDocumentor_IntermediateParser::$converters array = false [line 287]

an array of template names indexed by converter name For example, if the default HTMLframesConverter is using the DOM/l0l33t template, the array will be
1 $converters['frames'] = 'DOM/l0l33t'

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 675 of 1382

Var Format: array(Convertername1 => templatename) See Converter

phpDocumentor_IntermediateParser::$cur_class string = '' [line 88]

Name of the class currently being parsed. It is only used (and only valid) when phpDocumentor_IntermediateParser is parsing a class

phpDocumentor_IntermediateParser::$data parserData = [line 237]

$data contains parsed structures for the current page being parsed In version 1.1+, $data is only used to store the current page information. All handling of documented elements is handled by the ProceduralPages and Classes classes.

phpDocumentor_IntermediateParser::$db_template mixed = [line 295] phpDocumentor_IntermediateParser::$event_handlers mixed = array( 'docblock' => 'handleDocBlock', 'page' => 'handlePage', 'class' => 'handleClass', 'define' => 'handleDefine', 'function' => 'handleFunction', 'method' => 'handleMethod', 'var' => 'handleVar', 'const' => 'handleConst', 'packagepage' => 'handlePackagePage', 'include' => 'handleInclude', 'global' => 'handleGlobal', 'tutorial' => 'handleTutorial', ) [line 214]

the functions which handle output from the Parser

See phpDocumentor_IntermediateParser::handlePackagePage(), phpDocumentor_IntermediateParser::handleInclude(),

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 676 of 1382

phpDocumentor_IntermediateParser::handleTutorial() See phpDocumentor_IntermediateParser::handleDefine(), phpDocumentor_IntermediateParser::handleFunction(), phpDocumentor_IntermediateParser::handleMethod(), phpDocumentor_IntermediateParser::handleVar() See handleEvent(), phpDocumentor_IntermediateParser::handleDocBlock(), phpDocumentor_IntermediateParser::handlePage(), phpDocumentor_IntermediateParser::handleClass()

phpDocumentor_IntermediateParser::$last parserDocBlock = [line 65] phpDocumentor_IntermediateParser::$lasttype string = '' [line 80]

type of the last parser Element handled This is used in handleDocBlock to determine whether a DocBlock is a page-level DocBlock in conjunction with the parserData::$clean var. A page-level DocBlock is alwaysthe first DocBlock in a file, and must be followed by another DocBlock. The first test is handled by parserData::$clean, which is set to false on the first encounter of an element, and the second test is handled by this variable, which must be equal to "docblock"

See phpDocumentor_IntermediateParser::handleDocBlock()

phpDocumentor_IntermediateParser::$packagecategories array = array() [line 173]

Used to determine the category for tutorials. WARNING: If more than one category exists, the last category overwrite the previous and will raise a big warning

encountered will

Var Format: packagename => categoryname

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 677 of 1382

phpDocumentor_IntermediateParser::$packageoutput false|array = false [line 206]

array of packages to parser and output documentation for, if not all should be documented Format: array(package1,package2,...) or false if not set

packages

Use this option to limit output similar to ignoring files. If you have some temporary files that you don't want to specify by name but don't want included in output, set a package name for all the elements in your project, and set packageoutput to that name. the default package will be ignored. Parsing speed does not improve. If you want to ignore files for speed reasons, use the ignore command-line option

Tutorial -po, --packageoutput See Io

phpDocumentor_IntermediateParser::$package_pages array = array() [line 133]

array of parsed package pages used by Convert() to convert all package pages into output

phpDocumentor_IntermediateParser::$package_parents array = array() [line 164]

Keeps track of packages of classes that have parent classes in another package. Used in automatic linking. This array is updated by addPackageParent(), which is called in Classes::processChild() to keep track of classes that descend from classes in different packages. In other words, if class foo is in package one, and class bar is in package two, an entry $package_parents['two'] = 'one' will be made.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 678 of 1382

Var Format: packagename => parentpackagename See Converter::getLink()

phpDocumentor_IntermediateParser::$pages array = array() [line 138]

Var array of all parserData containing page information

phpDocumentor_IntermediateParser::$parsePrivate boolean = false [line 106]

set in Setup.inc.php the value of the parseprivate commandline to option. If this option is true, elements with an @access private tag will be parsed and displayed

Tutorial -pp, --parseprivate

phpDocumentor_IntermediateParser::$privatepages array = array() [line 151]

Put away a page that has been @ignored or @access private$parsePrivate if ! When a page has @access private in its DocBlock, it is placed here instead of in $pages, to allow for proper Class parsing. Since classes and pages are parsed as if they were separate, this array allows public classes on private pages to retrieve information needed about the page that holds the class and to addPageIfNecessary() to the $pages array

phpDocumentor_IntermediateParser::$private_class mixed = false [line 113]

this variable is used to prevent parsing of elements with an @ignore tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 679 of 1382

See phpDocumentor_IntermediateParser::$parsePrivate See phpDocumentor_IntermediateParser::$packageoutput

phpDocumentor_IntermediateParser::$proceduralpages ProceduralPages = false [line 276]

used to keep track of all elements in a procedural page. Handles name conflicts with elegance

Since 1.1

phpDocumentor_IntermediateParser::$quietMode boolean = false [line 248]

set in Setup.inc.php the value of the quitemode commandline option. to If this option is true, informative output while parsing will not be (documentation is unaffected)

displayed

Tutorial -q, --quiet

phpDocumentor_IntermediateParser::$ric array = array() [line 303]

Stores parsed CHANGELOG/INSTALL/README files

Var Format: array(CHANGELOG => contents,

INSTALL => contents,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 680 of 1382

README => contents)

phpDocumentor_IntermediateParser::$targetDir mixed = [line 119]

used to set the output directory

See phpDocumentor_IntermediateParser::setTargetDir()

phpDocumentor_IntermediateParser::$templateBase mixed = [line 125]

used to set the template base directory

See phpDocumentor_IntermediateParser::setTemplateBase()

phpDocumentor_IntermediateParser::$title string = '' [line 291]

Var Title of generated documentation, passed to Converters

phpDocumentor_IntermediateParser::$type string = '' [line 97]

type of the current parser Element being handled This is used by HandleEvent() to set the $lasttype var, which is used to detect pagelevel DocBlocks

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 681 of 1382

phpDocumentor_IntermediateParser::$undocumentedElementWarnings boolean = false [line 261]

set

in Setup.inc.php to the value of the undocumentedElementWarnings commandline option. If this option is true, warnings about certain elements (classes, methods) that are not documented with DocBlocks will be shown while parsing, and will also be displayed in the errors.html page (other documentation is unaffected)

Tutorial -ue, --undocumentedelements

phpDocumentor_IntermediateParser::$uses mixed = array() [line 293] Constructor void function phpDocumentor_IntermediateParser::phpDocumentor_IntermediateParser([$title = 'Generated Documentation']) [line 326] Function Parameters:

string $title Title of generated documentation, passed to Converters

sets up basic data structures

See phpDocumentor_IntermediateParser::$title, phpDocumentor_IntermediateParser::$data, phpDocumentor_IntermediateParser::$classes, phpDocumentor_IntermediateParser::$proceduralpages

void function phpDocumentor_IntermediateParser::addConverter($output, $name, $template) [line 1708] Function Parameters:

string $output output format (HTML, PDF, XML). Must be all caps string $name Converter name (frames, for example, is the name of HTMLframesConverter) string $template template to use, should be a relative path to the

templates

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 682 of 1382

dir (like DOM/default)

Add a converter name to use to the list of converters Sets up the $converters array.

void function phpDocumentor_IntermediateParser::addElementToPage($element, $path) [line 1474] Function Parameters:

parserElement $element this will actually be a descendant of parserElement string $path

adds a processed descendant ofparserElement to the $pages array or $privatepages array This function expects the page to exist in either $pages or $privatepages. It calls the parserData::addElement() method to add $element to the page.

void function phpDocumentor_IntermediateParser::addPackageParent(&$class) [line 1685] Function Parameters:

parserClass &$class

If the parent class of $class is in a different package, adds it to the $package_parents array

void function phpDocumentor_IntermediateParser::addPage($page, $path) [line 1368] Function Parameters:

parserPage $page string $path full path to the file

Replaces theparserPagerepresented by $this->pages[$path] with $page Called by addPageIfNecessary(), handleDocBlock() and ProceduralPages::setupPages(), this method first checks to see if the page has been added. If not, it assumes that the page has either been @ignored or set with @access private with --parseprivate off, and returns addPrivatePage(). Otherwise, it sets the

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 683 of 1382

pages[$path] to be the parserPage $page and sets the package and subpackage to that of $page

See phpDocumentor_IntermediateParser::$pages

void function phpDocumentor_IntermediateParser::addPageIfNecessary($path, &$class) [line 1398] Function Parameters:

string $path full path of page &$class

add a new parserPageto the $pages array if none is found This method is used when a page has been @ignored or marked with @access private, and a public class is in the page (a class with no @access private in its DocBlock). The method first creates a new page in the $pages array and then copies path information, and calls addPage() to set up packages

void function phpDocumentor_IntermediateParser::addPrivatePage($page, $path) [line 1436] Function Parameters:

parserPage $page string $path full path to the page

Adds a parserPage element to the parserData element in $this>privatepages[$path] Performs a similar function to addPage, but adds to the $privatePages array

See phpDocumentor_IntermediateParser::addPage()

void function phpDocumentor_IntermediateParser::addUses($element, $path) [line 1505]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 684 of 1382

Function Parameters:

parserElement $element descendant of parserElement string $path full path to the file

Add all the @uses tags from $element to the $uses array so that @usedby virtual tags can be added

Uses parserUsesTag::getSeeElement() - used to initialize $uses Uses parserUsesTag::getDescription() - used to initialize $uses

int function phpDocumentor_IntermediateParser::ClasselementCmp($a, $b) [line 1775] Function Parameters:

mixed $a mixed $b

does a natural case sort on two class elements (either parserClass parserMethod , or parserVar

See generateElementIndex()

void function phpDocumentor_IntermediateParser::Convert($title, $converter) [line 1650] Function Parameters:

$title $converter

Interface to the Converter This function simply passes $pages and package_pages to the walk() method, and

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 685 of 1382

then calls the Output() method. Note that Output() is not required to do anything, and in fact doesn't in HTMLframesConverter.

Uses Converter::walk() - passes $pages and $package_pages Uses Converter::Output()

int function phpDocumentor_IntermediateParser::elementCmp($a, $b) [line 1761] Function Parameters:

mixed $a mixed $b

does a natural case sort on two parserElementdescendants

See generateElementIndex()

void function phpDocumentor_IntermediateParser::handleClass($event, $data) [line 905] Function Parameters:

integer $event Event number from Parser.inc parserClass $data

handles post-parsing of classes This function sets $data->clean to false to tell the phpDocumentor_IntermediateParser that a page-level DocBlock can't be found after this point on this page. It sets $cur_class to its name, and if an @ignore tag is found in the DocBlock, it sets $private_class to true, to prevent post-parsing of any of the class's vars or methods. Then it checks for the existence of a package page for the class's package

void function phpDocumentor_IntermediateParser::handleConst($event, $data) [line 609] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 686 of 1382

integer $event Event number from Parser.inc parserVar $data

handles post-parsing of class constants This function aligns $data's $path var and packages to match the parent object

void function phpDocumentor_IntermediateParser::handleDefine($event, $data) [line 849] Function Parameters:

integer $event Event number from Parser.inc parserDefine $data

handles post-parsing of defines This function sets $data->clean to false to tell the phpDocumentor_IntermediateParser that a page-level DocBlock can't be found after this point on this page. It then sets the package to be the same as the page and adds itself to the ProceduralPages class

void function phpDocumentor_IntermediateParser::handleDocBlock($event, $data) [line 1046] Function Parameters:

integer $event Event number from Parser.inc parserDocBlock $data

handles post-parsing of DocBlocks This function sets $last to the DocBlock represented by $data, to allow the next documentable element passed to phpDocumentor_IntermediateParser to link the DocBlock into its $docblock property. This function also checks for two special cases of DocBlocks: First DocBlock in the file contains a @package tag First DocBlock in the file is immediately followed by another DocBlock In both cases, the function extracts this tag and uses it as the page-level package. If the @package tag is in the DocBlock of an element (function, global variable, whatever) that isn't a page-level DocBlock, a warning will be raised to notify the author that a @package tag belongs in a page-level DocBlock.
1. 2.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 687 of 1382

New in version 1.2.2, if the first DocBlock in a file contains a @package tag, it is a pagelevel DocBlock. If the DocBlock is page-level, it is processed with _processPageLevelDocBlock Finally, the function replaces the old parserPage in parserData::$data->parent with the new one containing information from the DocBlock by calling addPage(), and checks for package-level docs.

void function phpDocumentor_IntermediateParser::HandleEvent($event, $data) [line 1226] Function Parameters:

integer $event event number from Parser.inc mixed $data if $event is PHPDOCUMENTOR_EVENT_NEWSTATE, $data is a PHP_DOC_EVENT_END_PAGE or STATE_END_CLASS, otherwise $data is either a parserDocBlock, parserPage or descendant of parserElement

called viaParser::parse()and Parser's inherited method Publisher::publishEvent() $event is one of the PHPDOC constants from Parser.inc. If it is not PHPDOCUMENTOR_EVENT_NEWSTATE, then a function name is retrieved from the $event_handlers array and called to handle the $data

Global Variable Used array $_phpDocumentor_setting$phpDocumentor_DefaultPackageName: we use 'sourcecode' to determine whether to highlight the source of the current file if it has no file-level docblock

void function phpDocumentor_IntermediateParser::handleFunction($event, $data) [line 763] Function Parameters:

integer $event Event number from Parser.inc parserFunction $data

handles post-parsing of functions This function sets $data->clean to false to tell the phpDocumentor_IntermediateParser that a page-level DocBlock can't be found after this

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 688 of 1382

point on this page. It then sets the package to be the same as the page, aligns the docblock's @param, @global, and @staticvar tags with the information parsed from the function source code. If source code has been parsed by a {@source} tag, the source is added to its docblock, and then the parserFunction adds itself to the ProceduralPages class

void function phpDocumentor_IntermediateParser::handleGlobal($event, $data) [line 459] Function Parameters:

integer $event Event number from Parser.inc parserGlobal $data

handles post-parsing of global variables This function sets $data->clean to false to tell the phpDocumentor_IntermediateParser that a page-level DocBlock can't be found after this point on this page. It then sets the package to be the same as the page, and adds itself to the ProceduralPages class

void function phpDocumentor_IntermediateParser::handleInclude($event, $data) [line 403] Function Parameters:

integer $event Event number from Parser.inc parserInclude $data

handles post-parsing of include/require/include_once/require_once This function sets $data->clean to false to tell the phpDocumentor_IntermediateParser that a page-level DocBlock can't be found after this point on this page. It then sets the package to be the same as the page, and adds itself to the ProceduralPages class

void function phpDocumentor_IntermediateParser::handleMethod($event, $data) [line 659] Function Parameters:

integer $event Event number from Parser.inc parserMethod $data

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 689 of 1382

handles post-parsing of class methods This function first aligns $data's path and package to match the parent object, and also aligns the docblock's @param, @global, and @staticvar tags with the information parsed from the method source code. It also checks to see if the method is a constructor and sets the $isConstructor flag. If source code has been parsed by a {@source} tag, the source is added to its docblock Finally, it adds the method to the Classes class.

void function phpDocumentor_IntermediateParser::handlePackagePage($event, $data) [line 515] Function Parameters:

integer $event Event number from Parser.inc parserPackagePage $data

handles post-parsing of Package-level documentation pages. sets the $package_pages[$data->package] to $data

void function phpDocumentor_IntermediateParser::handlePage($event, $data) [line 1000] Function Parameters:

integer $event Event number from Parser.inc parserPage $data

handles post-parsing of procedural pages this event is called at the start of a new page, before the Parser knows whether the page will contain any procedural pages or not

void function phpDocumentor_IntermediateParser::handleTutorial($event, $data) [line 530] Function Parameters:

integer $event Event Number parserTutorial $data

handle post-parsing of Tutorials. This adds the parsed tutorial to the tutorial tree

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 690 of 1382

Since 1.2 Uses $tutorials - sets the value of tutorials to parameter $data

void function phpDocumentor_IntermediateParser::handleVar($event, $data) [line 550] Function Parameters:

integer $event Event number from Parser.inc parserVar $data

handles post-parsing of class vars This function sets up a @var tag if none is found, and aligns $data's $path var and packages to match the parent object

void function phpDocumentor_IntermediateParser::Output([$title = "Generated Documentation"]) [line 1805] Function Parameters:

$title

call this method once parsing has completed. This method calls the private methods fixClasses and fixProcPages, both of which adjust inheritance and package information based on complicated post-parsing rules described in ProceduralPages::setupPages() and Classes::Inherit(). Then, it sorts elements of the $pages array and calls Convert for each Converter in the $converters array

See phpDocumentor_IntermediateParser::Convert() See phpDocumentor_IntermediateParser::$pages See phpDocumentor_IntermediateParser::$converters

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 691 of 1382

void function phpDocumentor_IntermediateParser::parsePackagePage($package, $path) [line 1180] Function Parameters:

string $package package name of package file to parse string $path directory of file that contains package name

Backward-compatibility only, use the new tutorials for more power

Tutorial phpDocumentor Tutorials

void function phpDocumentor_IntermediateParser::setParsePrivate($parse) [line 1929] Function Parameters:

bool $parse

set display of elements marked with @access private If set to true, elements will be displayed

void function phpDocumentor_IntermediateParser::setQuietMode($quietMode) [line 1906] Function Parameters:

bool $quietMode

set parsing information output mode (quiet or verbose) If set to false, no parsing information (parsing /php/file/thisfile.php, Converting etc.) will be displayed. Useful for cron jobs

void function phpDocumentor_IntermediateParser::setTargetDir($dir) [line 1882] Function Parameters:

string $dir the output directory

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 692 of 1382

Sets the output directory


void function phpDocumentor_IntermediateParser::setTemplateBase($dir) [line 1893] Function Parameters:

string $dir the template base directory

Sets the template base directory

Tutorial -tb, --templatebase

void function phpDocumentor_IntermediateParser::setUndocumentedElementWarningsMode($undocumentedElementWarni ngs) [line 1918] Function Parameters:

bool $undocumentedElementWarnings

show warnings for undocumented elements If set to false, no warnings will be shown for undocumented elements. Useful for identifying classes and methods that haven't yet been documented.

void function phpDocumentor_IntermediateParser::_guessPackage($path, $sourceloc) [line 376] Function Parameters:

string $path full path of file template-ready $sourceloc source location Program_Root/dir/file.php

Guess the package/subpackage based on subdirectory if the --pear option A file in pear/dir/file.php will be in package "dir." A file in pear/dir/subdir/file.php will be in package "dir," subpackage "subdir."

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 693 of 1382

Global Variable Used array $_phpDocumentor_setting: uses the 'pear' option to determine whether to guess based on subdirectory Tutorial -p, --pear

Class phpDocumentor_setup
[line 100]
Package phpDocumentor

phpDocumentor_setup::$dirs string = '' [line 133]

contents of --directory commandline

Tutorial -d, --directory

phpDocumentor_setup::$files string = '' [line 127]

contents of --filename commandline

Tutorial -f, --filename

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 694 of 1382

phpDocumentor_setup::$hidden boolean = false [line 139]

contents of --hidden commandline

Tutorial -dh, --hidden

phpDocumentor_setup::$ignoresymlinks boolean = false [line 155]

contents of --ignoresymlinks commandline


phpDocumentor_setup::$ignore_files string = array() [line 150]

contents of --ignore commandline

Tutorial -i, --ignore

phpDocumentor_setup::$packages string = false [line 121]

Packages to create documentation for


phpDocumentor_setup::$parse Parser|phpDocumentorTParser = [line 106]

The main parser


phpDocumentor_setup::$render phpDocumentor_IntermediateParser = false [line 116]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 695 of 1382

Used to organize output from the Parser before Conversion


phpDocumentor_setup::$setup Io = [line 111]

Used to parse command-line options


Constructor void function phpDocumentor_setup::phpDocumentor_setup() [line 162]

Checks PHP version, makes sure it is 4.2.0+, and chooses the phpDocumentorTParser if version is 4.3.0+

Uses phpDocumentor_setup::parseIni()

void function phpDocumentor_setup::checkIgnoreTag($tagname, [$inline = false]) [line 404] Function Parameters:

$tagname $inline

void function phpDocumentor_setup::createDocs([$title = false]) [line 537] Function Parameters:

$title

void function phpDocumentor_setup::parseHiddenFiles([$flag = true]) [line 520] Function Parameters:

$flag

void function phpDocumentor_setup::parseIni() [line 778]

Parse configuration file phpDocumentor.ini

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 696 of 1382

Usedby phpDocumentor_setup::phpDocumentor_setup()

void function phpDocumentor_setup::readCommandLineSettings() [line 267]

Get phpDocumentor settings from command-line or web interface


void function phpDocumentor_setup::readConfigFile($file) [line 233] Function Parameters:

string $file user configuration file

Get phpDocumentor settings from a user configuration file


void function phpDocumentor_setup::setDirectoriesToParse($dirs) [line 515] Function Parameters:

$dirs

void function phpDocumentor_setup::setFilesToParse($files) [line 510] Function Parameters:

$files

void function phpDocumentor_setup::setIgnore($ig) [line 525] Function Parameters:

$ig

void function phpDocumentor_setup::setJavadocDesc() [line 469] void function phpDocumentor_setup::setMemoryLimit() [line 417]

Allow a memory_limit setting in phpDocumentor.ini to override php.ini or default memory limit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 697 of 1382

TODO recognize "K" and "G" in memory_limit settings, rather than just "M"

void function phpDocumentor_setup::setPackageOutput($po) [line 499] Function Parameters:

$po

void function phpDocumentor_setup::setParsePrivate([$flag = true]) [line 474] Function Parameters:

$flag

void function phpDocumentor_setup::setQuietMode([$flag = true]) [line 479] Function Parameters:

$flag

void function phpDocumentor_setup::setTargetDir($target) [line 489] Function Parameters:

$target

void function phpDocumentor_setup::setTemplateBase($dir) [line 494] Function Parameters:

$dir

void function phpDocumentor_setup::setTitle($ti) [line 505] Function Parameters:

$ti

void function phpDocumentor_setup::setUndocumentedElementWarnings([$flag = true]) [line 484]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 698 of 1382

Function Parameters:

$flag

Class ProceduralPages
[line 58]

Intermediate procedural page parsing structure. This structure parses defines, functions, and global variables by file, iterates over the elements to document conflicts.

and then

Package phpDocumentor Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.1 License LGPL

ProceduralPages::$curfile string = [line 67]

file being parsed, used in every add function to match up elements with the file that contains them

See addClass(), addMethod(), addVar(), nextFile()

ProceduralPages::$defineconflicts array = array() [line 314]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 699 of 1382

Namespace conflicts within all documented packages of functions Format: array( functionname => array( full path, full path, ... ) )

ProceduralPages::$definesbyfile array = array() [line 157]

array of parsed defines organized by the full path define. Format: array( full path => array( definename => parserDefine ) )

of the file that contains the

ProceduralPages::$definesbynamefile array = array() [line 211]

array of file names organized by defines that are in the file. This structure is designed to handle name conflicts. Two files can contain defines with the same name, and this array will record both filenames to help control namespace errors Format: array( definename => array( full path of file containing definename, full path of file 2 containing definename, ... ) )

ProceduralPages::$functionconflicts array = array() [line 282]

Namespace conflicts within all documented packages of functions Format: array( functionname => array( full path,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 700 of 1382

full path, ... ) )

ProceduralPages::$functionsbyfile array = array() [line 142]

array of parsed functions organized by the full path of the file that contains the function. Format: array( full path => array( functionname => parserFunction ) )

ProceduralPages::$functionsbynamefile array = array() [line 192]

array of file names organized by functions that are in the file. This structure is designed to handle name conflicts. Two files can contain functions with the same name, and this array will record both filenames to help control namespace errors Format: array( functionname => array( full path of file containing functionname, full path of file 2 containing functionname, ... ) )

ProceduralPages::$globalconflicts array = array() [line 330]

Namespace conflicts within all documented packages of functions Format: array( functionname => array( full path, full path, ... ) )

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 701 of 1382

ProceduralPages::$globalsbyfile array = array() [line 172]

array of parsed global variables organized by the full path of the file that contains the global variable definition. Format: array( full path => array( globalname => parserGlobal ) )

ProceduralPages::$globalsbynamefile array = array() [line 231]

array of file names organized by global variables that are in the file. This structure is designed to handle name conflicts. Two files can contain global variables with the same name, and this array will record both filenames to help control namespace errors Format: array( global variablename => array( full path of file containing global variablename, full path of file 2 containing global variablename, ... ) )

ProceduralPages::$ignorepages array = array() [line 100]

array of all procedural pages ordered by name that have been ignored via -po or @access private or @ignore Format: name => array( fullpath => parserPage, fullpath => parserPage2 [if there are name conflicts], ... ) )

array(

ProceduralPages::$includesbyfile array = array() [line 127]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 702 of 1382

array of parsed includes organized by the full path of the file that contains the include. Format: array( full path => array( includename => parserInclude ) )

ProceduralPages::$pageclasspackages array = array() [line 266]

array of packages assigned to classes in a file, ordered by fullpath Format: array( fullpath => array( packagename => array( subpackagename => 1, subpackagename => 1, .. ), packagename2 => array(... ) ) )

ProceduralPages::$pageconflicts array = array() [line 298]

Namespace conflicts within all documented pages Format: array( pagename => array( fullpath, fullpath, ... ) )

ProceduralPages::$pagepackages array = array() [line 246]

array of packages ordered by full path Format: array( fullpath => array(

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 703 of 1382

packagename, subpackagename ) )

ProceduralPages::$pages array = array() [line 83]

array of all procedural pages ordered by name Format: array( name => array( fullpath => parserPage, fullpath => parserPage2 [if there are name conflicts], ... ) )

ProceduralPages::$pathpages array = array() [line 112]

array of all procedural page names ordered by full path to the file Format: array( fullpath => name )

void function ProceduralPages::addClassPackageToFile($file, $package, $subpackage) [line 613] Function Parameters:

string $file full path to the file that contains the class string $package package name string $subpackage subpackage name

adds a package from a class to the current file


void function ProceduralPages::addDefine(&$element) [line 552] Function Parameters:

parserDefine &$element the "define" element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 704 of 1382

sets up the$definesbyfile array using$curfile


void function ProceduralPages::addFunction(&$element) [line 508] Function Parameters:

parserFunction &$element the "function" object

sets up the$functionsbyfile array using$curfile


void function ProceduralPages::addGlobal(&$element) [line 530] Function Parameters:

parserGlobal &$element the "global" element

sets up the$globalsbyfile array using$curfile


void function ProceduralPages::addInclude(&$element) [line 496] Function Parameters:

parserInclude &$element the "include" element object

sets up the$includesbyfile array using$curfile


void function ProceduralPages::addPage(&$element) [line 349] Function Parameters:

parserPage &$element the parser page element

sets up the$pages array


void function ProceduralPages::addPagePackage($path, $package, $subpackage) [line 450] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 705 of 1382

string $path full path string $package the package name string $subpackage the subpackage name

Changes the package of the page represented by $path changes package in both the $pages array and the pagepackages array

array|bool function ProceduralPages::getPathInfo($path, &$c) [line 385] Function Parameters:

string $path path to the element mixed &$c ???

gathers path-related info about a given element

TODO figure out what &$c is and update the param tag

array|string function ProceduralPages::getRealPath($path, $file) [line 1033] Function Parameters:

string $path path to the file string $file the file name

Ensures the path to the file is an absolute path


void function ProceduralPages::ignorePage(&$element) [line 368] Function Parameters:

parserPage &$element the parser page element

moves a page from the $pages array to the$ignorepagesarray

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 706 of 1382

parserPage|bool function ProceduralPages::pathMatchesParsedFile($path, $infile) [line 983] Function Parameters:

string $path the path to look for string $infile the file to check

checks to see if the parsed file matches the given path


void function ProceduralPages::replaceElement(&$element) [line 575] Function Parameters:

parserElement &$element the element to align

Used to align an element with the package of its parent page prior to Conversion.
void function ProceduralPages::setName($name) [line 421] Function Parameters:

string $name the alias

Change a page's name from its file to alias $name This function is used to handle a @name tag in a page-level DocBlock

void function ProceduralPages::setParseBase($pbase) [line 969] Function Parameters:

mixed $pbase the parser base

sets the parser base


void function ProceduralPages::setupPagePackages() [line 628]

if there is one class package in a file, the parent path inherits the package if its package is default. helps with -po to avoid dumb bugs

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 707 of 1382

void function ProceduralPages::setupPages(&$render) [line 911] Function Parameters:

phpDocumentor_IntermediateParser &$render the parser

Adjusts packages of all pages and removes name conflicts within a package Automatic linking requires that each linkable name have exactly one element associated with it. In other words, there cannot be two functions named foo() in the same package. This also adheres to php rules with one exception:
1 2 3 4 5 if ($test == 3) { define('whatever', 'this thing'); } else { define('whatever', 'this other thing'); }

phpDocumentor is not aware of conditional control structures because it would slow things down considerably. So, what phpDocumentor does is automatically ignore the second define and raise a warning. The warning can be eliminated with an @ignore tag on the second element like so:
1 2 3 4 5 6 7 8 if ($test == 3) { define('whatever', 'this thing'); } else { /** * @ignore */ define('whatever', 'this other thing'); }

If there are two files that contain the same procedural elements in the same package (for example, a common configuration file common.php), they will also be ignored as if they were in the same file. The reasoning behind this is simple. A package is an indivisible set of files and classes that a user will include in their code. Name conflicts must be avoided to allow successful execution. This function also plays the all-important role of calling phpDocumentor_IntermediateParser::addElementToPage() in order to add processed elements to their pages for Conversion.

Class Publisher
[line 54]

a class for handling the publishing of data

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 708 of 1382

Package phpDocumentor Author Kellin < [email protected]> Author Joshua Eichorn < [email protected]> Version Release: @VER@ Copyright 2000-2007 Kellin, Joshua Eichorn Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

Publisher::$popEvent array = array() [line 67] Publisher::$pushEvent array = array() [line 66] Publisher::$subscriber array = array() [line 62]

Array of references objects that have Subscribed to this publisher


Publisher::$tokens array = array() [line 64] void function Publisher::publishEvent($event, $data) [line 96] Function Parameters:

integer $event see Parser.inc PARSER_EVENT_* constants mixed $data anything the subscribed event handler is expecting

Publish an event
void function Publisher::subscribe($event, &$object) [line 83] Function Parameters:

integer $event see Parser.inc PARSER_EVENT_* constants class &$object any class that has a HandleEvent() method like phpDocumentor_IntermediateParser::HandleEvent()

or

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 709 of 1382

Classes::HandleEvent()

Adds a subscriber to the $subscriber array(). if $event is '*', the publisher will use $object as the default event handler

TODO CS Cleanup - there's no way I can get the &$object desc under 85 chars

Class tests_HighlightParserTests
[line 12]
Package phpDocumentor

void function tests_HighlightParserTests::main() [line 14]

Static Access public

void function tests_HighlightParserTests::suite() [line 19]

Static Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 710 of 1382

Class tests_IntermediateParserTests
[line 12]
Package phpDocumentor

void function tests_IntermediateParserTests::main() [line 14]

Static Access public

void function tests_IntermediateParserTests::suite() [line 19]

Static Access public

Class tests_ParserClassTests
[line 12]
Package phpDocumentor

void function tests_ParserClassTests::main() [line 14]

Static Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 711 of 1382

void function tests_ParserClassTests::suite() [line 19]

Static Access public

Class tests_ParserPageTests
[line 12]
Package phpDocumentor

void function tests_ParserPageTests::main() [line 14]

Static Access public

void function tests_ParserPageTests::suite() [line 19]

Static Access public

Class tests_phpDocumentorSetupTests
[line 13]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 712 of 1382

Package phpDocumentor

void function tests_phpDocumentorSetupTests::main() [line 15]

Static Access public

void function tests_phpDocumentorSetupTests::suite() [line 20]

Static Access public

Class tests_phpDocumentorTParserTests
[line 12]
Package phpDocumentor

void function tests_phpDocumentorTParserTests::main() [line 14]

Static Access public

void function tests_phpDocumentorTParserTests::suite() [line 19]

Static Access public

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 713 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 714 of 1382

DescHTML.inc
All abstract representations of html tags in DocBlocks are handled by the classes in this file Before version 1.2, phpDocumentor simply passed html to converters, without much thought, except the adv_htmlentities() function was provided along with a list of allowed html. That list is no longer used, in favor of these classes. The PDF Converter output looked wretched in version 1.1.0 because line breaks in DocBlocks were honored. This meant that output often had just a few words on every other line! To fix this problem, DocBlock descriptions are now parsed using the ParserDescParser, and split into paragraphs. In addition, html in DocBlocks are parsed into these objects to allow for easy conversion in destination converters. This design also allows different conversion for different templates within a converter, which separates design from logic almost 100% phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2007 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version CVS: $Id: DescHTML.inc 246329 2007-11-17 03:07:00Z ashnazg $ Copyright 2002-2007 Gregory Beaver See parserDocBlock, parserInclude, parserPage, parserClass See parserDefine, parserFunction, parserMethod, parserVar Link http://pear.php.net/PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 715 of 1382

Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2 License LGPL Filesource Source Code for this file

Class parserB
[line 161]

Used for <b> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserB Since 1.2 License LGPL

string function parserB::Convert(&$c) [line 172] Function Parameters:

Converter &$c the converter object

performs the conversion of bold tags

TODO CS cleanup - rename method to convert() Uses Converter::Bolden()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 716 of 1382

Class parserBr
[line 326]

Used for <br> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserBr Since 1.2 License LGPL

string function parserBr::Convert(&$c) [line 337] Function Parameters:

Converter &$c the converter object

performs the conversion of linebreak tags

TODO CS cleanup - rename method to convert() Uses Converter::Br()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 717 of 1382

Class parserCode
[line 74]

Used for <code> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserCode Since 1.2 License LGPL

string function parserCode::Convert(&$c) [line 85] Function Parameters:

Converter &$c the converter object

performs the conversion of code tags

TODO CS cleanup - rename method to convert() Uses Converter::ProgramExample()

Class parserDescVar
[line 227]

Used for <var> in a description

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 718 of 1382

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserDescVar Since 1.2 License LGPL

string function parserDescVar::Convert(&$c) [line 238] Function Parameters:

Converter &$c the converter object

performs the conversion of variable tags

TODO CS cleanup - rename method to convert() Uses Converter::Varize()

Class parserI
[line 194]

Used for <i> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 719 of 1382

Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserI Since 1.2 License LGPL

string function parserI::Convert(&$c) [line 205] Function Parameters:

Converter &$c the converter object

performs the conversion of italic tags

TODO CS cleanup - rename method to convert() Uses Converter::Italicize()

Class parserKbd
[line 293]

Used for <kbd> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserKbd Since 1.2 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 720 of 1382

string function parserKbd::Convert(&$c) [line 304] Function Parameters:

Converter &$c the converter object

performs the conversion of keyboard tags

TODO CS cleanup - rename method to convert() Uses Converter::Kbdize()

Class parserList
[line 359]

Used for lists <ol> and <ul>

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserList Since 1.2 License LGPL

parserList::$items integer = 0 [line 368] parserList::$numbered

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 721 of 1382

boolean = [line 364] Constructor void function parserList::parserList($numbered) [line 374] Function Parameters:

integer $numbered a reference number for the new list

Constructor - create a new list


void function parserList::addItem($item) [line 386] Function Parameters:

parserStringWithInlineTags $item the item to add

add an item to a list


void function parserList::addList($list) [line 398] Function Parameters:

parserList $list the list to add

add a list
string function parserList::Convert(&$c) [line 413] Function Parameters:

Converter &$c the converter object

performs the conversion of list tags

TODO CS cleanup - rename method to convert() Uses Converter::ListItem() - enclose each item of the list Uses Converter::EncloseList() - enclose the list

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 722 of 1382

Class parserPre
[line 127]

Used for <pre> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserPre Since 1.2 License LGPL

string function parserPre::Convert(&$c) [line 138] Function Parameters:

Converter &$c the converter object

performs the conversion of code tags

TODO CS cleanup - rename method to convert() Uses Converter::PreserveWhiteSpace()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 723 of 1382

Class parserSamp
[line 260]

Used for <samp> in a description

Package phpDocumentor Sub-Package DescHTML Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - rename class to ParserSamp Since 1.2 License LGPL

string function parserSamp::Convert(&$c) [line 271] Function Parameters:

Converter &$c the converter object

performs the conversion of sample tags

TODO CS cleanup - rename method to convert() Uses Converter::Sampize()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 724 of 1382

DocBlockTags.inc
All abstract representations of DocBlock tags are defined by the classes in this file phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package DocBlockTags Author Greg Beaver < [email protected]> Version CVS: $Id: DocBlockTags.inc 287889 2009-08-30 07:27:39Z ashnazg $ Copyright 2002-2008 Gregory Beaver See parserDocBlock, parserInclude, parserPage, parserClass See parserDefine, parserFunction, parserMethod, parserVar Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since separate file since version 1.2 License LGPL Filesource Source Code for this file

Class parserAccessTag
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 725 of 1382

[line 253]

This class represents the @access tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @access Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

parserAccessTag::$isvalid boolean = false [line 266]

set to true if the returned tag has a value type of private, protected or public, false otherwise

parserAccessTag::$keyword string = 'access' [line 259]

tag name
Constructor void function parserAccessTag::parserAccessTag($value) [line 276] Function Parameters:

parserStringWithInlineTags $value the tag value

checks $value to make sure it is private, protected or public, otherwise it's not a valid @access tag

See parserAccessTag::$isvalid

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 726 of 1382

string function parserAccessTag::Convert(&$converter) [line 308] Function Parameters:

Converter &$converter the output converter

process this tag through the given output converter

See parserStringWithInlineTags::Convert() TODO CS cleanup - rename to convert for camelCase rule

string function parserAccessTag::getString() [line 318]

No inline tags are possible, returns 'public', 'protected' or 'private'

Class parserExampleTag
[line 1180]

represents "@example"

Package phpDocumentor Sub-Package DocBlockTags Tutorial @example Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 727 of 1382

parserExampleTag::$keyword string = 'example' [line 1186]

always "example"
Constructor void function parserExampleTag::parserExampleTag($value, $current_path) [line 1203] Function Parameters:

parserStringWithInlineTags $value tag value string $current_path path of file containing tag

this @example

Reads and parses the example file indicated The example tag takes one parameter: the full path to a php file that should be parsed and included as an example.

TODO does this "x = y = z = false" still work as expected in PHP5? TODO CS cleanup - rename constant to TOKENIZER_EXT Uses phpDocumentorTWordParser::getFileSource() - uses to parse an example and retrieve all tokens by line number

void function parserExampleTag::ConvertSource(&$c) [line 1353] Function Parameters:

Converter &$c the output converter

convert the source code

TODO CS cleanup - rename to convertSource for camelCase rule TODO what's up with all the "return" statements? can they _all_ be removed? Uses parserFileSourceTag::writeSource() Uses phpDocumentor_HighlightParser - highlights source code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 728 of 1382

string function parserExampleTag::getSourceLink(&$c) [line 1389] Function Parameters:

Converter &$c the output converter

Retrieve a converter-specific link to the example

Uses Converter::getExampleLink() - retrieve the link to the example

Class parserFileSourceTag
[line 1061]

represents "@filesource" Use this to create a link to a highlighted phpxref-style source file listing

Package phpDocumentor Sub-Package DocBlockTags Tutorial @filesource Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

parserFileSourceTag::$keyword string = 'filesource' [line 1067]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 729 of 1382

Always "filesource"
parserFileSourceTag::$path string = [line 1075] parserFileSourceTag::$source array = [line 1071] Constructor void function parserFileSourceTag::parserFileSourceTag($filepath, $value) [line 1090] Function Parameters:

string $filepath the file's path array $value output from

phpDocumentorTWordParser::getFileSource()

Set $sourceto $value, and set up path


string function parserFileSourceTag::Convert(&$c) [line 1106] Function Parameters:

Converter &$c the output converter

Return a link to the highlighted source and generate the source

TODO CS cleanup - rename to convert for camelCase rule Uses parserFileSourceTag::ConvertSource() - generate source code and write it out

void function parserFileSourceTag::ConvertSource(&$c) [line 1124] Function Parameters:

Converter &$c the output converter

convert the source code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 730 of 1382

TODO CS cleanup - rename to convertSource for camelCase rule TODO what's up with all the "return" statements? can they _all_ be removed? Usedby parserFileSourceTag::Convert() - generate source code and write it out Uses parserFileSourceTag::writeSource() Uses phpDocumentor_HighlightParser - highlights source code

output function parserFileSourceTag::getSourceLink(&$c) [line 1158] Function Parameters:

Converter &$c the output converter

gets path to the sourcecode file

Uses Converter::getSourceLink()

void function parserFileSourceTag::writeSource(&$c, $source) [line 1145] Function Parameters:

Converter &$c the output converter string $source highlighted source code

have the output converter write the source code

Usedby parserExampleTag::ConvertSource() Usedby parserFileSourceTag::ConvertSource() Uses Converter::writeSource() - export highlighted file source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 731 of 1382

Class parserLicenseTag
[line 789]

represents the "@see" tag Link to a license, instead of including lines and lines of license information in every file

Package phpDocumentor Sub-Package DocBlockTags Tutorial @license Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

parserLicenseTag::$keyword string = 'license' [line 795]

always 'license'
Constructor void function parserLicenseTag::parserLicenseTag($name, $link) [line 803] Function Parameters:

string $name unused? string $link URL to link to

set up the license tag

Class parserLinkTag
[line 657]
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 732 of 1382

represents the "@link" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @link Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

parserLinkTag::$keyword string = 'link' [line 663]

always 'link'
Constructor void function parserLinkTag::parserLinkTag($link) [line 672] Function Parameters:

string $link URL to link to description text)

(might also contain the URL's

sets up the link tag

Class parserMethodTag
[line 545]

represents the "@method" tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 733 of 1382

Package phpDocumentor Sub-Package DocBlockTags Tutorial @method Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.4.0a1 License LGPL

parserMethodTag::$keyword string = 'method' [line 551]

always 'method'
parserMethodTag::$returnType string = 'void' [line 556]

the return type a method has

Class parserNameTag
[line 203]

This class represents the @name tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @name Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 734 of 1382

parserNameTag::$keyword string = 'name' [line 209]

tag name
Constructor void function parserNameTag::parserNameTag($name, $value) [line 217] Function Parameters:

string $name tag name (not used) string $value tag value

set up the name tag


string function parserNameTag::Convert(&$c) [line 231] Function Parameters:

Converter &$c output converter

process this tag through the given output converter

See parserStringWithInlineTags::Convert() TODO CS cleanup - rename to convert for camelCase rule

Class parserParamTag
[line 606]

represents the "@param" tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 735 of 1382

Package phpDocumentor Sub-Package DocBlockTags Tutorial @param Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

parserParamTag::$keyword string = 'param' [line 612]

always 'param'

Class parserPropertyReadTag
[line 493]

represents the "@property-read" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @property Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.4.0a1 License LGPL

parserPropertyReadTag::$keyword string = 'property-read' [line 499]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 736 of 1382

always 'property-read'

Class parserPropertyTag
[line 450]

represents the "@property" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @property Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.4.0a1 License LGPL

parserPropertyTag::$keyword string = 'property' [line 456]

always 'property'
parserPropertyTag::$returnType string = 'mixed' [line 461]

the type a property has


Constructor void function parserPropertyTag::parserPropertyTag($returnType, $value) [line 469] Function Parameters:

string $returnType the tag value's datatype parserStringWithInlineTags $value the tag value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 737 of 1382

set up the property tag

Class parserPropertyWriteTag
[line 519]

represents the "@property-write" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @property Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.4.0a1 License LGPL

parserPropertyWriteTag::$keyword string = 'property-write' [line 525]

always 'property-write'

Class parserReturnTag
[line 341]

represents the "@return" tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 738 of 1382

Package phpDocumentor Sub-Package DocBlockTags Tutorial @return Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

parserReturnTag::$converted_returnType mixed = false [line 374]

contains a link to the documentation for a class passed as a type in @return, @var or @param Example:
1 2 3 4 5 class myclass { ... }

In this case, $converted_returnType will contain a link to myclass instead of the string 'myclass'

Var either the same as $returnType or a link to the docs for a class See parserReturnTag::$returnType

parserReturnTag::$keyword string = 'return' [line 347]

always 'return'
parserReturnTag::$returnType mixed = 'void' [line 351]

the type a function returns

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 739 of 1382

Constructor void function parserReturnTag::parserReturnTag($returnType, $value) [line 382] Function Parameters:

string $returnType returned datatype parserStringWithInlineTags $value tag value

set up the tag


string function parserReturnTag::Convert(&$converter) [line 398] Function Parameters:

Converter &$converter the output converter

process this tag through $converted_returnType)

the

given

output

converter

(sets

up

the

See parserStringWithInlineTags::Convert(), parserReturnTag::$converted_returnType TODO CS cleanup - rename to convert for camelCase rule

Class parserSeeTag
[line 704]

represents the "@see" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @see Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 740 of 1382

Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

parserSeeTag::$keyword string = 'see' [line 710]

always 'see'
Constructor void function parserSeeTag::parserSeeTag($name) [line 717] Function Parameters:

string $name element to link to

sets up the see tag


string function parserSeeTag::Convert(&$converter) [line 731] Function Parameters:

Converter &$converter the output converter

process this tag through the given output converter

See parserStringWithInlineTags::Convert() TODO CS cleanup - rename to convert for camelCase rule

Class parserStaticvarTag
[line 631]
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 741 of 1382

represents the "@staticvar" tag

Package phpDocumentor Sub-Package DocBlockTags Tutorial @staticvar Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

parserStaticvarTag::$keyword string = 'staticvar' [line 637]

always 'staticvar'

Class parserTag
[line 62]

used to represent standard tags like @access, etc. This class is aware of inline tags, and will automatically handle them using inherited functions

Package phpDocumentor Sub-Package DocBlockTags Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 742 of 1382

parserTag::$keyword string = '' [line 74]

tag name (see, access, etc.)


parserTag::$type string = '_tag' [line 69]

Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' always '_tag'

Constructor void function parserTag::parserTag($keyword, $value, [$noparse = false]) [line 86] Function Parameters:

string $keyword tag name parserStringWithInlineTags $value tag value boolean $noparse whether to parse the $value

for html tags

Set up the tag 1 function parserTag($keyword $value, $noparse= false) , 2 { 3 $this -> keyword = $keyword ; 4 if (!$noparse { ) 5 $parser = new parserDescParser; 6 $parser -> subscribe('*', $this ); 7 $parser -> parse( value-> $ value, true, 'parserstringwithinlinetags'); 8 } else { 9 $this -> value =$value; 10 } 11 }

string function parserTag::Convert(&$converter) [line 108] Function Parameters:

Converter &$converter the converter object

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 743 of 1382

Perform the output conversion on this parserTag using theoutput converter that is passed in

See Converter TODO CS cleanup - rename to convert for camelCase rule

string function parserTag::getString() [line 173]

Returns the text minus any inline tags

See parserStringWithInlineTags::getString()

void function parserTag::HandleEvent($a, $desc) [line 162] Function Parameters:

integer $a not used array $desc array of parserStringWithInlineTags the tag description

representing paragraphs in

Called by theparserDescParser when processing a description.

See parserTag::parserTag() TODO CS cleanup - rename to handleEvent for camelCase rule

Class parserTutorialTag
[line 995]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 744 of 1382

represents "@tutorial" This is exactly like @see except that it only links to tutorials

Package phpDocumentor Sub-Package DocBlockTags Tutorial phpDocumentor Tutorials Tutorial @tutorial Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

parserTutorialTag::$keyword string = 'tutorial' [line 1001]

Always "tutorial"
string|bool function parserTutorialTag::Convert(&$converter) [line 1012] Function Parameters:

Converter &$converter the output converter

process this tag through the given output converter

See parserStringWithInlineTags::Convert() TODO CS cleanup - rename to convert for camelCase rule

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 745 of 1382

Class parserUsedByTag
[line 932]

This is a virtual tag, it is created by @uses to cross-reference the used element This is exactly like @uses.

Package phpDocumentor Sub-Package DocBlockTags Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

parserUsedByTag::$keyword string = 'usedby' [line 938]

Always "usedby"
Constructor void function parserUsedByTag::parserUsedByTag($link, $description) [line 950] Function Parameters:

abstractLink $link link of element that uses this element string $description description of how the element is used

set up the usedby tag


string function parserUsedByTag::Convert(&$c) [line 964] Function Parameters:

Converter &$c the output converter

process this tag through the given output converter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 746 of 1382

TODO CS cleanup - rename to convert for camelCase rule

Class parserUsesTag
[line 838]

represents the "@uses" tag This is exactly like @see except that the element used has a @useby link to this element added to its docblock

Package phpDocumentor Sub-Package DocBlockTags Tutorial @uses Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

parserUsesTag::$keyword string = 'uses' [line 844]

Always "uses"
Constructor void function parserUsesTag::parserUsesTag($seeel, $description) [line 857] Function Parameters:

string $seeel element to link to parserStringWithInlineTags $description description of how

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 747 of 1382

the element is used

set up the uses tag


string function parserUsesTag::Convert(&$c) [line 879] Function Parameters:

Converter &$c the output converter

Return a link to documentation for other element, and description of how it is used Works exactly like parent::Convert() except that it also includes a description of how the element used is used.

TODO CS cleanup - rename to convert for camelCase rule

parserStringWithInlineTags function parserUsesTag::getDescription() [line 908]

Get the description of how the element used is being used.

Usedby phpDocumentor_IntermediateParser::addUses() - used to initialize $uses

Class parserVarTag
[line 576]

represents the "@var" tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 748 of 1382

Package phpDocumentor Sub-Package DocBlockTags Tutorial @var Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

parserVarTag::$keyword string = 'var' [line 582]

always 'var'
parserVarTag::$returnType string = 'mixed' [line 587]

the type a var has

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 749 of 1382

Errors.inc
Error handling for phpDocumentor phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2001-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Errors Author Greg Beaver < [email protected]> Version CVS: $Id: Errors.inc 253641 2008-02-24 02:35:44Z ashnazg $ Copyright 2001-2008 Gregory Beaver See parserDocBlock, parserInclude, parserPage, parserClass See parserDefine, parserFunction, parserMethod, parserVar Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 0.4 License LGPL Filesource Source Code for this file

$phpDocumentor_errors ErrorTracker = new ErrorTracker [line 1097]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 750 of 1382

Name $phpDocumentor_errors

$phpDocumentor_error_descrip array = array( PDERROR_UNTERMINATED_INLINE_TAG =&gt; 'Inline tag {@%s} in tag %s is unterminated, &quot;%s&quot;' , PDERROR_CLASS_EXISTS =&gt; 'Class %s already exists in package &quot;%s&quot;' , PDERROR_CONVERTER_NOT_FOUND =&gt; 'Converter %s specified by --output command-line option is not a class' , PDERROR_NO_CONVERTERS =&gt; 'No Converters have been specified by --output command-line option' , PDERROR_ACCESS_WRONG_PARAM =&gt; '@access was passed neither &quot;public&quot; nor &quot;private.&quot; Was passed: &quot;%s&quot;' , PDERROR_MULTIPLE_ACCESS_TAGS =&gt; 'DocBlock has multiple @access tags, illegal. ' . 'ignoring additional tag &quot;@access %s&quot;' , PDERROR_MULTIPLE_RETURN_TAGS =&gt; 'DocBlock has multiple @return tags, illegal. ' . 'ignoring additional tag &quot;@return %s %s&quot;' , PDERROR_MULTIPLE_VAR_TAGS =&gt; 'DocBlock has multiple @var tags, illegal. ' . 'ignoring additional tag &quot;@var %s %s&quot;' , PDERROR_MULTIPLE_PACKAGE_TAGS =&gt; 'DocBlock has multiple @package tags, illegal. ' . 'ignoring additional tag &quot;@package %s&quot;' , PDERROR_MULTIPLE_SUBPACKAGE_TAGS =&gt; 'DocBlock has multiple @subpackage tags, illegal. ' . 'ignoring additional tag &quot;@subpackage %s&quot;' , PDERROR_ILLEGAL_PACKAGENAME =&gt; '@%s tag has illegal %s name &quot;%s&quot;' , PDERROR_OVERRIDDEN_PACKAGE_TAGS =&gt; '%s %s\'s DocBlock has @package tag, illegal. ' . 'ignoring tag &quot;@package %s&quot;' , PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS =&gt; '&quot;%s&quot; %s\'s DocBlock has @subpackage tags, illegal. ' . 'ignoring tag &quot;@subpackage %s&quot;' , PDERROR_CLASS_CONFLICT =&gt; 'class &quot;%s&quot; has multiple declarations in package %s, ' . 'in file %s and file %s, documentation will have output errors!' ,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 751 of 1382

PDERROR_MULTIPLE_NAME_TAGS =&gt; 'DocBlock has multiple @name tags, illegal. ' . 'ignoring additional tag &quot;@name %s&quot;' , PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE =&gt; '-po (packageoutput) option deletes parent file &quot;%s&quot; containing class' . ' &quot;%s.&quot;' . &quot;\n&quot; . ' Try using --defaultpackagename (-dn) %s to ' . 'include the parent file in the same package as the class' , PDERROR_GLOBAL_NOT_FOUND =&gt; 'global variable %s specified in @global tag was never found' , PDERROR_MULTIPLE_GLOBAL_TAGS =&gt; '@global define tag already used for global variable &quot;%s&quot;, ' . 'ignoring @global %s' , PDERROR_MALFORMED_GLOBAL_TAG =&gt; 'incorrect @global syntax. ' . 'Should be @global vartype $varname or @global vartype description' , PDERROR_UNKNOWN_COMMANDLINE =&gt; 'Unknown command-line option &quot;%s&quot; encountered, use phpdoc -h for help' , PDERROR_NEED_WHITESPACE =&gt; 'phpDocumentor programmer error - wordparser whitespace set to false ' . 'in handleDocBlock, notify developers. You should never see this error' , PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND =&gt; '{@source} tag used in a docblock that isn\'t preceding a function' , PDERROR_UNMATCHED_LIST_TAG =&gt; 'unmatched ol or ul tag in DocBlock, parsing will be incorrect' , PDERROR_CANT_NEST_IN_B =&gt; 'Can\'t nest a code, pre, ul, or ol tag in a b tag in ' . 'phpDocumentor DocBlock (%s tag nested)' , PDERROR_UNMATCHED_TUTORIAL_TAG =&gt; 'While parsing extended documentation, &quot;%s&quot; tag was matched ' . 'with &quot;%s&quot; endtag, missing endtag'.&quot;\ntag contents:\&quot;%s\&quot;&quot; , PDERROR_CANT_HAVE_INLINE_IN_TAGNAME =&gt; 'Can\'t have an inline tag inside a package page XML tag!' , PDERROR_TUTORIAL_IS_OWN_CHILD =&gt; 'Tutorial %s lists itself as its own child in %s, illegal' , PDERROR_TUTORIAL_IS_OWN_GRANDPA =&gt; 'Tutorial %s\'s child %s lists %s as its child in %s, illegal' , PDERROR_PDFFUNCTION_NO_FUNC =&gt; 'Invalid pdffunction syntax: &quot;&lt;pdffunction: /&gt;&quot;, ' . 'should be &quot;&lt;pdffunction:functionname [arg=&quot;value&quot;...]/&gt;&quot;' , PDERROR_PDF_TEMPVAR_DOESNT_EXIST =&gt; '&lt;pdffunction:%s arg=%s /&gt; called ' .

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 752 of 1382

'but temporary variable &quot;%s&quot; doesn\'t exist' , PDERROR_UNTERMINATED_ATTRIB =&gt; 'Tutorial tag %s attribute %s is unterminated, current value &quot;%s&quot;' , PDERROR_NO_CONVERTER_HANDLER =&gt; 'Handler for element of type &quot;%s&quot; called, but %s is not a method of %s' , PDERROR_INLINETAG_IN_SEE =&gt; 'Inline tags are not allowed in a @see tag' , PDERROR_ID_MUST_BE_INLINE =&gt; '&lt;%s id=&quot;%s&quot;&gt; must be &lt;%s id=&quot;{@id %s}&quot;&gt;' , PDERROR_INTERNAL_NOT_CLOSED =&gt; '{@internal was never terminated with }}' , PDERROR_CONVERTER_OVR_GFCT =&gt; 'Converter &quot;%s&quot; must override getFormattedClassTrees() but doesn\'t' , PDERROR_TEXT_OUTSIDE_LI =&gt; 'Text cannot be outside of li tag in a DocBlock list, ' . 'parsing will be incorrect' , PDERROR_UNCLOSED_TAG =&gt; 'Unclosed %s tag in DocBlock, parsing will be incorrect' , PDERROR_TAG_NOT_HANDLED =&gt; '&quot;%s&quot; tag is not available in PHP built without tokenizer support, tag ignored' , PDERROR_MALFORMED_TAG =&gt; '&quot;%s&quot; tag was used without any parameters, illegal' , PDERROR_MULTIPLE_CATEGORY_TAGS =&gt; 'package has multiple @category tags, ignoring &quot;@category %s&quot;' , PDERROR_TEMPLATEDIR_DOESNT_EXIST =&gt; 'template directory &quot;%s&quot; does not exist' , PDERROR_UNTERMINATED_ENTITY =&gt; 'entity &amp;%s is unterminated' , PDERROR_FUNCTION_HAS_NONAME =&gt; 'function has no name (PHP error - test your file before parsing!)' , PDERROR_CANNOT_EXTEND_SELF =&gt; 'class %s cannot extend itself - TEST YOUR CODE BEFORE PARSING' , PDERROR_DUMB_USES =&gt; '@uses can only link to string data' , PDERROR_UL_IN_UL =&gt; 'ul/ol tags cannot be directly nested inside ul/ol, nest inside li' , PDERROR_INVALID_VALUES =&gt; 'command %s was passed &quot;%s&quot; but must be one of %s' , PDERROR_NESTED_INTERNAL =&gt;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 753 of 1382

'{@internal}} cannot be nested inside {@internal}}' , PDERROR_DANGEROUS_PHP_BUG_EXISTS =&gt; 'Dangerous PHP Bug exists in PHP version %s that can be triggered ' . 'by this parse (see PHP Bug #%s and PEAR Bug #%s)' , PDERROR_LOOP_RECURSION_LIMIT_REACHED =&gt; 'An internal loop in PhpDocumentor has reached its preset ' . 'recursion limit, preventing a possible infinite loop condition.' ) [line 555]

Error messages for phpDocumentor parser errors

Name $phpDocumentor_error_descrip

$phpDocumentor_warning_descrip array = array( PDERROR_MULTIPLE_PARENT =&gt; 'Class %s has multiple possible parents, package inheritance aborted' , PDERROR_PARENT_NOT_FOUND =&gt; 'Class %s parent %s not found' , PDERROR_INHERITANCE_CONFLICT =&gt; 'Class %s in file %s has multiple possible parents named %s. ' . 'Cannot resolve name conflict,' . &quot;\n&quot; . ' try ignoring a file that contains the conflicting parent class' , PDERROR_UNKNOWN_TAG =&gt; 'Unknown tag &quot;@%s&quot; used' , PDERROR_IGNORE_TAG_IGNORED =&gt; '@ignore tag used for %s element &quot;%s&quot; will be ignored' , PDERROR_ELEMENT_IGNORED =&gt; &quot;\n&quot; . 'duplicate %s element &quot;%s&quot; in file %s will be ignored.' . &quot;\n&quot; . 'Use an @ignore tag on the original ' . 'if you want this case to be documented.' , PDERROR_PARSEPRIVATE =&gt; &quot;entire page %s ignored because of @access private.&quot; . &quot;\n&quot; . &quot;Choose -pp to enable parsing of private elements&quot; , PDERROR_CLASS_PARENT_NOT_FOUND =&gt; &quot;class %s in package %s parent not found in @see parent::%s&quot; , PDERROR_CLASS_NOT_IN_PACKAGE =&gt; &quot;class %s was not found in package %s&quot;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 754 of 1382

, PDERROR_DB_TEMPLATE_UNTERMINATED =&gt; 'docblock template never terminated with /**#@-*/' , PDERROR_PDF_METHOD_DOESNT_EXIST =&gt; '&lt;pdffunction:%s /&gt; called, but pdf method &quot;%s&quot; doesn\'t exist' , PDERROR_TUTORIAL_NOT_FOUND =&gt; &quot;tutorial \&quot;%s\&quot; not found, does it exist?&quot; , PDERROR_CHILD_TUTORIAL_NOT_FOUND =&gt; 'child tutorial &quot;%s&quot; listed in %s not found ' . 'in parent package &quot;%s&quot; subpackage &quot;%s&quot;' , PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND =&gt; 'tutorial %s subsection &quot;%s&quot; doesn\'t exist, ' . 'but its title was asked for' , PDERROR_NO_PACKAGE_TAG =&gt; 'no @package tag was used in a DocBlock for %s %s' , PDERROR_PRIVATE_ASSUMED =&gt; '%s &quot;%s&quot; is assumed to be @access private because its name ' . 'starts with _, but has no @access tag' , PDERROR_EXAMPLE_NOT_FOUND =&gt; 'example file &quot;%s&quot; does not exist' , PDERROR_SOURCE_TAG_IGNORED =&gt; '{@source} can only be used in the long description, ' . 'not in the short description: &quot;%s&quot;' , PDERROR_PACKAGECAT_SET =&gt; 'package %s is already in category %s, ' . 'will now replace with category %s' , PDERROR_SOURCECODE_IGNORED =&gt; 'sourcecode command-line option is ignored ' . 'when your PHP build has no tokenizer support' , PDERROR_INHERITDOC_DONT_WORK_HERE =&gt; '{@inheritdoc} can only be used in the docblock of a child class' , PDERROR_EMPTY_EXAMPLE_TITLE =&gt; 'Example file found at &quot;%s&quot; has no title, using &quot;%s&quot;' , PDERROR_DOCBLOCK_CONFLICT =&gt; 'Page-level DocBlock precedes &quot;%s %s&quot;, ' . 'use another DocBlock to document the source element' , PDERROR_NO_PAGE_LEVELDOCBLOCK =&gt; 'File &quot;%s&quot; has no page-level DocBlock, ' . 'use @package in the first DocBlock to create one' , PDERROR_DOCBLOCK_GOES_CLASS =&gt; 'DocBlock would be page-level, but precedes class &quot;%s&quot;, ' . 'use another DocBlock to document the file' , PDERROR_NO_DOCBOOK_ID =&gt;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 755 of 1382

'Tutorial section %s &quot;%s&quot; has no id=&quot;{@id subsection}&quot; tag ' . '({@id} for refentry)' , PDERROR_BEAUTIFYING_FAILED =&gt; 'Beautifying failed: %s' , PDERROR_NOTODO_INCLUDE =&gt; '@todo on an include element is ignored (line %s, file %s)' , PDERROR_UNDOCUMENTED_ELEMENT =&gt; '%s &quot;%s&quot; has no %s-level DocBlock.' , PDERROR_MISSING_PROPERTY_TAG_NAME =&gt; '@%s magic tag does not have name, illegal. Ignoring tag &quot;@%s %s %s&quot;' , PDERROR_NAME_ALIAS_SAME_AS_TARGET =&gt; '@name value is the same as the filename it is supposed to alias' ) [line 433]

Error messages for phpDocumentor parser warnings

Name $phpDocumentor_warning_descrip

void function addError($num, $data...) [line 1110] Function Parameters:

integer $num error number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

add an Error

See ErrorTracker::addError() TODO CS Cleanup - do I need to add $data to the method signature?

void function addErrorDie($num, $data...) [line 1134] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 756 of 1382

integer $num error number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

like addError()but exits parsing

Global Variable Used ErrorTracker $phpDocumentor_errors: repository for all errors generated by phpDocumentor See ErrorTracker::addError() TODO CS Cleanup - do I need to add $data to the method signature?

void function addWarning($num, $data...) [line 1160] Function Parameters:

integer $num warning number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

add a Warning

Global Variable Used ErrorTracker $phpDocumentor_errors: repository for all errors generated by phpDocumentor See ErrorTracker::addWarning() TODO CS Cleanup - do I need to add $data to the method signature?

PDERROR_ACCESS_WRONG_PARAM = 8 [line 77]

warning triggered when the arguments to @access are neither public nor private
PDERROR_BEAUTIFYING_FAILED = 66 [line 343]

warning triggered by an unterminated entity in a tutorial


PDERROR_CANNOT_EXTEND_SELF = 72 [line 384]

warning triggered if someone brilliant tries "class X extends X {"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 757 of 1382

PDERROR_CANT_HAVE_INLINE_IN_TAGNAME = 36 [line 204]

warning triggered when an inline tag is found inside an xml tag name in a package page

PDERROR_CANT_NEST_IN_B = 34 [line 195]

warning triggered when another tag is nested in &lt;b&gt; (not allowed in phpDocumentor)

PDERROR_CHILD_TUTORIAL_NOT_FOUND = 40 [line 223]

warning triggered when a tutorial's child in the .ini file doesn't exist in the package and subpackage of the parent

PDERROR_CLASS_CONFLICT = 17 [line 115]

warning triggered when classes in the same package have the same name
PDERROR_CLASS_EXISTS = 4 [line 59]

warning triggered when inheritance could be from more than one class
PDERROR_CLASS_NOT_IN_PACKAGE = 30 [line 176]

warning triggered when a getClassByPackage is called and can't find the class
PDERROR_CLASS_PARENT_NOT_FOUND = 29 [line 172]

warning triggered when an entire page is ignored because of @access private

TODO I think this description is a copy/paste that was never updated

PDERROR_CONVERTER_NOT_FOUND = 6 [line 68]

warning triggered when a converter is passed to phpDocumentor_IntermediateParser::addConverter() that is not a class

PDERROR_CONVERTER_OVR_GFCT = 54 [line 293]

warning triggered when a child converter doesn't override getFormattedClassTrees()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 758 of 1382

PDERROR_DANGEROUS_PHP_BUG_EXISTS = 80 [line 417]

warning triggered when the PHP version being used has dangerous bug/behavior
PDERROR_DB_TEMPLATE_UNTERMINATED = 32 [line 186]

warning triggered when a docblock template is never turned off with /**#@-* / (no space)

PDERROR_DOCBLOCK_CONFLICT = 68 [line 367]

warning triggered by a page-level docblock preceding a source element


1 2 3 4 5 6 <?php /** * Page-level DocBlock * @package pagepackage ***/ include 'file.php';

PDERROR_DOCBLOCK_GOES_CLASS = 70 [line 376]

warning triggered when the first docblock in a file with a @package tag precedes a class. In this case, the class gets the docblock.
PDERROR_DUMB_USES = 73 [line 388]

warning triggered by improper "@uses


PDERROR_ELEMENT_IGNORED = 25 [line 153]

blah"

warning triggered when a duplicate element is encountered that will be ignored by the documentor

PDERROR_EMPTY_EXAMPLE_TITLE = 63 [line 331]

warning triggered by @example path/to/example with no title


PDERROR_EXAMPLE_NOT_FOUND = 48 [line 265]

warning triggered when an example's path from @example /path/to/example.php is not found

PDERROR_FUNCTION_HAS_NONAME = 67 [line 354]

warning triggered by a function with no name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 759 of 1382

function ($params) { } triggers this error

PDERROR_GLOBAL_NOT_FOUND = 21 [line 133]

warning triggered when there are multiple @name tags in a docblock

TODO I think this description is a copy/paste that was never updated

PDERROR_ID_MUST_BE_INLINE = 51 [line 280]

warning triggered when an id attribute in a tutorial docbook tag is not an {@id} inline tag

PDERROR_IGNORE_TAG_IGNORED = 24 [line 148]

warning triggered when an @ignore tag is used in a DocBlock preceding a method, variable, include, or global variable

PDERROR_ILLEGAL_PACKAGENAME = 14 [line 101]

warning triggered when the package or subpackage name is illegal


PDERROR_INHERITANCE_CONFLICT = 5 [line 63]

warning triggered when inheritance could be from more than one class
PDERROR_INHERITDOC_DONT_WORK_HERE = 62 [line 327]

warning triggered by {@inheritdoc} in a non-inheritable situation


PDERROR_INLINETAG_IN_SEE = 50 [line 275]

warning triggered when an example's path from @example /path/to/example.php is not found

PDERROR_INTERNAL_NOT_CLOSED = 52 [line 284]

warning triggered when an {@internal}} tag is not closed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 760 of 1382

PDERROR_INVALID_VALUES = 75 [line 396]

warning triggered if a command line option does not have a valid value passed in
PDERROR_LOOP_RECURSION_LIMIT_REACHED = 82 [line 426]

warning triggered when the a loop recursion tripwire has been tripped
PDERROR_MALFORMED_GLOBAL_TAG = 23 [line 143]

warning triggered when there are multiple @name tags in a docblock

TODO I think this description is a copy/paste that was never updated

PDERROR_MALFORMED_TAG = 60 [line 319]

warning triggered by an empty tag


PDERROR_MISSING_PROPERTY_TAG_NAME = 79 [line 413]

warning triggered when any of {@property}}, {@property-read}}, {@property-write}}, or {@method}} tag does not have name

PDERROR_MULTIPLE_ACCESS_TAGS = 9 [line 81]

warning triggered when there are multiple @access tags in a docblock


PDERROR_MULTIPLE_CATEGORY_TAGS = 61 [line 323]

warning triggered by more than 1 @category tag


PDERROR_MULTIPLE_GLOBAL_TAGS = 22 [line 138]

warning triggered when there are multiple @name tags in a docblock

TODO I think this description is a copy/paste that was never updated

PDERROR_MULTIPLE_NAME_TAGS = 19 [line 123]

warning triggered when there are multiple @name tags in a docblock

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 761 of 1382

PDERROR_MULTIPLE_PACKAGE_TAGS = 12 [line 93]

warning triggered when there are multiple @package tags in a docblock


PDERROR_MULTIPLE_PARENT = 1 [line 46]

warning triggered when inheritance could be from more than one class
PDERROR_MULTIPLE_RETURN_TAGS = 10 [line 85]

warning triggered when there are multiple @return tags in a docblock


PDERROR_MULTIPLE_SUBPACKAGE_TAGS = 13 [line 97]

warning triggered when there are multiple @subpackage tags in a docblock


PDERROR_MULTIPLE_VAR_TAGS = 11 [line 89]

warning triggered when there are multiple @var tags in a docblock


PDERROR_NAME_ALIAS_SAME_AS_TARGET = 81 [line 422]

warning triggered when the alias value in an page-level docblock's @name tag is the same value as the target filename is it supposed to alias

PDERROR_NEED_WHITESPACE = 28 [line 167]

warning triggered when an entire page is ignored because of @access private

TODO I think this description is a copy/paste that was never updated

PDERROR_NESTED_INTERNAL = 76 [line 400]

warning triggered when {@internal}} is nested inside another {@internal}}


PDERROR_NOTODO_INCLUDE = 77 [line 404]

warning triggered when @todo is used on an include element


PDERROR_NO_CONVERTERS = 7 [line 73]

warning triggered when a converter is passed to phpDocumentor_IntermediateParser::addConverter() that is not a class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 762 of 1382

PDERROR_NO_CONVERTER_HANDLER = 49 [line 270]

warning triggered when an example's path from @example /path/to/example.php is not found

PDERROR_NO_DOCBOOK_ID = 71 [line 380]

warning triggered in tutorial parsing if there is a missing {@id} inline tag


PDERROR_NO_PACKAGE_TAG = 46 [line 254]

warning triggered when no @package tag is used in a page-level or class-level DocBlock

PDERROR_NO_PAGE_LEVELDOCBLOCK = 69 [line 371]

warning triggered when a file does not contain a page-level docblock


PDERROR_OVERRIDDEN_PACKAGE_TAGS = 15 [line 106]

warning triggered when there a @package tag is used in a function, define, method, var or include

PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS = 16 [line 111]

warning triggered when there a @subpackage tag is used in a function, define, method, var or include

PDERROR_PACKAGECAT_SET = 55 [line 298]

warning triggered when a package is already associated with a category, and a new association is found

PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE = 20 [line 128]

warning triggered when there are multiple @name tags in a docblock

TODO I think this description is a copy/paste that was never updated

PDERROR_PARENT_NOT_FOUND = 2 [line 50]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 763 of 1382

warning triggered when parent class doesn't exist


PDERROR_PARSEPRIVATE = 26 [line 157]

warning triggered when an entire page is ignored because of @access private


PDERROR_PDFFUNCTION_NO_FUNC = 41 [line 228]

warning triggered when a <pdffunction:funcname /> tag is used in the PDF Converter and no funcname is present (<pdffunction: />)

PDERROR_PDF_METHOD_DOESNT_EXIST = 42 [line 233]

warning triggered when a <pdffunction:funcname /> tag is used in the PDF Converter and funcname is not a Cezpdf method

PDERROR_PDF_TEMPVAR_DOESNT_EXIST = 43 [line 239]

warning triggered when a <pdffunction:funcname arg=$tempvar/> tag is used in the PDF Converter and "tempvar" is not set from the return of a previous pdffunction tag

PDERROR_PRIVATE_ASSUMED = 47 [line 260]

warning triggered when no @access private tag is used in a global variable/method/var with _ as first char in name and --pear was specified

PDERROR_SOURCECODE_IGNORED = 59 [line 315]

warning triggered by sourcecode="on", if PHP < 4.3.0


PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND = 31 [line 181]

warning triggered when a { @source } inline tag is used in a docblock not preceding a function

PDERROR_SOURCE_TAG_IGNORED = 53 [line 288]

warning triggered when an {@source} tag is found in a short description


PDERROR_TAG_NOT_HANDLED = 58 [line 311]

warning triggered by @filesource, if PHP < 4.3.0


PDERROR_TEMPLATEDIR_DOESNT_EXIST = 64 [line 335]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 764 of 1382

warning triggered by non-existent template directory


PDERROR_TEXT_OUTSIDE_LI = 56 [line 303]

warning triggered when text in a docblock list is not contained in an <li> opening tag

PDERROR_TUTORIAL_IS_OWN_CHILD = 38 [line 213]

warning triggered when a tutorial lists itself as a child tutorial


PDERROR_TUTORIAL_IS_OWN_GRANDPA = 39 [line 218]

warning triggered when a tutorial's child lists the parent tutorial as a child tutorial

PDERROR_TUTORIAL_NOT_FOUND = 37 [line 209]

warning triggered when a tutorial is referenced via @tutorial/{ @tutorial} and is not found

PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND = 44 [line 244]

warning triggered when a subsection's title is asked for, but the subsection is not found

PDERROR_UL_IN_UL = 74 [line 392]

warning triggered if <ul> is nested inside <ul> and not <li>


PDERROR_UNCLOSED_TAG = 57 [line 307]

warning triggered when a DocBlock html tag is unclosed


PDERROR_UNDOCUMENTED_ELEMENT = 78 [line 408]

warning triggered when a class or method hasn't got docblock


PDERROR_UNKNOWN_COMMANDLINE = 27 [line 162]

warning triggered when an entire page is ignored because of @access private

TODO I think this description is a copy/paste that was never updated

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 765 of 1382

PDERROR_UNKNOWN_TAG = 18 [line 119]

warning triggered when classes in the same package have the same name
PDERROR_UNMATCHED_LIST_TAG = 33 [line 190]

warning triggered when a docblock has an unmatched &lt;ol&gt; or &lt;ul&gt;


PDERROR_UNMATCHED_TUTORIAL_TAG = 35 [line 199]

warning triggered when a docbook tag is not properly matched


PDERROR_UNTERMINATED_ATTRIB = 45 [line 249]

warning triggered when a subsection's title is asked for, but the subsection is not found

PDERROR_UNTERMINATED_ENTITY = 65 [line 339]

warning triggered by an unterminated entity in a tutorial


PDERROR_UNTERMINATED_INLINE_TAG = 3 [line 55]

warning triggered when an {@inline tag} is not terminated (no } before the * / ending the comment)

Class ErrorTracker
[line 894]

contains all the errors/warnings

Package phpDocumentor Sub-Package Errors Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2001-2008 Gregory Beaver See ErrorTracker::$errors, ErrorTracker::$warnings

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 766 of 1382

Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

ErrorTracker::$curfile string = '' [line 909] ErrorTracker::$errors array = array() [line 900]

array ofRecordError s
ErrorTracker::$lasterror integer|false = false [line 919]

index in$errorsof last error triggered


ErrorTracker::$lastwarning integer|false = false [line 925]

index in$warningsof last warning triggered


ErrorTracker::$linenum integer = 0 [line 913] ErrorTracker::$warnings array = array() [line 905]

array ofRecordWarning s
void function ErrorTracker::addError($num, $data...) [line 993] Function Parameters:

integer $num error number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

add a new error to the $errorsarray

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 767 of 1382

TODO CS Cleanup - do I need to add $data to the method signature?

void function ErrorTracker::addErrorReturn($num, $data...) [line 1016] Function Parameters:

integer $num error number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

add a new error to the $errorsarray and returns the error string

TODO CS Cleanup - do I need to add $data to the method signature?

void function ErrorTracker::addWarning($num, $data...) [line 970] Function Parameters:

integer $num error number from Errors.inc string $data... up to 4 string parameters to sprintf() error number $num

into the error string for

add a new warning to the $warningsarray

TODO CS Cleanup - do I need to add $data to the method signature?

void function ErrorTracker::handleEvent($num, $data) [line 940] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 768 of 1382

integer $num parser-passed event (see PHPDOCUMENTOR_EVENT_NEWLINENUM, PHPDOCUMENTOR_EVENT_NEWFILE) mixed $data either a line number if $num is PHPDOCUMENTOR_EVENT_NEWLINENUM or a file name if $num is PHPDOCUMENTOR_EVENT_NEWFILE

This function subscribes to two events in the Parser in order to keep track of line number information and file name.
array function ErrorTracker::returnErrors() [line 1045]

Get sorted array of all non-fatal errors in parsing/conversion


string function ErrorTracker::returnLastError() [line 1077]

Get the error message of the last error


string function ErrorTracker::returnLastWarning() [line 1087]

Get the warning message of the last warning


array function ErrorTracker::returnWarnings() [line 1034]

Get sorted array of all warnings in parsing/conversion

Class RecordError
[line 843]

encapsulates error information

Package phpDocumentor Sub-Package Errors Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2001-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 769 of 1382

RecordError::$type string = 'phpDocumentor_error_descrip' [line 849]

name of global variable that descriptors for this warning/error is kept


string function RecordError::output([$string = false]) [line 858] Function Parameters:

string $string the error to print

prints the error

Class RecordWarning
[line 746]

encapsulates warning information

Package phpDocumentor Sub-Package Errors Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2001-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

RecordWarning::$data string = [line 767]

error string
RecordWarning::$file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 770 of 1382

string = false [line 757]

file this error occurred in


RecordWarning::$linenum integer = [line 762]

line number of the file this error occurred in


RecordWarning::$num string = [line 773]

error number

See Errors.inc

RecordWarning::$type string = 'phpDocumentor_warning_descrip' [line 752]

name of global variable that descriptors for this warning/error is kept


Constructor void function RecordWarning::RecordWarning($file, $linenum, $num, $data...) [line 785] Function Parameters:

string $file filename this error occurred in ($file) integer $linenum line number this error occurred on ($linenum) integer $num Error number defined in Errors.inc string $data... variable number of strings, up to 4,

Constructor

TODO CS Cleanup - do I need to add $data to the method signature? sprintf based on the error number

to

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 771 of 1382

void function RecordWarning::output([$string = false]) [line 809] Function Parameters:

string $string the warning to print

prints the warning

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 772 of 1382

InlineTags.inc
All abstract representations of inline tags are in this file phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package InlineTags Author Gregory Beaver < [email protected]> Version CVS: $Id: InlineTags.inc 286921 2009-08-08 05:01:24Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since separate file since 1.2 Filesource Source Code for this file License LGPL

Class parserExampleInlineTag
[line 567]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 773 of 1382

Represents the example inline tag, used to display an example file docblock or tutorial

inside a

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@example} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

Constructor mixed function parserExampleInlineTag::parserExampleInlineTag($value, $current_path, [$isTutorial = false]) [line 582] Function Parameters:

string $value format "filepath[ start [end]]" where start and end are line numbers with the end line number optional string $current_path full path to the current file, used to check relative directory locations bool $isTutorial if true, then this is in a tutorial

constructor

TODO replace tokenizer_ext constant with TOKENIZER_EXT for CS rule

string function parserExampleInlineTag::arrayConvert(&$c) [line 733] Function Parameters:

Converter &$c output converter

converter helper for PHP 4.3.0+

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 774 of 1382

Uses phpDocumentor_HighlightParser - Parses the tokenized source

string function parserExampleInlineTag::getProgramListing() [line 752]

Return the source for the example file, enclosed in a <programlisting> tag to use in a tutorial
void function parserExampleInlineTag::setSource($source, [$class = false]) [line 719] Function Parameters:

string|array $source source code string|bool $class class name if this is a method, if this is a method this will be true

boolean in php 4.3.0,

sets the source

Class parserIdInlineTag
[line 835]

Represents the inline {@id} tag for tutorials

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@id} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 775 of 1382

parserIdInlineTag::$category string = 'default' [line 851]

category of the {@id}


parserIdInlineTag::$id string = [line 866]

section/subsection name
parserIdInlineTag::$inlinetype string = 'id' [line 841]

always 'id'
parserIdInlineTag::$package string = 'default' [line 846]

package of the {@id}


parserIdInlineTag::$subpackage string = '' [line 856]

subpackage of the {@id}


parserIdInlineTag::$tutorial string = [line 861]

full name of the tutorial


Constructor void function parserIdInlineTag::parserIdInlineTag($category, $package, $subpackage, $tutorial, [$id = false]) [line 877] Function Parameters:

string $category category name string $package package name string $subpackage subpackage name string $tutorial tutorial name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 776 of 1382

string $id section/subsection name

constructor
string function parserIdInlineTag::Convert(&$c) [line 895] Function Parameters:

Converter &$c output converter

converter

TODO CS cleanup - rename to convert for camelCase rule Uses Converter::getTutorialId() - retrieve converter-specific ID

Class parserInheritdocInlineTag
[line 789]

Represents the inheritdoc inline tag, used by classes/methods/vars to inherit documentation from the parent class if possible

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@inheritdoc} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 777 of 1382

parserInheritdocInlineTag::$inlinetype string = 'inheritdoc' [line 795]

always 'inheritdoc'
Constructor void function parserInheritdocInlineTag::parserInheritdocInlineTag() [line 800]

Does nothing, overrides parent constructor


string function parserInheritdocInlineTag::Convert() [line 810]

only sets a warning and returns empty

TODO CS cleanup - rename to convert for camelCase rule

Class parserInlineTag
[line 61]

Use this element to represent an {@inline tag} like {@link}

Package phpDocumentor Sub-Package InlineTags Tutorial phpDocumentor Inline tags Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 778 of 1382

parserInlineTag::$inlinetype string = '' [line 79]

the name of the inline tag (like link)


parserInlineTag::$type string = 'inlinetag' [line 74]

Element type Type is used by many functions to skip the hassle of


1 if phpDocumentor_get_class($blah) == 'parserBlah'

always "inlinetag"

Constructor void function parserInlineTag::parserInlineTag($type, $value) [line 87] Function Parameters:

string $type tag type (example: link) string $value tag value (example: what to link to)

sets up the tag


string function parserInlineTag::getString() [line 117]

always gets an empty string

See parserStringWithInlineTags::getString() See parserStringWithInlineTags::trimmedStrlen() Usedby parserStringWithInlineTags::getString() - removes inline tag length, as it is indeterminate until conversion.

integer function parserInlineTag::Strlen() [line 99]

get length of the tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 779 of 1382

TODO CS cleanup - rename to strLen for camelCase rule

Class parserLinkInlineTag
[line 142]

represents inline links

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@link} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1 License LGPL

parserLinkInlineTag::$linktext string = '' [line 149]

text to display in the link, can be different from the link for standard links like websites

Constructor void function parserLinkInlineTag::parserLinkInlineTag($link, $text) [line 157] Function Parameters:

string $link stored in $value, see parserBase::$value string $text see $linktext

sets up the tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 780 of 1382

false|string function parserLinkInlineTag::Convert(&$c) [line 179] Function Parameters:

Converter &$c converter used to change the abstract link

into text for display

calls the output conversion

TODO CS cleanup - rename to convert for camelCase rule

string function parserLinkInlineTag::ConvertPart(&$c, $value) [line 204] Function Parameters:

Converter &$c the output converter string $value the tag value

convert part of the tag

TODO CS cleanup - rename to convertPart for camelCase rule

Class parserSourceInlineTag
[line 377]

represents inline source tag, used for function/method source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 781 of 1382

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@source} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

parserSourceInlineTag::$end '*'|integer = '*' [line 395]

Last line to display

Var If '*' then the whole source will be used, otherwise numbers will be displayed

the $start to $end line

parserSourceInlineTag::$inlinetype string = 'source' [line 383]

always 'source'
parserSourceInlineTag::$source string|array = false [line 401]

tokenized source organized by line numbers for php 4.3.0+, the old {@source} tag used a string

parserSourceInlineTag::$start integer = 1 [line 389]

First line of source code to display

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 782 of 1382

See parserSourceInlineTag::$end

Constructor void function parserSourceInlineTag::parserSourceInlineTag($value) [line 414] Function Parameters:

string $value format "start [end]", where start and end are line numbers with the end line number optional

constructor
string function parserSourceInlineTag::arrayConvert(&$c) [line 497] Function Parameters:

Converter &$c the output converter object

converter helper used in PHP 4.3.0+

Usedby parserSourceInlineTag::Convert() - in PHP 4.3.0+, this method is used to convert Uses phpDocumentor_HighlightParser - Parses the tokenized source

string function parserSourceInlineTag::Convert(&$c) [line 481] Function Parameters:

Converter &$c the output converter object

convert the tag

TODO CS cleanup - rename to convert for camelCase rule Uses parserSourceInlineTag::stringConvert() - in PHP 4.2.3-, this method is used to convert

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 783 of 1382

Uses parserSourceInlineTag::arrayConvert() - in PHP 4.3.0+, this method is used to convert

string function parserSourceInlineTag::getString() [line 444]

gets the source string


void function parserSourceInlineTag::setSource($source, [$class = false]) [line 459] Function Parameters:

string|array $source source code string|bool $class class name if this is a method, if this is a method this will be true

boolean in php 4.3.0,

sets the source tag's value


string function parserSourceInlineTag::stringConvert(&$c) [line 520] Function Parameters:

Converter &$c the output converter object

converter helper used in PHP 4.2.3-

Deprecated in favor of PHP 4.3.0+ arrayConvert() Usedby parserSourceInlineTag::Convert() - in PHP 4.2.3-, this method is used to convert Uses Converter::unmangle() - remove the extraneous stuff from http://www.php.net/highlight_string

int function parserSourceInlineTag::Strlen() [line 434]

only used to determine blank lines. {@source} will not be blank, probably

Class parserTocInlineTag
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 784 of 1382

[line 923]

Represents {@toc} for table of contents generation in tutorials

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@toc} Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

parserTocInlineTag::$inlinetype string = 'toc' [line 929]

always 'toc'
Constructor void function parserTocInlineTag::parserTocInlineTag() [line 956]

constructor
mixed function parserTocInlineTag::Convert(&$c) [line 1015] Function Parameters:

Converter &$c converter object

converter method array( 'tagname' => string name of tag, 'link' => tutorialLink to the tutorial, 'id' => converter specific tutorial ID from Converter::getTutorialId() 'title' => title of the tutorial) and returns the results as the table of contents

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 785 of 1382

TODO CS cleanup - rename to convert for camelCase rule Uses Converter::getTutorialId() - retrieve the tutorial ID for Uses Converter::formatTutorialTOC() - passes an array of format:

void function parserTocInlineTag::setPath($path) [line 990] Function Parameters:

string $path the path

set the path


void function parserTocInlineTag::setTOC($toc) [line 978] Function Parameters:

array $toc format: array( array( 'tag' => parserXMLDocBookTag, 'id' => parserIdInlineTag, 'title' => title ), ... )

set the TOC

Class parserTutorialInlineTag
[line 278]

Represents inline links to external tutorial documentation

Package phpDocumentor Sub-Package InlineTags Tutorial inline {@tutorial} Author Gregory Beaver < [email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 786 of 1382

Version Release: @VER@ Copyright 2002-2008 Gregory Beaver See parserStringWithInlineTags Link http://www.phpdoc.org Link http://pear.php.net/PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor License LGPL

Constructor void function parserTutorialInlineTag::parserTutorialInlineTag($link, $text) [line 286] Function Parameters:

string $link stored in $value, see parserBase::$value string $text see $linktext

constructor
mixed function parserTutorialInlineTag::Convert(&$c) [line 302] Function Parameters:

Converter &$c converter used to change the abstract link

into text for display

convert part of the tag

TODO CS cleanup - rename to convert for camelCase rule

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 787 of 1382

LinkClasses.inc
Linking to element documentation is performed by the classes in this file. abstractLink descendants contain enough information to differentiate every documentable element, and so can be converted to a link string by Converter::returnSee() phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version CVS: $Id: LinkClasses.inc 253641 2008-02-24 02:35:44Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2.0 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 788 of 1382

Class abstractLink
[line 61]

linking classes parent

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

abstractLink::$category string = '' [line 77] abstractLink::$fileAlias string = '' [line 70]

phpdoc alias _phpdoc_inc for phpdoc.inc


abstractLink::$name string = '' [line 76] abstractLink::$package string = '' [line 78] abstractLink::$path string = [line 66] abstractLink::$subpackage string = '' [line 79] abstractLink::$type string = '' [line 75]

element type linked to. can only be a documentable element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 789 of 1382

void function abstractLink::addLink($path, $fileAlias, $name, $package, $subpackage, [$category = false]) [line 94] Function Parameters:

string $path full path to file containing element string $fileAlias page name, as configured by Parser::parse string $name element name string $package package element is in string $subpackage subpackage element is in string $category optional category that documentation is in

sets up the link

Class classLink
[line 213]

class link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

classLink::$type string = 'class' [line 218]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 790 of 1382

Class constLink
[line 307]

class constant link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

constLink::$type string = 'const' [line 312]

Class defineLink
[line 167]

define link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

defineLink::$type string = 'define' [line 172]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 791 of 1382

Class functionLink
[line 144]

function link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

functionLink::$type string = 'function' [line 149]

Class globalLink
[line 190]

global variable link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 792 of 1382

License LGPL

globalLink::$type string = 'global' [line 195]

Class methodLink
[line 236]

method link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

methodLink::$class string = '' [line 245] methodLink::$type string = 'method' [line 241] void function methodLink::addLink($class, $path, $fileAlias, $name, $package, $subpackage, [$category = false]) [line 260] Function Parameters:

string $class class name string $path full path to file containing element string $fileAlias page name, as configured by Parser::parse string $name element name string $package package element is in string $subpackage subpackage element is in string $category optional category that documentation is in

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 793 of 1382

sets up the link

Class pageLink
[line 121]

procedural page link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

pageLink::$type string = 'page' [line 126]

Class tutorialLink
[line 330]

tutorial link

Package phpDocumentor Sub-Package Links Author Gregory Beaver < [email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 794 of 1382

Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

tutorialLink::$section string = '' [line 336] tutorialLink::$title string = false [line 337] tutorialLink::$type string = 'tutorial' [line 335] void function tutorialLink::addLink($section, $path, $name, $package, $subpackage, [$title = false], [$category = false]) [line 353] Function Parameters:

string $section section/subsection name string $path full path to file containing element string $name page name, as configured by Parser::parse string $package package element is in string $subpackage subpackage element is in string $title title of tutorial string $category optional category that documentation is in

sets up the link

Class varLink
[line 284]

class variable link

Package phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 795 of 1382

Sub-Package Links Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

varLink::$type string = 'var' [line 289]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 796 of 1382

ParserData.inc
Parser Data Structures phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package ParserData Author Gregory Beaver < [email protected]> Version CVS: $Id: ParserData.inc 253814 2008-02-26 12:15:56Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 License LGPL

Class parserBase
[line 710]

Base class for all elements

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 797 of 1382

Package phpDocumentor Sub-Package ParserData Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Abstract Element Since 1.0rc1 License LGPL

parserBase::$type string = 'base' [line 717]

Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah'... always base

parserBase::$value mixed = false [line 723]

set to different things by its descendants

Abstract Element

string function parserBase::getType() [line 730]

gets the type


mixed function parserBase::getValue() [line 752]

gets the value


void function parserBase::setValue($value) [line 742] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 798 of 1382

mixed $value set the value of this element

sets the given value

Class parserData
[line 363]

Contains an in-memory representation of all documentable elements ( parserPage , parserFunction, parserDefine, parserInclude, parserClass, parserMethod, parserVar) and their DocBlocks (parserDocBlock). This class works in coordination with phpDocumentor_IntermediateParser to take output from Parser::handleEvent() and create indexes, links, and other assorted things (all documented in phpDocumentor_IntermediateParser and Converter)

Package phpDocumentor Sub-Package ParserData Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 License LGPL

parserData::$classelements array = array() [line 395]

array of parsed class elements


parserData::$clean boolean = true [line 419]

used byphpDocumentor_IntermediateParser::handleDocBlock() to determine whether a docblock is a page-level docblock or not. $clean is true as long

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 799 of 1382

as only 0 or 1 docblock has been parsed, and no element other than parserPage has been parsed

parserData::$docblock mixed = false [line 424]

DocBlock parserDocBlockfor this page, or false if not set ( )


parserData::$elements array = array() [line 375]

array of parsed elements


parserData::$links array = array() [line 411]

array of links descended from abstractLink

See pageLink, defineLink, classLink, functionLink, methodLink, varLink

parserData::$parent false|parserPage = false [line 370]

parserPageelement that is this parserData's parent, or false if not set.


parserData::$privateclasselements array = array() [line 405]

array of parsed class elements with @access private


parserData::$privateelements array = array() [line 390]

array of parsed elements with @access private

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 800 of 1382

parserData::$tutorial parserTutorial|false = false [line 400] parserData::$type string = 'page' [line 438]

Type is used by many functions to skip the hassle of if


1 phpDocumentor_get_class($blah) == 'parserBlah'

always 'page', used in element indexing and conversion functions found in Converter

void function parserData::addElement(&$element) [line 449] Function Parameters:

parserElement &$element add a parsed element to the array, also sets $clean to false

$elements

add a new element to the tracking array


string function parserData::addLink(&$element, [$classorpackage = ''], [$subpackage = '']) [line 553] Function Parameters:

parserElement &$element element to add a new link (descended from abstractLink) to the $links array string $classorpackage classname for elements that are classbased (this may be deprecated in the future, as the classname should be contained within the element. if $element is a page, this parameter is a package name string $subpackage subpackage name for page elements

adds a link
void function parserData::addTutorial($t, &$c) [line 499] Function Parameters:

parserTutorial $t a tutorial parser Converter &$c the output converter

adds a tutorial parser

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 801 of 1382

bool function parserData::explicitDocBlock() [line 532]

Tells this page that its DocBlock was not implicit


array function parserData::getClasses(&$c) [line 633] Function Parameters:

Converter &$c output converter

returns a list of all classes declared in a file


string function parserData::getLink(&$c, [$text = false]) [line 615] Function Parameters:

Converter &$c the output converter bool $text a text flag

returns a link
string function parserData::getName() [line 650]

Get the output-safe filename (. changed to _)


tutorialLink function parserData::getTutorial() [line 512]

If this file has a tutorial associated with it, returns a link to the tutorial.
boolean function parserData::hasClasses() [line 486]

Does this package have classes?


bool function parserData::hasExplicitDocBlock() [line 522]

If the page-level DocBlock was present in the source, returns true


bool function parserData::hasInterfaces() [line 476]

Does this package have interfaces?


bool function parserData::isClean() [line 674]

checks if the element is "cleaned" already

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 802 of 1382

void function parserData::setDocBlock(&$docblock) [line 687] Function Parameters:

parserDocBlock &$docblock docblock element

sets the docblock

See parserDocBlock

void function parserData::setParent(&$parent) [line 664] Function Parameters:

parserPage &$parent parent element of this parsed data

sets the parent

Class parserPage
[line 59]

Contains information about a PHP file, used to group procedural elements together.

Package phpDocumentor Sub-Package ParserData Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.0rc1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 803 of 1382

License LGPL

parserPage::$category string = 'default' [line 97] parserPage::$file string = '' [line 76]

filename.ext (no path)


parserPage::$id string = '' [line 71]

not implemented in this version, will be used to link xml output pages
parserPage::$modDate string = '' [line 115]

not implemented yet file modification date, will be used for makefiles

parserPage::$name string = '' [line 86]

phpdoc-safe name (only letters, numbers and _)


parserPage::$origName string = '' [line 93]

original phpdoc-safe name (only letters, numbers and _) This fixes [ 1391432 ] Too many underscores in include links.

parserPage::$package string = 'default' [line 101] parserPage::$packageOutput mixed = false [line 132]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 804 of 1382

Used to limit output, contains contents of --packageoutput commandline. Does not increase parsing time. Use --ignore for that

Var either false or an array of packages See phpDocumentor_IntermediateParser::$packageoutput, Converter::$package_output

parserPage::$parserVersion string = PHPDOCUMENTOR_VER [line 109] parserPage::$path string = '' [line 119]

Var full path this page represents

parserPage::$source array = array() [line 124]

Tokenized source code of the file


parserPage::$sourceLocation string = '' [line 81]

relative source location


parserPage::$subpackage string = '' [line 105] parserPage::$type string = 'page' [line 66]

Type is used by many functions to skip the hassle of if


1 phpDocumentor_get_class($blah) == 'parserBlah'

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 805 of 1382

Constructor void function parserPage::parserPage() [line 139]

sets package to default package

Global Variable Used string $phpDocumentor_DefaultPackageName: default package name

string|bool function parserPage::getFile() [line 188]

gets the file name


string function parserPage::getName() [line 273]

gets the name


array function parserPage::getPackageOutput() [line 247]

gets the package output array

See phpDocumentor_IntermediateParser::$packageoutput

bool function parserPage::getParseData() [line 333]

Not implemented in this version


string function parserPage::getPath() [line 219]

gets the path


string function parserPage::getSourceLocation($c, [$pearize = false]) [line 307] Function Parameters:

Converter $c the output converter bool $pearize if this parameter is true, to the subdirectory of pear

it will truncate the source location

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 806 of 1382

gets the source location

TODO determine if the str_replace in the 'pear/' ELSE branch should be removed (see Documentation/tests/bug1574043.php). It does NOT exist in the similar function parserClass->getSourceLocation() in ParserElements.inc.

string function parserPage::getType() [line 150]

gets the tag type


void function parserPage::setFile($file) [line 177] Function Parameters:

string $file the file name

Sets the name to display in documentation (can be an alias set with @name)
void function parserPage::setName($name) [line 261] Function Parameters:

string $name phpdoc-safe name (only _, numbers and letters) Parser::parse()

set by

sets the name

See Parser::parse()

void function parserPage::setPackageOutput($packages) [line 236] Function Parameters:

array $packages array of packages to display in documentation (package1,package2,...)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 807 of 1382

loads the package output array

See phpDocumentor_IntermediateParser::$packageoutput

void function parserPage::setPath($path) [line 203] Function Parameters:

string $path full path to file

sets the path to the file


void function parserPage::setSource($source) [line 165] Function Parameters:

string|array $source the token array/string

Sets the source code of the file for highlighting. PHP 4.3.0+ passes an array of tokenizer tokens by line number. PHP 4.2.3- passes a string to be passed to http://www.php.net/highlight_string

void function parserPage::setSourceLocation($source) [line 288] Function Parameters:

string $source path of this file relative to program root

sets the source location

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 808 of 1382

Class parserStringWithInlineTags
[line 776]

Used to represent strings that contain inline tags, so that they can be properly parsed at link time

Package phpDocumentor Sub-Package ParserData Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.0rc1 License LGPL

parserStringWithInlineTags::$type string = '_string' [line 784]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'... always '_string'

the

hassle

of

if

parserStringWithInlineTags::$value array = array() [line 795]

array of strings and parserInlineTag s Format: array(string1,string2,parserInlineTag1,string3,parserInlineTag2,...)

void function parserStringWithInlineTags::add($stringOrInlineTag) [line 804] Function Parameters:

mixed $stringOrInlineTag either a string or a parserInlineTag

equivalent to the . operator ($a = $b . $c)


string function parserStringWithInlineTags::Convert(&$converter, [$postprocess = true], [$trim = true]) [line 924]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 809 of 1382

Function Parameters:

Converter &$converter the output converter bool $postprocess true if one needs to postprocess bool $trim false if the output should not be trimmed

Use to convert the string to a real string with all inline tags parsed and linked

See Converter::returnSee() TODO CS cleanup - rename to convert for camelCase rule

string function parserStringWithInlineTags::getString([$trim = true]) [line 896] Function Parameters:

bool $trim whether to trim the string

return the string unconverted (all inline tags are taken out - this should only be used in pre-parsing to see if any other text is in the string)

Uses parserInlineTag::getString() - removes inline tag length, as it is indeterminate until conversion.

bool function parserStringWithInlineTags::hasInlineTag() [line 835]

Determine whether the string contains any inline tags

Tutorial phpDocumentor Inline tags

void function parserStringWithInlineTags::setSource($source) [line 853]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 810 of 1382

Function Parameters:

string|array $source source code ready to be highlighted

Pass source code to any {@source} tags contained within the string conversion.
integer function parserStringWithInlineTags::trimmedStrlen() [line 868]

for later

equivalent to trim(strlen($string))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 811 of 1382

ParserDocBlock.inc
DocBlock Parser Classes phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package ParserDocBlock Author Gregory Beaver < [email protected]> Version CVS: $Id: ParserDocBlock.inc 287886 2009-08-30 05:31:05Z ashnazg $ Copyright 2002-2006 Gregory Beaver See Parser, WordParser Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.0rc1 License LGPL

Class parserDesc
[line 47]

represents a short or long description in a DocBlock ( parserDocBlock )

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 812 of 1382

Package phpDocumentor Sub-Package ParserDocBlock Author Greg Beaver < [email protected]> Version $Id: ParserDocBlock.inc 287886 2009-08-30 05:31:05Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserDesc::$type string = '_desc' [line 54]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah' always '_desc'

the

hassle

of

if

void function parserDesc::add($stringOrClass) [line 60] Function Parameters:

mixed $stringOrClass like parserStringWithInlineTags::add(), this can be a string or parserInlineTag, but it can also be a parserStringWithInlineTags, and the contents will be merged

boolean function parserDesc::hasInheritDoc() [line 81] boolean function parserDesc::hasSource() [line 92] void function parserDesc::replaceInheritDoc($desc) [line 104] Function Parameters:

parserDesc $desc parent parserDesc, used to retrieve the description

replaces {@inheritdoc} with the contents of the parent DocBlock

Class parserDocBlock
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 813 of 1382

[line 129]

Represents a docblock and its components, $desc, $sdesc $tags, and also , $params for functions

Package phpDocumentor Sub-Package ParserDocBlock Author Greg Beaver < [email protected]> Version $Id: ParserDocBlock.inc 287886 2009-08-30 05:31:05Z ashnazg $ Since 1.0rc1

parserDocBlock::$category string = [line 219] parserDocBlock::$desc parserDesc = false [line 134] parserDocBlock::$endlinenumber false|integer = false [line 158]

Line number in the source on which this docblock ends

Since 1.2

parserDocBlock::$explicitcategory boolean = false [line 217]

fix for bug 708559

Usedby parserDocBlock::setExplicitCategory()

parserDocBlock::$explicitpackage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 814 of 1382

boolean = false [line 212]

fix for bug 591396

Usedby parserDocBlock::setExplicitPackage()

parserDocBlock::$funcglobals array = array() [line 184]

array of global variable data. Format: array(index of global variable in @global tag list -OR- global variable name => array(datatype,parserStringWithInlineTags),...)

parserDocBlock::$hasaccess boolean = false [line 227]

whether this DocBlock has an @access tag


parserDocBlock::$hasname boolean = false [line 231]

whether this DocBlock has a @name tag


parserDocBlock::$linenumber false|integer = false [line 152]

Line number in the source on which this docblock begins

Since 1.2

parserDocBlock::$package string = 'default' [line 221]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 815 of 1382

parserDocBlock::$packagedescrip string = '' [line 237]

description of package parsed from @package tag Unused in this version

parserDocBlock::$params array = array() [line 176]

array of param data. Format: array(index of param in function parameter list -OR- parameter name => parserStringWithInlineTags,...)

parserDocBlock::$processed_desc array = false [line 138]

Var array of parserDescs

parserDocBlock::$processed_sdesc array = false [line 142]

Var array of parserDescs

parserDocBlock::$properties mixed = array() [line 197]

array of parserPropertyTag parserPropertyReadTag parserPropertyWriteTag , , , parserMethodTag magic tags


parserDocBlock::$return mixed = false [line 202]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 816 of 1382

This is either a parserReturnTag false if no return tag is present or


parserDocBlock::$sdesc parserDesc = false [line 146] parserDocBlock::$statics array = array() [line 193]

array of static variable data. Format: array(index of static variable in @global tag list -OR- static variable name => parserStaticvarTag,...)

parserDocBlock::$subpackage string = '' [line 223] parserDocBlock::$subpackagedescrip string = '' [line 243]

description of subpackage parsed from @package tag Unused in this version

parserDocBlock::$tags array = array() [line 163]

array ofparserTag s
parserDocBlock::$unknown_tags array = array() [line 168]

array of unrecognized parserTag s


parserDocBlock::$var mixed = false [line 207]

This is either a parserVarTagor false if no var tag is present


Constructor void function parserDocBlock::parserDocBlock() [line 256]

sets package to default

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 817 of 1382

Global Variable Used string $phpDocumentor_DefaultPackageName: default package name

void function parserDocBlock::addAccess($value) [line 916] Function Parameters:

string $value should be either public or private

add an @access tag to the tags array


void function parserDocBlock::addExample($value, $path) [line 641] Function Parameters:

string $value contents of the tag string $path path to the file containing this tag

adds an @example tag


void function parserDocBlock::addFileSource($path, $source) [line 943] Function Parameters:

string $path full path to the file array $source tokenized source code, ordered by line number

Adds a new @filesource tag to the DocBlock

Tutorial @filesource

void function parserDocBlock::addFuncGlobal($type, $value) [line 857] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 818 of 1382

string $type global type string $value description of how the global is used in the function

adds a function declaration of @global to the $funcglobals array


void function parserDocBlock::addKeyword($keyword, $value) [line 609] Function Parameters:

string $keyword tag name parserStringWithInlineTags $value the contents of the tag

Global Variable Used array $_phpDocumentor_setting: used to determine whether to add the @internal tag or not

void function parserDocBlock::addLink($link) [line 953] Function Parameters:

string $link

creates a parserLinkTag and adds it to the $tags array


void function parserDocBlock::addName($value) [line 825] Function Parameters:

string $value new name of element

Adds a @name tag to the tag list


void function parserDocBlock::addPackage($keyword, $value) [line 728] Function Parameters:

string $keyword tag name (either package or subpackage)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 819 of 1382

mixed $value either a string or a parserStringWithInlineTags. Strips all inline tags and use the text as the package

void function parserDocBlock::addParam($paramVar, $paramType, $value) [line 520] Function Parameters:

string $paramVar if empty, param is indexed in the order received and set using changeParam() parserStringWithInlineTags $value $paramType

void function parserDocBlock::addProperty($tagName, $propertyName, $propertyType, $value) [line 1033] Function Parameters:

$tagName $propertyName $propertyType $value

Adds a @property(-read or -write) or @method magic tag to the DocBlock


void function parserDocBlock::addReturn($returnType, $value) [line 976] Function Parameters:

string $returnType the one-word name of the return type (mixed should be used if more than one type) parserStringWithInlineTags $value

creates a parserReturnTag and adds it to the $tags array


void function parserDocBlock::addSee($keyword, $value) [line 964] Function Parameters:

string $value string $keyword either see or uses

creates a parserLinkTag and adds it to the $tags array

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 820 of 1382

void function parserDocBlock::addStaticVar($staticvar, $type, $descrip) [line 844] Function Parameters:

string $staticvar if empty, staticvar is indexed in the order received and set using changeStatic() string $type data type parserStringWithInlineTags $descrip

void function parserDocBlock::addTag($tag) [line 587] Function Parameters:

parserTag $tag tag

Used to insert DocBlock Template tags into a docblock

Global Variable Used array $_phpDocumentor_setting: used to determine whether to add ignored tags, or not

void function parserDocBlock::addUnknownTag($keyword, $value) [line 651] Function Parameters:

string $keyword tag name string $value tag value

adds an unknown tag to the $unknown_tags array for use by custom converters
void function parserDocBlock::addUses($seeel, $description) [line 1024] Function Parameters:

string $seeel @see-style text, used for Converter::getLink() parserStringWithInlineTags $description description of how the used element is used

Add a @uses tag to the DocBlock

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 821 of 1382

Tutorial @uses

void function parserDocBlock::addVar($varType, $value) [line 993] Function Parameters:

string $varType the one-word name of the variable type (mixed should be used if more than one type) parserStringWithInlineTags $value

creates a parserVarTagand adds it to the $tags array


void function parserDocBlock::canSource() [line 320]

Tells the DocBlock it can have a @filesource tag Only page-level DocBlocks may have a @filesource tag

void function parserDocBlock::cantSource() [line 330]

Tells the DocBlock it can't have a @filesource tag Only page-level DocBlocks may have a @filesource tag

void function parserDocBlock::changeGlobal($index, $name) [line 866] Function Parameters:

integer $index index of parameter in the $funcglobals array string $name name of the parameter to set in the $funcglobals array

void function parserDocBlock::changeParam($index, $name, $type) [line 537] Function Parameters:

integer $index index of parameter in the $params array string $name name of the parameter to set in the $params array string|null $type type of the parameter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 822 of 1382

void function parserDocBlock::changeStatic($index, $name) [line 876] Function Parameters:

integer $index index of parameter in the $statics array string $name name of the parameter to set in the $statics array

string function parserDocBlock::getDesc(&$converter) [line 498] Function Parameters:

Converter &$converter takes $desc and converts it to a string and returns it if present, otherwise returns ''

integer function parserDocBlock::getEndLineNumber() [line 294]

Retrieve ending line number


boolean function parserDocBlock::getExplicitCategory() [line 719]

If the DocBlock has a @category tag, then this returns true


boolean function parserDocBlock::getExplicitPackage() [line 698]

If the DocBlock has a @package tag, then this returns true


mixed function parserDocBlock::getKeyword($keyword) [line 1076] Function Parameters:

string $keyword

integer function parserDocBlock::getLineNumber() [line 276]

Retrieve starting line number


string function parserDocBlock::getSDesc(&$converter) [line 476] Function Parameters:

Converter &$converter takes $sdesc and converts it to a string and returns it if present, otherwise returns ''

string function parserDocBlock::getType() [line 1141] boolean function parserDocBlock::hasInheritDoc() [line 453]

Wrapper forparserDesc::hasInheritDoc()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 823 of 1382

array function parserDocBlock::listParams() [line 1091] array function parserDocBlock::listProperties() [line 1109] void function parserDocBlock::listTags(0) [line 1125] Function Parameters:

Converter 0

void function parserDocBlock::overridePackage($category, $package, $subpackage, $elname, $type) [line 666] Function Parameters:

string $category string $package string $subpackage string $elname element name string $type element type (include, define, var, method, global, function, const)

set

the element's package to the passed values. Used in phpDocumentor_IntermediateParser to align package of elements inside a class or procedural page to the package of the class/procedural page

void function parserDocBlock::postProcess() [line 304]

Parse out any html tags from doc comments, and make them into abstract structures

Uses parserDescParser::parse()

void function parserDocBlock::replaceInheritDoc($desc) [line 465] Function Parameters:

parserDesc $desc

Wrapper forparserDesc::replaceInheritDoc()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 824 of 1382

Also replaces {@inheritdoc} in the $processed_desc

void function parserDocBlock::resetParams() [line 528] void function parserDocBlock::setDesc($desc) [line 438] Function Parameters:

parserDesc|parserDocBlock $desc sets $desc

void function parserDocBlock::setEndLineNumber($number) [line 285] Function Parameters:

integer $number

Sets the ending line number for the DocBlock


void function parserDocBlock::setExplicitCategory() [line 710]

Used if this docblock has a @category tag. phpDocumentor will guess category for DocBlocks that don't have a @category tag

Uses parserDocBlock::$explicitcategory

void function parserDocBlock::setExplicitPackage() [line 689]

Used if this docblock has a @package tag. phpDocumentor will guess package for DocBlocks that don't have a @package tag

Uses parserDocBlock::$explicitpackage

void function parserDocBlock::setLineNumber($number) [line 267] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 825 of 1382

integer $number

Sets the starting line number for the DocBlock


void function parserDocBlock::setShortDesc($desc) [line 396] Function Parameters:

parserDesc|parserDocBlock|parserTag $desc sets $sdesc

Set the short description of the DocBlock Setting the short description is possible by passing in one of three parameters: another DocBlock's short description another DocBlock, the short description will be extracted a Zend Studio-compatible @desc tag

possible

void function parserDocBlock::setSource($source, [$class = false]) [line 426] Function Parameters:

string|array $source tokenized highlight-ready source code false|string $class name of class if this is a method source

Passes toparserStringWithInlineTags::setSource() After passing, it calls postProcess() to set up the new source

void function parserDocBlock::updateGlobals($funcs) [line 886] Function Parameters:

array $funcs

replaces nameless global variables in the $funcglobals array with their names

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 826 of 1382

void function parserDocBlock::updateModifiers($modifiers) [line 355] Function Parameters:

array $modifiers

void function parserDocBlock::updateParams($params) [line 552] Function Parameters:

array $params Format: array(parameter key => name[,1 => default value][,2 => type hint]),...)

array(0 => parameter

replaces nameless parameters in the $params array with their names add @param tags for params in the function with no entry

void function parserDocBlock::updateStatics($funcs) [line 901] Function Parameters:

array $funcs

replaces nameless static variables in the $staticsarray with their names

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 827 of 1382

ParserElements.inc
Parser Elements, all classes representing documentable elements phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package ParserElements Author Gregory Beaver < [email protected]> Version CVS: $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2006 Gregory Beaver See Parser, WordParser Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.1 License LGPL

Class parserClass
[line 682]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 828 of 1382

Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserClass::$curfile string = false [line 725]

Var same as parserElement::$path

parserClass::$extends mixed = false [line 695]

Var false or contents of extends clause in class declaration

parserClass::$ignore boolean = false [line 720]

Used to determine whether a class should be ignored or not. integrity of parsing

Helps maintain

See Classes::getParentClass()

parserClass::$parent mixed = false [line 714]

Format: array(file, parent) where parent class is found or false if no parent

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 829 of 1382

parserClass::$sourceLocation string = '' [line 691]

See parserPage::$sourceLocation

parserClass::$tutorial tutorialLink|false = false [line 729]

Var either a link to the tutorial associated with this class, or false

parserClass::$type string = 'class' [line 688]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'class'

parserClass::$_implements array = array() [line 699]

Var a list of interfaces this class implements

void function parserClass::addImplements($implements) [line 1379] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 830 of 1382

string $implements

void function parserClass::addTutorial($t, &$c) [line 755] Function Parameters:

parserTutorial $t Converter &$c

array function parserClass::getChildClassList(&$c) [line 1308] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

returns a list of all child classes of this class

Usedby XMLDocBookpeardoc2Converter::generateChildClassList() Usedby Converter::generateChildClassList()

mixed function parserClass::getConflicts(&$c) [line 776] Function Parameters:

Converter &$c

Returns all classes in other packages that have the same name as this class

Usedby Converter::getFormattedConflicts()

array function parserClass::getConstNames(&$c) [line 1034] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 831 of 1382

Converter &$c this function will not work before the Conversion stage of parsing

array function parserClass::getConsts(&$c) [line 1009] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

boolean function parserClass::getExtends([$raw = false]) [line 1396] Function Parameters:

$raw

See parserClass::$extends

array function parserClass::getImplements() [line 1387] array function parserClass::getInheritedConsts(&$c, [$override = false], [$consts = false]) [line 1225] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing boolean $override determines whether overriden vars should be included in the list of inherited vars $consts

array function parserClass::getInheritedMethods(&$c, [$override = false]) [line 1051] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing boolean $override determines whether overriden methods should be included in the list of inherited methods

array function parserClass::getInheritedVars(&$c, [$override = true], [$vars = false]) [line 1149] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 832 of 1382

boolean $override determines whether overriden vars should be included in the list of inherited vars $vars

mixed function parserClass::getLink($c, [$text = false], [$returnobj = false]) [line 789] Function Parameters:

Converter $c string $text text to display for the link or false for default text $returnobj

quick way to link to this element


mixed function parserClass::getMethod(&$c, $name, [$inherited = false]) [line 914] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing string $name method name in this class boolean $inherited determines whether to search inherited methods as well

array function parserClass::getMethodNames(&$c) [line 943] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

array function parserClass::getMethods(&$c) [line 903] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

array|false function parserClass::getModifiers() [line 736]

Get the PHP5+ modifiers for this class (abstract/final/static/private/protected/public)

mixed function parserClass::getParent(&$c) [line 889] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 833 of 1382

Converter &$c this function will not work before the Conversion stage of parsing

retrieve object that represents the parent class


array function parserClass::getParentClassTree(&$c) [line 1289] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

Usedby CHMdefaultConverter::generateFormattedClassTree() Usedby HTMLframesConverter::generateFormattedClassTree() Usedby HTMLSmartyConverter::generateFormattedClassTree() Usedby XMLDocBookConverter::generateFormattedClassTree() Usedby XMLDocBookpeardoc2Converter::generateFormattedClassTree()

string function parserClass::getSourceLocation($c, [$pearize = false]) [line 1337] Function Parameters:

Converter $c boolean $pearize

See parserClass::$sourceLocation

parserTutorial function parserClass::getTutorial() [line 766]

Get the associated tutorial for this class, if any

Tutorial phpDocumentor Tutorials

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 834 of 1382

mixed function parserClass::getVar(&$c, $name) [line 934] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing string $name var name in this class

array function parserClass::getVarNames(&$c) [line 1018] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

array function parserClass::getVars(&$c) [line 1000] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing

boolean function parserClass::hasConst(&$c, $name) [line 991] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing string $name class constant name

boolean function parserClass::hasMethod(&$c, $name, [$inherited = false]) [line 961] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing string $name method name boolean $inherited determines whether to search inherited methods as well

boolean function parserClass::hasVar(&$c, $name) [line 981] Function Parameters:

Converter &$c this function will not work before the Conversion stage of parsing string $name var name

boolean function parserClass::isInterface() [line 870]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 835 of 1382

void function parserClass::setAccessModifiers($modifiers) [line 879] Function Parameters:

array $modifiers

Use this method to set access modifiers for a class


void function parserClass::setExtends($extends) [line 1362] Function Parameters:

string $extends

See parserClass::$extends

void function parserClass::setInterface() [line 862]

Use this method to set the type of class to be an interface


void function parserClass::setModifiers($m) [line 746] Function Parameters:

string $m

Set the PHP5+ modifiers for this class (abstract/final/static/private/protected/public)

void function parserClass::setParent($p, $f, &$c) [line 805] Function Parameters:

string $p parent class name string $f parent class file Classes &$c Classes object currently calling setParent

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 836 of 1382

See Classes::setClassParent()

void function parserClass::setParentNoClass($par) [line 854] Function Parameters:

string $par parent class name (used by Classes::setClassParent() if parent class not found

void function parserClass::setSourceLocation($sl) [line 1326] Function Parameters:

string $sl

See parserClass::$sourceLocation

Class parserConst
[line 1578]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.2.4

parserConst::$class string = '' [line 1586]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 837 of 1382

Var class that contains this var

parserConst::$type string = 'const' [line 1584]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'const'

Constructor void function parserConst::parserConst($class) [line 1591] Function Parameters:

string $class

string function parserConst::getClass() [line 1600]

Retrieve the class name


mixed function parserConst::getLink($c, [$text = false], [$returnobj = false]) [line 1611] Function Parameters:

Converter $c string $text text to display for the link or false for default text $returnobj

quick way to link to this element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 838 of 1382

Class parserDefine
[line 1983]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserDefine::$type string = 'define' [line 1989]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'define'

mixed function parserDefine::getConflicts(&$c) [line 2011] Function Parameters:

Converter &$c

Returns all defines in other packages that have the same name as this define

Usedby Converter::getFormattedConflicts()

mixed function parserDefine::getLink($c, [$text = false], [$returnobj = false]) [line 1997] Function Parameters:

Converter $c string $text text to display for the link or false for default text

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 839 of 1382

$returnobj

quick way to link to this element

Class parserElement
[line 49]

all elements except parserPackagePagedescend from this abstract class

Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Abstract Element Since 1.0rc1

parserElement::$conflicts mixed = false [line 63]

Var either false or an array of paths to files with conflicts

parserElement::$docblock mixed = false [line 54]

Var either false or a parserDocBlock

parserElement::$endlinenumber

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 840 of 1382

false|integer = 0 [line 82]

line number on file where this element stops

Since 1.2

parserElement::$file string = '' [line 69]

location of this element (filename)


parserElement::$linenumber false|integer = false [line 89]

Line number in the source on which this element appears

Since 1.2

parserElement::$name mixed = [line 58]

name of this element, or include type if element is a parserInclude


parserElement::$path string = '' [line 75]

full path location of this element (filename)


integer function parserElement::getEndLineNumber() [line 136] string function parserElement::getFile() [line 178] integer function parserElement::getLineNumber() [line 128] string function parserElement::getName() [line 169] string function parserElement::getPackage() [line 142] string function parserElement::getPath() [line 187]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 841 of 1382

void function parserElement::setDocBlock($docblock) [line 94] Function Parameters:

parserDocBlock $docblock

void function parserElement::setEndLineNumber($l) [line 120] Function Parameters:

integer $l

Sets the ending line number of elements


void function parserElement::setFile($file) [line 151] Function Parameters:

string $file

void function parserElement::setLineNumber($number) [line 111] Function Parameters:

integer $number

Set starting line number


void function parserElement::setName($name) [line 102] Function Parameters:

string $name

void function parserElement::setPath($file) [line 157] Function Parameters:

string $file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 842 of 1382

Class parserFunction
[line 321]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserFunction::$globals array = false [line 351]

global declarations parsed from function definition

Var Format: array(globalname1, globalname2,....)

parserFunction::$params array = false [line 335]

parameters parsed from function definition. param name may be null, in which case, updateParams() must be called from the Converter

Var Format: array(param name => default value parsed from function definition) See updateParams()

parserFunction::$returnsreference

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 843 of 1382

boolean = false [line 345]

Function returns a reference to an element, instead of a value set to true if function is declared as:
1 function & func(...

parserFunction::$source mixed = '' [line 358] parserFunction::$statics array = false [line 356]

static variable declarations parsed from function definition

Var Format: array(array('name' => staticvar1,'val' => '' or default val of staticvar1),...)

parserFunction::$type string = 'function' [line 327]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'function'

void function parserFunction::addGlobals($globals) [line 433] Function Parameters:

array $globals Format: array(globalname1, globalname2,....)

Add all "global $var, $var2" declarations to this function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 844 of 1382

void function parserFunction::addParam($name, $value, [$has_default = true], [$typehint = null]) [line 366] Function Parameters:

string $name string $value default value parsed from function definition boolean $has_default indicates whether this parameter has a default value null|string $typehint class type hint

void function parserFunction::addSource($source) [line 379] Function Parameters:

string|array $source

Set the source code. Always array in PHP 4.3.0+


void function parserFunction::addStatics($static, $vals) [line 443] Function Parameters:

array $static Format: array(varname1, varname2,...) array $vals Format: array(default val of var 1, default val of var 2,...) if var 1 has no default, array(default val of var 2,...)

Add all "static $var, $var2 = 6" declarations to this function


mixed function parserFunction::getConflicts(&$c) [line 422] Function Parameters:

Converter &$c

Returns all functions in other packages that have the same name as this function

Usedby Converter::getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 845 of 1382

string function parserFunction::getFunctionCall() [line 580]

Get a human-friendly description of the function call takes declaration like:


1

and returns: string &func( $param1, [$param2 = 6], [$param3 = array('20',9 => "heroo")] )

array function parserFunction::getIntricateFunctionCall($converter, $paramtags) [line 621] Function Parameters:

$converter $paramtags

Like getFunctionCall(), but has no English or pre-determined formatting. Much more flexible.

See parserFunction::getFunctionCall()

mixed function parserFunction::getLink($c, [$text = false], [$returnobj = false]) [line 408] Function Parameters:

Converter $c string $text text to display for the link or false for default text $returnobj

quick way to link to this element


string function parserFunction::getParam($name) [line 464] Function Parameters:

string $name

boolean function parserFunction::getReturnsReference() [line 561] string|array function parserFunction::getSource() [line 397] boolean function parserFunction::hasSource() [line 388]

Determine whether the source code has been requested via {@source}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 846 of 1382

array function parserFunction::listGlobals() [line 515] array function parserFunction::listParams() [line 480] array function parserFunction::listStatics() [line 534] void function parserFunction::setReturnsReference() [line 553]

sets $returnsreference true to

Class parserGlobal
[line 217]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.1

parserGlobal::$datatype string = 'mixed' [line 229]

Name of the global's data type


parserGlobal::$type string = 'global' [line 223]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'global'

mixed function parserGlobal::getConflicts(&$c) [line 251] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 847 of 1382

Converter &$c

Returns all global variables in other packages that have the same name as this global variable

Usedby Converter::getFormattedConflicts()

string function parserGlobal::getDataType(&$converter) [line 277] Function Parameters:

Converter &$converter

Retrieve converter-specific representation of the data type If the data type is a documented class name, then this function will return a Converter-specific link to that class's documentation, so users can click/browse to the documentation directly from the global variable declaration

mixed function parserGlobal::getLink(&$c, [$text = false], [$returnobj = false]) [line 237] Function Parameters:

Converter &$c string $text text to display for the link or false for default text $returnobj

quick way to link to this element


void function parserGlobal::setDataType($type) [line 262] Function Parameters:

string $type

Sets the name of the global variable's type


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 848 of 1382

Class parserInclude
[line 201]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserInclude::$type string = 'include' [line 207]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'include'

Class parserMethod
[line 1628]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 849 of 1382

parserMethod::$class string = '' [line 1640]

Var class that contains this method

parserMethod::$isConstructor boolean = false [line 1636]

Var whether this method is a constructor

parserMethod::$isDestructor boolean = false [line 1638]

Var whether this method is a destructor by PEAR standards

parserMethod::$type string = 'method' [line 1634]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'method'

parserMethod::$_modifiers

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 850 of 1382

mixed = array() [line 1641] Constructor void function parserMethod::parserMethod($class) [line 1646] Function Parameters:

string $class

void function parserMethod::addParam($name, $value, [$has_default = true], [$typehint = null]) [line 1657] Function Parameters:

string $name string $value default value parsed from function definition boolean $has_default indicates whether this parameter has a default value null|string $typehint class type hint

string function parserMethod::getClass() [line 1690]

Return name of the class that contains this method


string function parserMethod::getFunctionCall() [line 1671]

adds "constructor " to start of function call if

$isConstructor true is

See parserFunction::getFunctionCall()

mixed function parserMethod::getImplements(&$c) [line 1805] Function Parameters:

Converter &$c

Usedby Converter::getFormattedMethodImplements()

void function parserMethod::getIntricateFunctionCall($converter, $paramtags) [line 1678] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 851 of 1382

$converter $paramtags

mixed function parserMethod::getLink($c, [$text = false], [$returnobj = false]) [line 1915] Function Parameters:

Converter $c string $text text to display for the link or false for default text $returnobj

quick way to link to this element


string function parserMethod::getModifiers() [line 1699]

Return name of the class that contains this method


mixed function parserMethod::getOverrides(&$c) [line 1718] Function Parameters:

Converter &$c

array function parserMethod::getOverridingMethods(&$c) [line 1944] Function Parameters:

Converter &$c

Usedby Converter::getFormattedDescMethods()

array function parserMethod::getOverridingMethodsForClass(&$c, &$class) [line 1956] Function Parameters:

Converter &$c parserClass &$class

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 852 of 1382

void function parserMethod::setConstructor() [line 1927]

Use this method to tell the parser that this method is the class constructor
void function parserMethod::setDestructor() [line 1935]

Use this method to tell the parser that this method is the class constructor
string function parserMethod::setModifiers($m) [line 1708] Function Parameters:

$m

Return name of the class that contains this method

Class parserPackagePage
[line 2027]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserPackagePage::$package string = 'default' [line 2035] parserPackagePage::$type string = 'packagepage' [line 2033]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 853 of 1382

Var always 'packagepage'

Constructor void function parserPackagePage::parserPackagePage($package) [line 2040] Function Parameters:

string $package

void function parserPackagePage::Convert(&$c) [line 2048] Function Parameters:

Converter &$c

Class parserTutorial
[line 2059]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.2 Usedby XMLPackagePageParser::parse() - using Publisher::PublishEvent(), a new tutorial is created from the file parsed, and passed to the Intermediate Parser

parserTutorial::$children array = false [line 2124]

links to the child tutorials, or false if none


parserTutorial::$ini array = false [line 2100]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 854 of 1382

output from tutorialname.ext.ini an array generated by phpDocumentor_parse_ini_file() containing an index 'Linked Tutorials' with an array of tutorial names in the order they should appear. This is used to generate a linked list of tutorials like phpDocumentor tags

parserTutorial::$linked_element mixed = [line 2078]

The documentable element this tutorial is linked to Can be a parserData, parserClass, or nothing for package/subpackage docs

parserTutorial::$name string = [line 2088]

filename minus extension of this tutorial (used for @tutorial tag)


parserTutorial::$next tutorialLink = false [line 2105]

link to the next tutorial in a document series, or false if none

Usedby parserTutorial::setNext() - creates a link to the documentation for the next tutorial

parserTutorial::$package string = 'default' [line 2067] parserTutorial::$parent tutorialLink = false [line 2119]

link to the parent tutorial in a document series, or false if none This is used to generate an "Up" or "Home" link like the php manual. The parent is defined as a tutorial that has a parenttutorialname.ext.ini file and is not contained by any other tutorial's tutorialname.ext.ini

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 855 of 1382

Usedby parserTutorial::setParent() - creates a link to the documentation for the parent tutorial

parserTutorial::$path string = [line 2083]

path to the tutorial page


parserTutorial::$prev tutorialLink = false [line 2110]

link to the previous tutorial in a document series, or false if none

Usedby parserTutorial::setPrev() - creates a link to the documentation for the previous tutorial

parserTutorial::$tutorial_type string = [line 2072]

Either cls, pkg, or proc


parserTutorial::$type string = 'tutorial' [line 2065]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'tutorial'

parserTutorial::$_xml boolean = true [line 2090]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 856 of 1382

Constructor void function parserTutorial::parserTutorial($data, $info) [line 2136] Function Parameters:

parserXMLDocBookTag $data top-level tag (<refentry> for 1.2.0) information $info about the tutorial file. Format: array('tutename' => tutorial name, 'path' => relative path of tutorial to tutorials/ directory 'ini' => contents of the tutorial .ini file, if any)

void function parserTutorial::Convert(&$c, [$postprocess = true]) [line 2174] Function Parameters:

Converter &$c boolean $postprocess determines whether character data is postprocessed to be Converter-friendly or not.

string|tutorialLink function parserTutorial::getLink(&$c, [$pure = false], [$section = '']) [line 2278] Function Parameters:

Converter &$c boolean $pure if true, returns a tutorialLink instead of a string string $section section name to link to

Get a link to this tutorial, or to any subsection of this tutorial


void function parserTutorial::getNext(&$c) [line 2243] Function Parameters:

Converter &$c

Retrieve converter-specific link to the next tutorial's documentation


void function parserTutorial::getParent(&$c) [line 2221] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 857 of 1382

Converter &$c

Retrieve converter-specific link to the parent tutorial's documentation


void function parserTutorial::getPrev(&$c) [line 2265] Function Parameters:

Converter &$c

Retrieve converter-specific link to the previous tutorial's documentation


void function parserTutorial::getTitle(&$c, [$subsection = '']) [line 2154] Function Parameters:

Converter &$c string $subsection which subsection to retrieve the title from, if any

Retrieve the title of the tutorial, or of any subsection

Uses parserXMLDocBookTag::getSubSection() - retrieve the subsection to to get a title from

boolean function parserTutorial::isChildOf($parents) [line 2199] Function Parameters:

array $parents array of parserTutorials that have child tutorials

Determine if this parserTutorial object is a child of another WARNING: This method can enter an infinite loop when run on PHP v5.2.1... see PHP Bug #40608 and PEAR Bug #10289

void function parserTutorial::setNext($next, &$c) [line 2232]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 858 of 1382

Function Parameters:

parserTutorial $next Converter &$c

Uses parserTutorial::$next - creates a link to the documentation for the next tutorial

void function parserTutorial::setParent($parent, &$c) [line 2184] Function Parameters:

parserTutorial $parent Converter &$c

Uses parserTutorial::$parent - creates a link to the documentation for the parent tutorial

void function parserTutorial::setPrev($prev, &$c) [line 2254] Function Parameters:

parserTutorial $prev Converter &$c

Uses parserTutorial::$prev - creates a link to the documentation for the previous tutorial

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 859 of 1382

Class parserVar
[line 1415]
Package phpDocumentor Sub-Package ParserElements Author Greg Beaver < [email protected]> Version $Id: ParserElements.inc 248547 2007-12-19 02:16:49Z ashnazg $ Copyright 2002-2008 Gregory Beaver Since 1.0rc1

parserVar::$class string = '' [line 1423]

Var class that contains this var

parserVar::$type string = 'var' [line 1421]

Type is used by many functions to skip phpDocumentor_get_class($blah) == 'parserBlah'

the

hassle

of

if

Var always 'var'

parserVar::$_modifiers array = [line 1425] Constructor void function parserVar::parserVar($class) [line 1430] Function Parameters:

string $class

string function parserVar::getClass() [line 1439]

Retrieve the class name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 860 of 1382

mixed function parserVar::getLink($c, [$text = false], [$returnobj = false]) [line 1468] Function Parameters:

Converter $c string $text text to display for the link or false for default text $returnobj

quick way to link to this element


array function parserVar::getModifiers() [line 1448]

Return a list of access modifiers (static/private/etc.)


mixed function parserVar::getOverrides(&$c) [line 1481] Function Parameters:

Converter &$c

array function parserVar::getOverridingVars(&$c) [line 1540] Function Parameters:

Converter &$c

Usedby Converter::getFormattedDescVars()

array function parserVar::getOverridingVarsForClass(&$c, &$class) [line 1552] Function Parameters:

Converter &$c parserClass &$class

string function parserVar::setModifiers($m) [line 1457] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 861 of 1382

$m

Return name of the class that contains this method

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 862 of 1382

Beautifier.php
XML/Beautifier.php Format XML files containing unknown entities (like all of peardoc) phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2004-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Greg Beaver < [email protected]> Version CVS: $Id: Beautifier.php 212211 2006-04-30 22:18:14Z cellog $ Copyright 2004-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.3.0 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 863 of 1382

Tokenizer.php
XML/Beautifier.php Format XML files containing unknown entities (like all of peardoc) phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2004-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Greg Beaver < [email protected]> Version CVS: $Id: Tokenizer.php 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2004-2006 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 1.3.0 Filesource Source Code for this file License LGPL

PHPDOC_BEAUTIFIER_CDATA = 100000 [line 751]

do not remove, needed in plain renderer


PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE = 4 [line 701]

used when a <tag attr="attribute"> is found

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 864 of 1382

PHPDOC_XMLTOKEN_EVENT_CDATA = 11 [line 736]

used when a <! is found


PHPDOC_XMLTOKEN_EVENT_CLOSETAG = 5 [line 706]

used when a close </tag> is found


PHPDOC_XMLTOKEN_EVENT_COMMENT = 7 [line 716]

used when a <!-- comment --> is found


PHPDOC_XMLTOKEN_EVENT_DEF = 10 [line 731]

used when a <! is found


PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE = 9 [line 726]

used when a <!-- comment --> is found


PHPDOC_XMLTOKEN_EVENT_ENTITY = 6 [line 711]

used when an &entity; is found


PHPDOC_XMLTOKEN_EVENT_IN_CDATA = 13 [line 746]

used when a <![CDATA[ section is found


PHPDOC_XMLTOKEN_EVENT_NOEVENTS = 1 [line 686]

starting state
PHPDOC_XMLTOKEN_EVENT_OPENTAG = 3 [line 696]

used when an open <tag> is found


PHPDOC_XMLTOKEN_EVENT_PI = 2 [line 691]

used when a processor instruction is found


PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE = 8 [line 721]

used when a <!-- comment --> is found


PHPDOC_XMLTOKEN_EVENT_XML = 12 [line 741]

used when a <?xml is found


require_once 'XML/Beautifier/Tokenizer.php' [line 44]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 865 of 1382

From the XML_Beautifier package


STATE_XMLTOKEN_ATTRIBUTE = 104 [line 703]

currently parsing an open <tag>


STATE_XMLTOKEN_CDATA = 111 [line 738]

currently parsing a <!


STATE_XMLTOKEN_CLOSETAG = 105 [line 708]

currently parsing a close </tag>


STATE_XMLTOKEN_COMMENT = 107 [line 718]

currently parsing a <!-- comment -->


STATE_XMLTOKEN_DEF = 110 [line 733]

currently parsing a <!


STATE_XMLTOKEN_DOUBLEQUOTE = 109 [line 728]

currently parsing a <!-- comment -->


STATE_XMLTOKEN_ENTITY = 106 [line 713]

currently parsing an &entity;


STATE_XMLTOKEN_IN_CDATA = 113 [line 748]

currently parsing a <![CDATA[ ]]>


STATE_XMLTOKEN_NOEVENTS = 101 [line 688]

currently in starting state


STATE_XMLTOKEN_OPENTAG = 103 [line 698]

currently parsing an open <tag>


STATE_XMLTOKEN_PI = 102 [line 693]

currently in processor instruction


STATE_XMLTOKEN_SINGLEQUOTE = 108 [line 723]

currently parsing a <!-- comment -->

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 866 of 1382

STATE_XMLTOKEN_XML = 112 [line 743]

currently parsing a <?xml

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 867 of 1382

HighlightParser.inc
Source Code Highlighting The classes in this file are responsible for the dynamic @example, @filesource and {@source} tags output. Using the phpDocumentor_HighlightWordParser, the phpDocumentor_HighlightParser retrieves PHP tokens one by one from the array generated by phpDocumentorTWordParser source retrieval functions and then highlights them individually. It accomplishes this highlighting through the assistance of methods in the output Converter passed to its parse() method, and then returns the fully highlighted source as a string phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Tutorial @example, @filesource, inline {@source} Author Gregory Beaver < [email protected]> Version CVS: $Id: HighlightParser.inc 253641 2008-02-24 02:35:44Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2.0beta3 Filesource Source Code for this file License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 868 of 1382

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 869 of 1382

Parser.inc
Base parser for all parsers phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Joshua Eichorn < [email protected]> Author Gregory Beaver < [email protected]> Version CVS: $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2000-2006 Joshua Eichorn, Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org Since 0.1 License LGPL

PARSER_EVENT_ACCESS_MODIFIER = 139 [line 277]

used when parsing an access modifier


PARSER_EVENT_ARRAY = 115 [line 160]

used when an array definition is encountered in parsing


PARSER_EVENT_CLASS = 111 [line 138]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 870 of 1382

used when a class definition is encountered in parsing


PARSER_EVENT_CLASS_CONSTANT = 141 [line 287]

used when a class implements interfaces


PARSER_EVENT_CLASS_MEMBER = 137 [line 267]

used by the HighlightParser only, when ->var or ->function() is encountered in a method


PARSER_EVENT_COMMENT = 105 [line 108]

used when short comment // is encountered in parsing


PARSER_EVENT_COMMENTBLOCK = 104 [line 103]

used when long comment /x x/ where x is an asterisk is encountered in parsing


PARSER_EVENT_DEFINE = 107 [line 118]

used when a define statement is encountered in parsing


PARSER_EVENT_DEFINE_GLOBAL = 128 [line 222]

used when parsing a global variable declaration


PARSER_EVENT_DEFINE_PARAMS = 108 [line 123]

used when a define statement opening parenthesis is encountered in parsing


PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS = 120 [line 185]

used when a define statement's opening parenthesis is encountered in parsing


PARSER_EVENT_DESC = 126 [line 212]

used when parsing the desc part of a docblock


PARSER_EVENT_DOCBLOCK = 112 [line 145]

used when a DocBlock is encountered in parsing


PARSER_EVENT_DOCBLOCK_TEMPLATE = 133 [line 247]

used when encountering a /**#@+ comment marking a new docblock template


PARSER_EVENT_DOCKEYWORD = 113 [line 150]

used when a @tag is encountered in DocBlock parsing

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 871 of 1382

PARSER_EVENT_DOCKEYWORD_EMAIL = 114 [line 155]

used when a <email@address> is encountered in parsing an @author tag


PARSER_EVENT_END_DOCBLOCK_TEMPLATE = 134 [line 252]

used when encountering a /**#@-* / comment (no space) marking the end of using a docblock template
PARSER_EVENT_END_STATEMENT = 121 [line 189] PARSER_EVENT_EOFQUOTE = 122 [line 192]

used when a <<< is encountered in parsing


PARSER_EVENT_ESCAPE = 900 [line 40]

used when a backslash is encountered in parsing a string or other escapable entity


PARSER_EVENT_FUNCTION = 117 [line 170]

used when a function definition is encountered in parsing


PARSER_EVENT_FUNCTION_PARAMS = 109 [line 128]

used when a function statement opening parenthesis is encountered in parsing


PARSER_EVENT_FUNCTION_PARAM_VAR = 144 [line 302]

used when a $param is encountered in a function definition


PARSER_EVENT_FUNC_GLOBAL = 130 [line 232]

used when parsing a "global $var1, $var2;" declaration in a function


PARSER_EVENT_GLOBAL_VALUE = 129 [line 227]

used when parsing the default value in a global variable declaration


PARSER_EVENT_IMPLEMENTS = 140 [line 282]

used when a class implements interfaces


PARSER_EVENT_INCLUDE = 123 [line 197]

used when an include/require/include_once/include_once statement is encountered in parsing


PARSER_EVENT_INCLUDE_PARAMS = 124 [line 202]

used when an opening parenthesis of an include/require/include_once/include_once statement is encountered in parsing

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 872 of 1382

PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS = 125 [line 207]

used when an inner ( ) is encountered include/require/include_once/include_once statement


PARSER_EVENT_INLINE_DOCKEYWORD = 119 [line 180]

while

parsing

an

used when an inline {@tag} is encountered in parsing a DocBlock


PARSER_EVENT_LOGICBLOCK = 102 [line 93]

{ encountered in parsing a function or php code


PARSER_EVENT_METHOD = 135 [line 257]

used by the HighlightParser only, when a method starts


PARSER_EVENT_METHOD_LOGICBLOCK = 136 [line 262]

used by the HighlightParser only, when a method body is parsed


PARSER_EVENT_NOEVENTS = 103 [line 98]

used for the beginning of parsing, before first < ? php encountered
PARSER_EVENT_OUTPHP = 118 [line 175]

used when a ? > (with no space) is encountered in parsing


PARSER_EVENT_PHPCODE = 106 [line 113]

used when php code processor instruction (< ? php) is encountered in parsing
PARSER_EVENT_QUOTE = 101 [line 88]

used when double quotation mark (") encountered in parsing


PARSER_EVENT_QUOTE_VAR = 138 [line 272]

used by the HighlightParser only, when {$var} is encountered in a string


PARSER_EVENT_SINGLEQUOTE = 110 [line 133]

used when a single quote (') is encountered in parsing


PARSER_EVENT_STATIC_VAR = 131 [line 237]

used when parsing a "static $var1, $var2;" declaration in a function

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 873 of 1382

PARSER_EVENT_STATIC_VAR_VALUE = 132 [line 242]

used when parsing the value in a "static $var1 = x" declaration in a function
PARSER_EVENT_TAGS = 127 [line 217]

used when parsing the @tag block of a docblock


PARSER_EVENT_VAR = 116 [line 165]

used when a var statement is encountered in parsing a class definition


PARSER_EVENT_VAR_ARRAY = 142 [line 292]

used when a variable value is an array


PARSER_EVENT_VAR_ARRAY_COMMENT = 143 [line 297]

used when a comment is found in a variable array value


PHPDOCUMENTOR_EVENT_CLASS = 800 [line 45]

Class published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_CONST = 806 [line 57]

Class Constant published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_DEFINE = 805 [line 55]

Constant (define) published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_DOCBLOCK = 801 [line 47]

DocBlock published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_DOCBLOCK_TEMPLATE = 814 [line 84]

used when a docblock template is encountered in the source


PHPDOCUMENTOR_EVENT_END_DOCBLOCK_TEMPLATE = 815 [line 86]

used when a docblock template is encountered in the source


PHPDOCUMENTOR_EVENT_END_PAGE = 808 [line 67]

used to inform phpDocumentor_IntermediateParser that the current file has been completely parsed. Render then flushes all buffers for functions/classes/defines/includes on the current page

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 874 of 1382

See phpDocumentor_IntermediateParser::HandleEvent()

PHPDOCUMENTOR_EVENT_FUNCTION = 802 [line 49]

Function published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_GLOBAL = 813 [line 82]

used when a global variable definition is encountered in the source


PHPDOCUMENTOR_EVENT_INCLUDE = 810 [line 71]

Include (include/require/include_once/include_once) IntermediateParser with this event


PHPDOCUMENTOR_EVENT_MESSAGE = 807 [line 59]

published

to

Deprecated

PHPDOCUMENTOR_EVENT_NEWFILE = 811 [line 78]

use to inform ErrorTracker of a new file being parsed


PHPDOCUMENTOR_EVENT_NEWLINENUM = 812 [line 80]

use to inform ErrorTracker of the next line number being parsed


PHPDOCUMENTOR_EVENT_NEWSTATE = 808 [line 61]

use to inform IntermediateParser of a new element being parsed


PHPDOCUMENTOR_EVENT_PACKAGEPAGE = 809 [line 69]

Package-level page published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_PAGE = 804 [line 53]

New File (page) published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_README_INSTALL_CHANGELOG = 812 [line 75]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 875 of 1382

Contents of README/INSTALL/CHANGELOG files published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_TUTORIAL = 811 [line 73]

Tutorial published to IntermediateParser with this event


PHPDOCUMENTOR_EVENT_VAR = 803 [line 51]

Class Variable published to IntermediateParser with this event


STATE_ACCESS_MODIFIER = 239 [line 279]

currently parsing an access modifier


STATE_ARRAY = 215 [line 162]

currently parsing an array


STATE_CLASS = 211 [line 140]

currently parsing a class definition


STATE_CLASS_CONSTANT = 241 [line 289]

currently parsing a class constant


STATE_CLASS_MEMBER = 237 [line 269]

currently parsing a class member using the HighlightParser


STATE_COMMENT = 205 [line 110]

currently parsing a short comment //


STATE_COMMENTBLOCK = 204 [line 105]

currently parsing a long comment /x x/ where x is an asterisk


STATE_DEFINE = 207 [line 120]

currently parsing a define statement


STATE_DEFINE_PARAMS = 208 [line 125]

currently parsing the stuff in ( ) of a define statement


STATE_DEFINE_PARAMS_PARENTHESIS = 220 [line 187]

currently parsing an inner parenthetical statement of a define( )

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 876 of 1382

STATE_DESC = 226 [line 214]

currently parsing the desc part of a docblock


STATE_DOCBLOCK = 212 [line 147]

currently parsing a DocBlock


STATE_DOCBLOCK_TEMPLATE = 233 [line 249]

currently parsing the value in a "static $var1 = x" declaration in a function


STATE_DOCKEYWORD = 213 [line 152]

currently parsing a @tag in a DocBlock


STATE_DOCKEYWORD_EMAIL = 214 [line 157]

currently parsing an email in brackets in an @author tag of a DocBlock


STATE_END_CLASS = 311 [line 142]

used to tell Render that a class has been completely parsed, and to flush buffers
STATE_END_DOCBLOCK_TEMPLATE = 234 [line 254]

currently parsing the value in a "static $var1 = x" declaration in a function


STATE_EOFQUOTE = 222 [line 194]

currently parsing a string defined using Perl <<<


STATE_ESCAPE = 1000 [line 42]

used when a backslash is encountered in parsing a string or other escapable entity


STATE_FUNCTION = 217 [line 172]

currently parsing a Function or Method


STATE_FUNCTION_PARAMS = 209 [line 130]

currently parsing the stuff in ( ) of a function definition


STATE_FUNCTION_PARAM_VAR = 244 [line 304]

currently parsing a $param in a function definition

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 877 of 1382

STATE_FUNC_GLOBAL = 230 [line 234]

currently parsing a "global $var1, $var2;" declaration in a function


STATE_GLOBAL = 228 [line 224]

currently parsing a global variable declaration


STATE_GLOBAL_VALUE = 229 [line 229]

currently parsing the default value in a global variable declaration


STATE_IMPLEMENTS = 240 [line 284]

currently parsing an implements clause


STATE_INCLUDE = 223 [line 199]

currently parsing an include/require/include_once/include_once


STATE_INCLUDE_PARAMS = 224 [line 204]

currently parsing the stuff in ( ) of a define statement


STATE_INCLUDE_PARAMS_PARENTHESIS = 225 [line 209]

currently parsing an inner parenthetical include/includeonce/require/requireonce( )


STATE_INLINE_DOCKEYWORD = 219 [line 182]

statement

of

an

currently parsing an inline tag like { @link} in a DocBlock


STATE_LOGICBLOCK = 202 [line 95]

currently parsing a { } block


STATE_METHOD = 235 [line 259]

currently parsing a method using the HighlightParser


STATE_METHOD_LOGICBLOCK = 236 [line 264]

currently parsing the method body using the HighlightParser


STATE_NOEVENTS = 203 [line 100]

out of < ? php tag


STATE_OUTPHP = 218 [line 177]

currently out of php code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 878 of 1382

STATE_PHPCODE = 206 [line 115]

currently parsing php code


STATE_QUOTE = 201 [line 90]

currently parsing a quote


STATE_QUOTE_VAR = 238 [line 274]

currently parsing a {$encapsed_var} using the HighlightParser


STATE_SINGLEQUOTE = 210 [line 135]

currently parsing a string enclosed in single quotes (')


STATE_STATIC_VAR = 231 [line 239]

currently parsing a "static $var1, $var2;" declaration in a function


STATE_STATIC_VAR_VALUE = 232 [line 244]

currently parsing the value in a "static $var1 = x" declaration in a function


STATE_TAGS = 227 [line 219]

currently parsing the @tag block of a docblock


STATE_VAR = 216 [line 167]

currently parsing a Class variable


STATE_VAR_ARRAY = 242 [line 294]

currently parsing a variable value is an array


STATE_VAR_ARRAY_COMMENT = 243 [line 299]

currently parsing a comment in a variable array value


T_ABSTRACT = 'foo' [line 312] T_CONST = 'foo' [line 310] T_DOC_COMMENT = T_ML_COMMENT [line 325] T_FINAL = 'foo' [line 316] T_IMPLEMENTS = 'foo' [line 317] T_INTERFACE = 'foo' [line 308] T_ML_COMMENT = T_COMMENT [line 321] T_PRIVATE = 'foo' [line 313] T_PROTECTED = 'foo' [line 315]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 879 of 1382

T_PUBLIC = 'foo' [line 314]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 880 of 1382

phpDocumentorTParser.inc
tokenizer extension-based parser for PHP code phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version CVS: $Id: phpDocumentorTParser.inc 286921 2009-08-08 05:01:24Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 881 of 1382

TutorialHighlightParser.inc
Source Code Highlighting The classes in this file are responsible for the dynamic @example, and <programlisting role="tutorial"> tags output. Using the WordParser, the phpDocumentor_TutorialHighlightParser retrieves PHP tokens one by one from the array generated by WordParser source retrieval functions and then highlights them individually. It accomplishes this highlighting through the assistance of methods in the output Converter passed to its parse() method, and then returns the fully highlighted source as a string phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2003-2007 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Tutorial @example, @filesource Author Gregory Beaver < [email protected]> Version CVS: $Id: TutorialHighlightParser.inc 246148 2007-11-14 01:57:04Z ashnazg $ Copyright 2003-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - PHPCS needs to ignore CVS Id length Since 1.3.0 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 882 of 1382

STATE_TUTORIAL_ATTRIBUTE = 104 [line 568]

currently parsing an open <tag>


STATE_TUTORIAL_CLOSETAG = 105 [line 578]

currently parsing a close </tag>


STATE_TUTORIAL_COMMENT = 107 [line 598]

currently parsing a <!-- comment -->


STATE_TUTORIAL_DOUBLEQUOTE = 109 [line 618]

currently parsing a <!-- comment -->


STATE_TUTORIAL_ENTITY = 106 [line 588]

currently parsing an &entity;


STATE_TUTORIAL_ITAG = 102 [line 548]

currently parsing an {@inline tag}


STATE_TUTORIAL_NOEVENTS = 101 [line 538]

currently in starting state


STATE_TUTORIAL_OPENTAG = 103 [line 558]

currently parsing an open <tag>


STATE_TUTORIAL_SINGLEQUOTE = 108 [line 608]

currently parsing a <!-- comment -->


TUTORIAL_EVENT_ATTRIBUTE = 4 [line 563]

used when a <tag attr="attribute"> is found


TUTORIAL_EVENT_CLOSETAG = 5 [line 573]

used when a close </tag> is found


TUTORIAL_EVENT_COMMENT = 7 [line 593]

used when a <!-- comment --> is found

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 883 of 1382

TUTORIAL_EVENT_DOUBLEQUOTE = 9 [line 613]

used when a <!-- comment --> is found


TUTORIAL_EVENT_ENTITY = 6 [line 583]

used when an &entity; is found


TUTORIAL_EVENT_ITAG = 2 [line 543]

used when an {@inline tag} is found


TUTORIAL_EVENT_NOEVENTS = 1 [line 533]

starting state
TUTORIAL_EVENT_OPENTAG = 3 [line 553]

used when an open <tag> is found


TUTORIAL_EVENT_SINGLEQUOTE = 8 [line 603]

used when a <!-- comment --> is found

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 884 of 1382

XMLpackagePageParser.inc
Parser for XML DocBook-based phpDocumentor tutorials phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2007 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Tutorial phpDocumentor Tutorials Author Gregory Beaver < [email protected]> Version CVS: $Id: XMLpackagePageParser.inc 246143 2007-11-14 01:31:24Z ashnazg $ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - PHPCS needs to ignore CVS Id length Since 1.2 License LGPL

PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES = 603 [line 69]

when tag attributes name="value" are found


PHPDOCUMENTOR_PDP_EVENT_CDATA = 602 [line 61]

when <![CDATA[ ]]> is found

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 885 of 1382

PHPDOCUMENTOR_PDP_EVENT_ENTITY = 604 [line 77]

when tag attributes name="value" are found


PHPDOCUMENTOR_PDP_EVENT_PROGRAMLISTING = 600 [line 45]

when <programlisting> is found


PHPDOCUMENTOR_PDP_EVENT_TAG = 601 [line 53]

when a DocBook <tag> is found


PHPDOCUMENTOR_PDP_STATE_ATTRIBUTES = 703 [line 73]

when tag attributes name="value" are found


PHPDOCUMENTOR_PDP_STATE_CDATA = 702 [line 65]

when <![CDATA[ ]]> is found


PHPDOCUMENTOR_PDP_STATE_ENTITY = 704 [line 81]

when tag attributes name="value" are found


PHPDOCUMENTOR_PDP_STATE_PROGRAMLISTING = 700 [line 49]

when <programlisting> is found


PHPDOCUMENTOR_PDP_STATE_TAG = 701 [line 57]

when a DocBook <tag> is found

Class Parser
[line 338]

PHP Parser for PHP 4.2.3This parser is slower than the tokenizer-based parser, and is deprecated.

Package phpDocumentor Sub-Package Parsers Author Joshua Eichorn < [email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 886 of 1382

Author Gregory Beaver < [email protected]> Version $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2000-2007 Kellin, Joshua Eichorn Deprecated in favor of phpDocumentorTParser

Constructor void function Parser::Parser() [line 487]

Set up invariant parsing variables


void function Parser::categoryTagHandler($word) [line 2046] Function Parameters:

string $word

handles @category Tag Handlers

Tutorial @category

mixed function Parser::checkEventPop($word, $pevent) [line 2612] Function Parameters:

$word $pevent

this function checks whether parameter $word is a token for popping the current event off of the Event Stack.
mixed function Parser::checkEventPush($word, $pevent) [line 2590] Function Parameters:

$word $pevent

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 887 of 1382

this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.
void function Parser::configWordParser($e) [line 2957] Function Parameters:

$value $e integer an event number

tell the parser's WordParser $wp to set up tokens to parse words by. tokens are word separators. In English, a space or punctuation are examples of tokens. In PHP, a token can be a ;, a parenthesis, or even the word "function"

See WordParser

void function Parser::defaultTagHandler($word) [line 1989] Function Parameters:

string $word

Handles all standard tags that only have a description Tag Handlers

void function Parser::endTag() [line 1971]

Called to clean up at the end of parsing a @tag in a docblock


void function Parser::exampleTagHandler($word) [line 2031] Function Parameters:

string $word

handles @example Tag Handlers

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 888 of 1382

Tutorial @example

void function Parser::getParserEventName($value) [line 2968] Function Parameters:

$value $value integer an event number

Debugging function, takes an event number and attempts to return its name
void function Parser::globalTagHandler($word) [line 2062] Function Parameters:

string $word

handles @global Tag Handlers

Tutorial @global

void function Parser::invalidTagHandler($word) [line 2003] Function Parameters:

string $word

Handles tags like '@filesource' that only work in PHP 4.3.0+ Tag Handlers

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 889 of 1382

void function Parser::packageTagHandler($word) [line 2015] Function Parameters:

string $word

handles @package Tag Handlers

Tutorial @package

void function Parser::paramTagHandler($word) [line 2192] Function Parameters:

string $word

handles @param Tag Handlers

Tutorial @param

bool function Parser::parse(&$parse_data, $path, [$base = 0], [$packages = false], $parse_data) [line 509] Function Parameters:

string $parse_data string $path int $base number of directories to drop off the bottom when creating names using path &$parse_data $packages

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 890 of 1382

Parse a new file

Static Variable Used integer $endrecur: used for recursion limiting if a handler for an event is not found

void function Parser::propertyTagHandler($word) [line 2276] Function Parameters:

string $word

Handles @property(-read or -write) and @method magic tag Tag Handlers

void function Parser::returnTagHandler($word) [line 2228] Function Parameters:

string $word

handles @return Tag Handlers

Tutorial @return

void function Parser::setupStates() [line 2628]

setup the parser tokens, and the pushEvent/popEvent arrays

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 891 of 1382

See Publisher::$tokens, Publisher::$pushEvent, Publisher::$popEvent

void function Parser::staticvarTagHandler($word) [line 2134] Function Parameters:

string $word

handles @staticvar Tag Handlers

Tutorial @staticvar

void function Parser::usesTagHandler($word) [line 2170] Function Parameters:

string $word

handles @uses Tag Handlers

Tutorial @uses

void function Parser::varTagHandler($word) [line 2252] Function Parameters:

string $word

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 892 of 1382

handles @var Tag Handlers

Tutorial @var

Class parserDescParser
[line 298]

Parses a DocBlock description to retrieve abstract representations of <pre>,<code>,<p>,<ul>,<ol>,<li>,<b>,<i>

Package phpDocumentor Sub-Package Parsers Tutorial phpDocumentor Tutorial Author Greg Beaver < [email protected]> Version $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2000-2007 Kellin, Joshua Eichorn Since 1.2

Constructor void function parserDescParser::parserDescParser() [line 349]

sets $wp to be aObjectWordParser $wp is the word parser that retrieves tokens

boolean function parserDescParser::doSimpleList($word) [line 1188] Function Parameters:

string $word line that may contain a simple list

Return a simple list, if found


Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 893 of 1382

This helper function extracts a simple list beginning with any of '.'#','+','0','1','0.','1.' and starts parsing it.

'o','-

void function parserDescParser::getParserEventName($value) [line 1462] Function Parameters:

$value

void function parserDescParser::parse(&$parse_data, [$sdesc = false], [$ind_type = 'parserDesc']) [line 363] Function Parameters:

array &$parse_data array of strings or parserInlineTags boolean $sdesc true if the description is a short description. (only 1 paragraph allowed in short desc) string $ind_type name of the class to instantiate for each paragraph. parserDesc for desc/sdesc, parserStringWithInlineTags for tag data

Parse a long or short description for tags

Static Variable Used integer $endrecur: used for recursion limiting if a handler for an event is not found Usedby parserDocBlock::postProcess()

void function parserDescParser::setupStates($sdesc) [line 1231] Function Parameters:

boolean $sdesc determines whether to allow paragraph parsing

setup the parser tokens, and the pushEvent/popEvent arrays

Global Variable Used boolean 0: used to determine whether to slow things down or not by eliminating whitespace from comments See Publisher::$tokens, Publisher::$pushEvent, Publisher::$popEvent

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 894 of 1382

Class phpDocumentorTParser
[line 56]

Tokenizer-based parser for PHP source code

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

phpDocumentorTParser::$eventHandlers mixed = array( PARSER_EVENT_ARRAY => 'handleArray', PARSER_EVENT_VAR_ARRAY => 'handleArray', PARSER_EVENT_VAR_ARRAY_COMMENT => 'handleVarArrayComment', PARSER_EVENT_CLASS => 'handleClass', PARSER_EVENT_COMMENT => 'handleComment', PARSER_EVENT_DOCBLOCK_TEMPLATE => 'handleDocBlockTemplate', PARSER_EVENT_END_DOCBLOCK_TEMPLATE => 'handleEndDocBlockTemplate', PARSER_EVENT_LOGICBLOCK => 'handleLogicBlock', PARSER_EVENT_NOEVENTS => 'defaultHandler', PARSER_EVENT_OUTPHP => 'defaultHandler', PARSER_EVENT_DEFINE => 'handleDefine', PARSER_EVENT_DEFINE_PARAMS => 'handleDefineParams', PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS => 'handleDefineParamsParenthesis', PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS => 'handleIncludeParamsParenthesis', PARSER_EVENT_DOCBLOCK => 'handleDocBlock', PARSER_EVENT_TAGS => 'handleTags', PARSER_EVENT_DESC => 'handleDesc', PARSER_EVENT_DOCKEYWORD => 'handleTag', PARSER_EVENT_DOCKEYWORD_EMAIL => 'handleDockeywordEmail', PARSER_EVENT_EOFQUOTE => 'handleHereDoc', PARSER_EVENT_FUNCTION => 'handleFunction', PARSER_EVENT_FUNCTION_PARAMS => 'handleFunctionParams',

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 895 of 1382

PARSER_EVENT_FUNCTION_PARAM_VAR => 'handleFunctionParams', PARSER_EVENT_FUNC_GLOBAL => 'handleFuncGlobal', PARSER_EVENT_DEFINE_GLOBAL => 'handleGlobal', PARSER_EVENT_GLOBAL_VALUE => 'handleGlobalValue', PARSER_EVENT_INLINE_DOCKEYWORD => 'handleInlineDockeyword', PARSER_EVENT_INCLUDE => 'handleInclude', PARSER_EVENT_INCLUDE_PARAMS => 'handleIncludeParams', PARSER_EVENT_QUOTE => 'handleQuote', PARSER_EVENT_PHPCODE => 'handlePhpCode', PARSER_EVENT_SINGLEQUOTE => 'handleSingleQuote', PARSER_EVENT_STATIC_VAR => 'handleStaticVar', PARSER_EVENT_STATIC_VAR_VALUE => 'handleStaticValue', PARSER_EVENT_VAR => 'handleVar', PARSER_EVENT_ACCESS_MODIFIER => 'handleAccessModifier', PARSER_EVENT_IMPLEMENTS => 'handleImplements', PARSER_EVENT_CLASS_CONSTANT => 'handleClassConstant', ) [line 147] phpDocumentorTParser::$inlineTagHandlers mixed = array( '*' => 'handleDefaultInlineTag', 'link' => 'handleLinkInlineTag', ) [line 188] phpDocumentorTParser::$source_location string = [line 146]

relative path of the parsed file from the base parse directory
Constructor void function phpDocumentorTParser::phpDocumentorTParser() [line 197]

Constructor
bool function phpDocumentorTParser::parse(&$parse_data, $path, [$base = 0], [$packages = false]) [line 225] Function Parameters:

string &$parse_data the parse data string $path the path int $base number of directories to drop off the bottom names using path bool $packages ???

when creating

Parse a new file

Static Variable Used int $endrecur: used for recursion limiting event is not found

if a handler for an

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 896 of 1382

Class phpDocumentor_HighlightParser
[line 226]

Highlights source code using parse()

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change class name to PhpDocumentor_* TODO CS cleanup - change package to PhpDocumentor Since 1.2.0beta3 Usedby parserExampleInlineTag::arrayConvert() - Parses the tokenized source Usedby parserSourceInlineTag::arrayConvert() - Parses the tokenized source Usedby parserExampleTag::ConvertSource() - highlights source code Usedby parserFileSourceTag::ConvertSource() - highlights source code License LGPL

Constructor void function phpDocumentor_HighlightParser::phpDocumentor_HighlightParser() [line 2322]

Initialize the $tokenpushEvent, $wordpushEvent arrays


void function phpDocumentor_HighlightParser::configWordParser(&$data) [line 2231] Function Parameters:

array &$data all tokens separated by line number

Give the word parser necessary data to begin a new parse

Usedby phpDocumentor_HighlightParser::parse() - pass $parse_data to prepare retrieval of

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 897 of 1382

tokens

void function phpDocumentor_HighlightParser::newLineNum() [line 346]

wraps the current line (via the converter) and resets it to empty

Uses Converter::SourceLine() - encloses $_line in a converter-specific format

bool function phpDocumentor_HighlightParser::parse(&$parse_data, &$converter, [$inlinesourceparse = false], [$class = false], [$linenum = false], [$filesourcepath = false]) [line 406] Function Parameters:

array &$parse_data the parse data Converter &$converter the converter object bool $inlinesourceparse whether this data is from an inline {@source} tag string|false $class if a string, it is the name of the class whose method we are parsing containing a {@source} tag false|integer $linenum starting line number from {@source linenum} false|string $filesourcepath full path to file with @filesource tag, if this is a @filesource parse

Parse a new file The parse() method is a do...while() loop that retrieves tokens one by one from the $_event_stack, and uses the token event array set up by the class constructor to call event handlers. The event handlers each process the tokens passed to them, and use the _addoutput() method to append the processed tokens to the $_line variable. The word parser calls newLineNum() every time a line is reached. In addition, the event handlers use special linking functions _link() and its cousins (_classlink(), etc.) to create in-code hyperlinks to the documentation for source code elements that are in the source code.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 898 of 1382

Static Variable Used int $endrecur: used for recursion limiting if a handler for an event is not found TODO CS cleanup - rename tokenizer_ext constant to uppercase Uses phpDocumentor_HighlightParser::setupStates() - initialize parser state variables Uses phpDocumentor_HighlightParser::configWordParser() - pass $parse_data to prepare retrieval of tokens

void function phpDocumentor_HighlightParser::setLineNum($num) [line 365] Function Parameters:

int $num line number

Start the parsing at a certain line number


void function phpDocumentor_HighlightParser::setupStates($inlinesourceparse, $class) [line 2248] Function Parameters:

bool $inlinesourceparse true if we are highlighting an inline {@source} tag's output false|string $class name of class we are going

to start from

Initialize all parser state variables

Usedby phpDocumentor_HighlightParser::parse() - initialize parser state variables Uses $_wp - sets to a new phpDocumentor_HighlightWordParser

Class phpDocumentor_HighlightWordParser
[line 69]

Retrieve tokens from an array of tokens organized by line numbers

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 899 of 1382

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change class name to PhpDocumentor_* Since 1.2.0beta3 License LGPL

void function phpDocumentor_HighlightWordParser::backupPos($last_token, [$is_pos = false]) [line 172] Function Parameters:

array|string $last_token token, or output from nextToken() bool $is_pos if true, backupPos interprets $last_token position in the internal token array of the last token

to be the

back the word parser to the previous token as defined by $last_token


array|string function phpDocumentor_HighlightWordParser::getWord() [line 147]

Retrieve the next token


array function phpDocumentor_HighlightWordParser::nextToken() [line 127]

Retrieve the position of the next token that will be parsed in the internal token array
void function phpDocumentor_HighlightWordParser::setup(&$input, &$parser) [line 85] Function Parameters:

array &$input the input phpDocumentor_HighlightParser &$parser the parser

Initialize the parser object

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 900 of 1382

Class phpDocumentor_peardoc2_XML_Beautifier
[line 49]

This

is just like XML_Beautifier, phpDocumentor_XML_Beautifier_Tokenizer

but

uses

Package phpDocumentor Sub-Package Parsers Since 1.3.0

mixed function phpDocumentor_peardoc2_XML_Beautifier::formatFile($file, [$newFile = null], [$renderer = "Plain"]) [line 63] Function Parameters:

string $file filename mixed $newFile filename for beautified XML file (if none is given, the XML string will be returned.) if you want overwrite the original file, use XML_BEAUTIFIER_OVERWRITE string $renderer Renderer to use, default is the plain xml renderer

format a file or URL

Throws PEAR_Error Access public Uses _loadRenderer() - to load the desired renderer

string function phpDocumentor_peardoc2_XML_Beautifier::formatString($string, [$renderer = "Plain"]) [line 109] Function Parameters:

string $string XML $renderer

format an XML string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 901 of 1382

Throws PEAR_Error Access public

Class phpDocumentor_TutorialHighlightParser
[line 69]

Highlights source code using parse()

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2003-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

Constructor void function phpDocumentor_TutorialHighlightParser::phpDocumentor_TutorialHighlightParser() [line 423]

Initialize the $tokenpushEvent, $wordpushEvent arrays


mixed function phpDocumentor_TutorialHighlightParser::checkEventPop($word, $pevent) [line 380] Function Parameters:

string|array $word token value integer $pevent parser event from Parser.inc

This function checks whether parameter $word is a token for popping the current event off of the Event Stack.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 902 of 1382

TODO CS cleanup - PHPCS needs to recognize docblock template tags

mixed function phpDocumentor_TutorialHighlightParser::checkEventPush($word, $pevent) [line 358] Function Parameters:

string|array $word token value integer $pevent parser event from Parser.inc

This function checks whether parameter $word is a token for pushing a new event onto the Event Stack.

TODO CS cleanup - PHPCS needs to recognize docblock template tags

void function phpDocumentor_TutorialHighlightParser::configWordParser($e) [line 341] Function Parameters:

integer $e an event number

Tell the parser's WordParser $wp to set up tokens to parse words by. Tokens are word separators. In English, a space or punctuation are examples of tokens. In PHP, a token can be a ;, a parenthesis, or even the word "function"

See WordParser Usedby phpDocumentor_TutorialHighlightParser::parse() - pass $parse_data to prepare retrieval of tokens

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 903 of 1382

string|int function phpDocumentor_TutorialHighlightParser::getParserEventName($value) [line 508] Function Parameters:

int $value the event number

searches for a parser event name based on its number


void function phpDocumentor_TutorialHighlightParser::newLineNum() [line 115]

advances output to a new line

Uses Converter::SourceLine() - encloses $_line in a converter-specific format

bool function phpDocumentor_TutorialHighlightParser::parse($parse_data, &$converter, [$filesourcepath = false], [$linenum = false]) [line 166] Function Parameters:

string $parse_data blah Converter &$converter blah false|string $filesourcepath full path to file with @filesource tag, this is a @filesource parse false|integer $linenum starting line number from

if {@source linenum}

Parse a new file The parse() method is a do...while() loop that retrieves tokens one by one from the $_event_stack, and uses the token event array set up by the class constructor to call event handlers. The event handlers each process the tokens passed to them, and use the _addoutput() method to append the processed tokens to the $_line variable. The word parser calls newLineNum() every time a line is reached. In addition, the event handlers use special linking functions _link() and its cousins (_classlink(), etc.) to create in-code hyperlinks to the documentation for source code elements that are in the source code.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 904 of 1382

Static Variable Used integer $endrecur: used for recursion limiting if a handler for an event is not found TODO CS cleanup - unable to get function signature below 85char wide Uses phpDocumentor_TutorialHighlightParser::setupStates() - initialize parser state variables Uses phpDocumentor_TutorialHighlightParser::configWordParser() - pass $parse_data to prepare retrieval of tokens

void function phpDocumentor_TutorialHighlightParser::setLineNum($num) [line 130] Function Parameters:

int $num the line number

Start the parsing at a certain line number


void function phpDocumentor_TutorialHighlightParser::setupStates($parsedata) [line 403] Function Parameters:

bool|string $parsedata true if we are highlighting an inline {@source} tag's output, or the name of class we are going to start from

Initialize all parser state variables

Usedby phpDocumentor_TutorialHighlightParser::parse() - initialize parser state variables Uses $_wp - sets to a new phpDocumentor_HighlightWordParser

Class phpDocumentor_XML_Beautifier_Tokenizer
[line 50]

Highlights source code using parse()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 905 of 1382

Package phpDocumentor Sub-Package Parsers

phpDocumentor_XML_Beautifier_Tokenizer::$eventHandlers array = array( PHPDOC_XMLTOKEN_EVENT_NOEVENTS => 'normalHandler', PHPDOC_XMLTOKEN_EVENT_XML => 'parseXMLHandler', PHPDOC_XMLTOKEN_EVENT_PI => 'parsePiHandler', PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE => 'attrHandler', PHPDOC_XMLTOKEN_EVENT_OPENTAG => 'tagHandler', PHPDOC_XMLTOKEN_EVENT_IN_CDATA => 'realcdataHandler', PHPDOC_XMLTOKEN_EVENT_DEF => 'defHandler', PHPDOC_XMLTOKEN_EVENT_CLOSETAG => 'closetagHandler', PHPDOC_XMLTOKEN_EVENT_ENTITY => 'entityHandler', PHPDOC_XMLTOKEN_EVENT_COMMENT => 'commentHandler', PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE => 'stringHandler', PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE => 'stringHandler', PHPDOC_XMLTOKEN_EVENT_CDATA => 'parseCdataHandler', ) [line 64] Constructor void function phpDocumentor_XML_Beautifier_Tokenizer::phpDocumentor_XML_Beautifier_Tokenizer() [line 570]

Initialize the $tokenpushEvent, $wordpushEvent arrays


mixed function phpDocumentor_XML_Beautifier_Tokenizer::checkEventPop($word, $pevent) [line 535] Function Parameters:

$word $pevent

this function checks whether parameter $word is a token for popping the current event off of the Event Stack.
mixed function phpDocumentor_XML_Beautifier_Tokenizer::checkEventPush($word, $pevent) [line 513] Function Parameters:

$word $pevent

this function checks whether parameter $word is a token for pushing a new event onto the Event Stack.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 906 of 1382

void function phpDocumentor_XML_Beautifier_Tokenizer::configWordParser($e) [line 504] Function Parameters:

$value $e integer an event number

tell the parser's WordParser $wp to set up tokens to parse words by. tokens are word separators. In English, a space or punctuation are examples of tokens. In PHP, a token can be a ;, a parenthesis, or even the word "function"

See WordParser Usedby phpDocumentor_XML_Beautifier_Tokenizer::parseString() - pass $parse_data to prepare retrieval of tokens

void function phpDocumentor_XML_Beautifier_Tokenizer::getParserEventName($value) [line 661] Function Parameters:

$value

void function phpDocumentor_XML_Beautifier_Tokenizer::incdataHandler($parser, $cdata) [line 408] Function Parameters:

object XML $parser parser object string $cdata CDATA

Handler for real character data

Access protected

bool function phpDocumentor_XML_Beautifier_Tokenizer::parseString($parse_data, 1, 2, 3) [line 108]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 907 of 1382

Function Parameters:

Converter 1 false|string 2 full path to file with @filesource tag, if this false|integer 3 starting line number from {@source linenum} string $parse_data

is a @filesource parse

Parse a new file The parse() method is a do...while() loop that retrieves tokens one by one from the $_event_stack, and uses the token event array set up by the class constructor to call event handlers. The event handlers each process the tokens passed to them, and use the _addoutput() method to append the processed tokens to the $_line variable. The word parser calls newLineNum() every time a line is reached. In addition, the event handlers use special linking functions _link() and its cousins (_classlink(), etc.) to create in-code hyperlinks to the documentation for source code elements that are in the source code.

Static Variable Used integer $endrecur: used for recursion limiting if a handler for an event is not found Uses phpDocumentor_XML_Beautifier_Tokenizer::setupStates() - initialize parser state variables Uses phpDocumentor_XML_Beautifier_Tokenizer::configWordParser() - pass $parse_data to prepare retrieval of tokens

void function phpDocumentor_XML_Beautifier_Tokenizer::setupStates($parsedata, 1) [line 553] Function Parameters:

false|string 1 name of class we are going to start from boolean $parsedata true if we are highlighting an inline {@source} tag's

output

Initialize all parser state variables

Usedby phpDocumentor_XML_Beautifier_Tokenizer::parseString() - initialize parser state

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 908 of 1382

variables Uses $_wp - sets to a new phpDocumentor_HighlightWordParser

Class ppageParser
[line 3026]

Global package page parser

Package phpDocumentor Sub-Package Parsers Tutorial phpDocumentor Tutorials Author Joshua Eichorn < [email protected]> Author Gregory Beaver < [email protected]> Version $Id: Parser.inc 238276 2007-06-22 14:58:30Z ashnazg $ Copyright 2000-2007 Kellin, Joshua Eichorn Deprecated in favor of tutorials

ppageParser::$package string = false [line 3029] ppageParser::$subpackage string = '' [line 3031] Constructor void function ppageParser::ppageParser() [line 3035]

set up invariant Parser variables


void function ppageParser::defaultHandler($word, $pevent) [line 3149] Function Parameters:

string $word token integer $pevent parser event

Handles all non-inline tags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 909 of 1382

void function ppageParser::handleInlineDockeyword($word, $pevent) [line 3165] Function Parameters:

string $word token integer $pevent parser event

handler for INLINE_DOCKEYWORD. this handler recognizes {@inline tags} like link, and parses them, replacing them directly in the text flow with their output.

mixed function ppageParser::parse(&$parse_data, $xml, [$package = 'default'], [$subpackage = ''], [$tutorial = ''], [$category = 'default'], [$path = ''], $parse_data) [line 3071] Function Parameters:

string $parse_data string $package int $subpackage &$parse_data $xml $tutorial $category $path

Parse a new file


void function ppageParser::setupStates() [line 3047]

set up invariant Parser variables

Class XMLPackagePageParser
[line 98]

Used to parse XML DocBook-based tutorials

Package phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 910 of 1382

Sub-Package Parsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2 License LGPL

XMLPackagePageParser::$context array = [line 125]

Var the tag stack

XMLPackagePageParser::$eventHandlers array = array( PHPDOCUMENTOR_PDP_EVENT_TAG => 'handleTag', PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES => 'handleAttributes', PHPDOCUMENTOR_PDP_EVENT_CDATA => 'handleCData', PARSER_EVENT_NOEVENTS => 'defaultHandler', PARSER_EVENT_COMMENTBLOCK => 'ignoreHandler', PARSER_EVENT_OUTPHP => 'ignoreHandler', PARSER_EVENT_QUOTE => 'handleQuote', PHPDOCUMENTOR_PDP_EVENT_ENTITY => 'handleEntity', ) [line 103] XMLPackagePageParser::$pars array = array() [line 117] XMLPackagePageParser::$refsect1id mixed = false [line 119] XMLPackagePageParser::$refsect2id mixed = false [line 120] XMLPackagePageParser::$refsect3id mixed = false [line 121] Constructor void function XMLPackagePageParser::XMLPackagePageParser() [line 138]

Set up the wordparser 1 function XMLPackagePageParser() 2 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 911 of 1382

3 4

$this -> }

wp =new ObjectWordParser(true);

Uses ObjectWordParser

mixed function XMLPackagePageParser::getParserEventName($value) [line 615] Function Parameters:

mixed $value a value

debugging function 1 function getParserEventName ($value) 2 { 3 $lookup= array( 4 PARSER_EVENT_NOEVENTS 5 => "PARSER_EVENT_NOEVENTS" , 6 PHPDOCUMENTOR_PDP_EVENT_TAG 7 => "PHPDOCUMENTOR_PDP_EVENT_TAG" , 8 PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES 9 => "PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES" 10 PHPDOCUMENTOR_PDP_EVENT_CDATA 11 => "PHPDOCUMENTOR_PDP_EVENT_CDATA" , 12 PHPDOCUMENTOR_PDP_EVENT_LIST 13 => "PHPDOCUMENTOR_PDP_EVENT_LIST" , 14 PARSER_EVENT_QUOTE 15 => "PARSER_EVENT_QUOTE" , 16 PHPDOCUMENTOR_PDP_EVENT_ENTITY 17 => "PHPDOCUMENTOR_PDP_EVENT_ENTITY" , 18 PHPDOCUMENTOR_PDP_EVENT_COMMENT 19 => "PHPDOCUMENTOR_PDP_EVENT_COMMENT" 20 PHPDOCUMENTOR_PDP_EVENT_PI 21 => "PHPDOCUMENTOR_PDP_EVENT_PI" , 22 ); 23 if (isset( $lookup [$value])) { 24 return$lookup [$value]; 25 } else { 26 return$value; 27 } 28 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 912 of 1382

Static

bool function XMLPackagePageParser::parse($parse_data, $tutorial) [line 155] Function Parameters:

string $parse_data the parse data array $tutorial for format, see Io::getTutorials()

Parse a new file

Static Variable Used integer $endrecur: used for recursion limiting event is not found Uses parserTutorial - using Publisher::PublishEvent(), a new tutorial is created from the file parsed, and passed to the Intermediate Parser

if a handler for an

void function XMLPackagePageParser::setupStates() [line 524]

setup the parser tokens, and the pushEvent/popEvent arrays

See Publisher::$tokens, Publisher::$pushEvent, Publisher::$popEvent

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 913 of 1382

find_phpdoc.php
Utility file to locate phpDocumentor for a non-PEAR installation phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2007 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package setup Author Gregory Beaver < [email protected]> Version CVS: $Id: find_phpdoc.php 246330 2007-11-17 03:09:41Z ashnazg $ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change subpackage to Setup TODO CS cleanup - change package to PhpDocumentor Since 1.2 Filesource Source Code for this file License LGPL

include '' [line 46]

Dummy value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 914 of 1382

PackagePageElements.inc
Data structures used in parsing XML DocBook-based tutorials Conversion of DocBook-based tutorials is performed using special Converter class methods. By default, these methods simply retrieve simple rules for replacement of tags and slight re-ordering from the options.ini file present for every template. In future versions, there may be utilization of xslt or other more powerful protocols. However, for most situations, the power of these classes will be more than sufficient to handle very complex documentation. Note that an entire tutorial is contained in a single parserXMLDocBookTag, matching the document model for DocBook. The top-level tag, <refentry>, contains every other tag and all text. phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2008 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Tutorial Tutorial phpDocumentor Tutorials Author Gregory Beaver < [email protected]> Version CVS: $Id: PackagePageElements.inc 253643 2008-02-24 04:27:54Z ashnazg $ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 1.2.0

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 915 of 1382

License LGPL

Class parserCData
[line 72]

Represents <![CDATA[ ]]> sections. These sections are interpreted as plain text

Package phpDocumentor Sub-Package Tutorial Tutorial phpDocumentor Tutorials Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* License LGPL

string function parserCData::Convert(&$c, [$postprocess = true]) [line 84] Function Parameters:

Converter &$c the output converter bool $postprocess if postprocessing is needed

calls the output conversion

TODO CS cleanup - rename to convert for camelCase rule Uses Converter::getCData() - convert contents to text

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 916 of 1382

Class parserEntity
[line 479]

a standard entity like &rdquo; This class is designed to represent all DocBook entities.

Package phpDocumentor Sub-Package Tutorial Tutorial phpDocumentor Tutorials Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

Constructor void function parserEntity::parserEntity($name) [line 486] Function Parameters:

string $name entity name

sets up the entity


string function parserEntity::Convert(&$c, [$postprocess = true]) [line 501] Function Parameters:

Converter &$c the output converter bool $postprocess if postprocessing is needed

calls the output conversion

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 917 of 1382

TODO CS cleanup - rename to convert for camelCase rule Uses Converter::TranslateEntity() - convert contents to text

Class parserXMLDocBookTag
[line 122]

a standard XML DocBook Tag This class is designed to represent all DocBook tags. It is intelligent enough to understand the <title> tag, and also the <refname> tag for as title for <refentry>

Package phpDocumentor Sub-Package Tutorial Tutorial phpDocumentor Tutorials Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2008 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* TODO CS cleanup - rename to parserXmlDocBookTag for camelCase rule Since 1.2 License LGPL

parserXMLDocBookTag::$attributes array = array() [line 130]

Attributes from the XML tag Format: array(attrname => attrvalue, attrname => attrvalue,...)

parserXMLDocBookTag::$name

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 918 of 1382

string = [line 135]

Name of the tag


Constructor void function parserXMLDocBookTag::parserXMLDocBookTag($name) [line 165] Function Parameters:

string $name tag name

sets up the tag

TODO CS cleanup - rename to parserXmlDocBookTag for camelCase rule

mixed function parserXMLDocBookTag::add($el) [line 443] Function Parameters:

parserEntity|parserCData|parserXMLDocBookTag|string $el nested tag, entity, or text

Add contents to this tag. There are four kinds of data in a DocBook tutorial: tags - normal tags like <refentry> entities - normal entities like &rdquo; <![CDATA[ - character data that should not be interpreted, like <programlisting> contents 4. text - normal non-markup text All four kinds of data are added here
1. 2. 3.

void function parserXMLDocBookTag::addAttribute($name, $value) [line 271] Function Parameters:

string $name attribute name string|parserIdInlineTag $value value of attribute

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 919 of 1382

Add an xml tag attribute name="value" pair if the attribute is id, value must be a parserIdInlineTag

void function parserXMLDocBookTag::addCData($word) [line 256] Function Parameters:

string $word word to add

add a word to CData


string function parserXMLDocBookTag::Convert(&$c, [$postprocess = true]) [line 180] Function Parameters:

Converter &$c the output converter bool $postprocess if postprocessing is needed

calls the output conversion

Uses Converter::TranslateTag() - Calls this to enclose the contents of the DocBook tag based on the values in template options.ini file

void function parserXMLDocBookTag::endCData() [line 211]

Adds $_cdata to $value


string function parserXMLDocBookTag::getId(&$c) [line 323] Function Parameters:

Converter &$c the output converter

Return converter-specific formatting of ID. Passes $c to parserIdInlineTag::Convert()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 920 of 1382

bool|string function parserXMLDocBookTag::getSubsection(&$c, $subsection) [line 401] Function Parameters:

Converter &$c the output converter string $subsection converter-specific subsection

Retrieve the contents of a subsection This method uses the $_id members of nested docbook tags to retrieve the section defined by $subsection

string function parserXMLDocBookTag::getTitle(&$c) [line 347] Function Parameters:

Converter &$c the output converter

Retrieve Converter-specific formatting of the title of this element


int function parserXMLDocBookTag::getTOC([$state = false]) [line 228] Function Parameters:

false|integer $state either an index of the {@toc} tag in $this->value false, if the next index value of $this->value is needed

or

Retrieve either the table of contents index, or the location that the TOC will go

See parserXMLDocBookTag::setTOC()

boolean function parserXMLDocBookTag::hasTitle() [line 335]

Determine whether the docbook element has a title


void function parserXMLDocBookTag::setId($id) [line 309] Function Parameters:

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 921 of 1382

parserIdInlineTag $id the id value

If the id attribute is present, this method will set its id


void function parserXMLDocBookTag::setTitle($title) [line 297] Function Parameters:

parserXMLDocBookTag $title the title element

Set the title of a DocBook tag section. For most DocBook tags, the title is represented with a <title></title> tag pair. The <refentry> top-level tag is a little different. Instead of using <title></title>, phpDocumentor uses the contents of the <refname> tag in the <refnamediv> tag

void function parserXMLDocBookTag::setTOC($state, $val) [line 244] Function Parameters:

integer $state index of the TOC in $this->value parserTocInlineTag $val tag value

sets the TOC value


void function parserXMLDocBookTag::startCData() [line 201]

Begin a new CData section

See parserXMLDocBookTag::addCData()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 922 of 1382

phpDocumentorTWordParser.inc
tokenizer extension-based lexer for PHP code phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2002-2006 Gregory Beaver LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package Parsers Author Gregory Beaver < [email protected]> Version CVS: $Id: phpDocumentorTWordParser.inc 287887 2009-08-30 06:10:55Z ashnazg $ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - PHPCS needs to ignore CVS Id length Since 1.2 License LGPL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 923 of 1382

WordParser.inc
a generic lexer phpDocumentor :: automatic documentation generator PHP versions 4 and 5 Copyright (c) 2000-2007 Joshua Eichorn LICENSE: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Package phpDocumentor Sub-Package WordParsers Author Joshua Eichorn < [email protected]> Version CVS: $Id: WordParser.inc 246145 2007-11-14 01:37:03Z ashnazg $ Copyright 2000-2007 Joshua Eichorn Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor Since 0.1 License LGPL

Class ObjectWordParser
[line 130]

Like WordParser but designed to handle an array with strings and

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 924 of 1382

parserInlineTags

Package phpDocumentor Sub-Package WordParsers Author Greg Beaver < [email protected]> Version Release: @VER@ Copyright 2000-2007 Joshua Eichorn Since 1.2 Usedby XMLPackagePageParser::XMLPackagePageParser()

Constructor void function ObjectWordParser::ObjectWordParser([$casesensitive = false]) [line 138] Function Parameters:

$casesensitive

void function ObjectWordParser::getWord() [line 166] boolean function ObjectWordParser::nextIsObjectOrNonNL() [line 281]

Determine if the next word is an inline tag


void function ObjectWordParser::setup(&$input) [line 149] Function Parameters:

array &$input parserStringWithInlineTags::$value style-array, with and inline tags

alternating text

Set the word parser to go.

Class phpDocumentorTWordParser
[line 59]

Like WordParser, but expects an array of tokens from the tokenizer instead of a string.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 925 of 1382

Package phpDocumentor Sub-Package WordParsers Author Gregory Beaver < [email protected]> Version Release: @VER@ Copyright 2002-2007 Gregory Beaver Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor TODO CS cleanup - change classname to PhpDocumentor_* Since 1.2 License LGPL

void function phpDocumentorTWordParser::addFileSource($word) [line 278] Function Parameters:

array $word full file source code

Wrapper foraddSource()used to retrieve the entire source code organized by line number in setup()
void function phpDocumentorTWordParser::addSource($word, [$file = false]) [line 300] Function Parameters:

array|string $word token to add bool $file true if this should be added

to $_file_source

Generate source token arrays organized by line number This code will split up tokens that contain "\n" and add them to the source code as separate tokens on different lines.

Uses _set_sars()

int|void function phpDocumentorTWordParser::backupPos() [line 361]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 926 of 1382

backs the parser up to the previous position


string function phpDocumentorTWordParser::concatTokens($a) [line 193] Function Parameters:

array $a array of tokens

Utility function to convert a series of tokens into a string

Static

void function phpDocumentorTWordParser::findGlobal($tokens) [line 347] Function Parameters:

array $tokens tokens that represent the global variable definition

Tell the phpDocumentorTWordParser to return the entire global variable found.

if it is

Uses $_global_search

array function phpDocumentorTWordParser::getFileSource() [line 148]

gets the source code tokens

Usedby parserExampleTag::parserExampleTag() - uses to parse an example and retrieve all tokens by line number

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 927 of 1382

array function phpDocumentorTWordParser::getSource() [line 135]

loads up next set of source code


string|array function phpDocumentorTWordParser::getWord() [line 218]

Retrieve a token for the phpDocumentorTParser

void function phpDocumentorTWordParser::setup(&$input) [line 117] Function Parameters:

string &$input source code

Uses http://www.php.net/token_get_all tokenize the source code. to

bool function phpDocumentorTWordParser::tokenEquals($a, $b) [line 178] Function Parameters:

mixed $a first token mixed $b second token

Utility function to determine whether two tokens from the tokenizer are equal

Static

Class WordParser
[line 56]

Retrieves tokens from source code for use by the Parser

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 928 of 1382

Package phpDocumentor Sub-Package WordParsers Author Joshua Eichorn < [email protected]> Version Release: @VER@ Copyright 2000-2007 Joshua Eichorn See Parser Link http://pear.php.net/PhpDocumentor Link http://www.phpdoc.org TODO CS cleanup - change package to PhpDocumentor License LGPL

void function WordParser::backupPos($word) [line 346] Function Parameters:

string $word token to back up to

Backup to the previous token so that it can be retrieved again in a new context. Occasionally, a word will be passed to an event handler that should be handled by another event handler. This method allows that to happen.

string function WordParser::getBlock($start, $len) [line 305] Function Parameters:

integer $start starting position integer $len length of block to retrieve

Unused 1 function getBlock($start $len) , 2 { 3 return substr($this -> data,$start $len); , 4 }

int function WordParser::getPos() [line 290]

Returns the current pointer position, or 1 character after the end of the word
string function WordParser::getSource() [line 149]

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 929 of 1382

Retrieve source code for the last function/method


string|false function WordParser::getWord() [line 206]

Retrieve a token from the token list The Parser class relies upon this method to retrieve the next token. The $wordseperators array is a collection of strings that delineate tokens for the current parser state. $wordseperators is set by the parser with a call to Parser::configWordParser() every time a new parser state is reached. For example, while parsing the source code for a class, the word
1 1 var global

is a token, and is not, but inside a function, the reverse is true. The parser state PARSER_STATE_CLASS has a token list that includes whitespace, code delimiters like ; and {}, and comment/DocBlock indicators If the whitespace option has been turned off using setWhitespace(), then no whitespace is returned with tokens {@ is of course the string containing the PHP code to be parsed, and $pos is the cursor, or current location within the parsed data. }}

void function WordParser::setPos($pos) [line 330] Function Parameters:

integer $pos the position

Set the internal cursor within the source code


void function WordParser::setSeperator(&$seps) [line 318] Function Parameters:

array &$seps array of strings that separate tokens

Sets the list of possible separator tokens

Uses $wordseperators

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 930 of 1382

void function WordParser::setup(&$input) [line 132] Function Parameters:

string &$input source code

Initialize the WordParser


void function WordParser::setWhitespace([$val = false]) [line 360] Function Parameters:

boolean $val flag to return or strip whitespace

set parser to return or strip whitespace

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 931 of 1382

Appendices

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 932 of 1382

Appendix A - Class Trees


Package phpDocumentor

abstractLink
abstractLink classLink defineLink functionLink globalLink methodLink constLink varLink pageLink tutorialLink

bug_772441
bug_772441

Classes
Classes

ErrorTracker
ErrorTracker

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 933 of 1382

EventStack
EventStack

Io
Io

parserBase
parserBase parserElement parserClass parserConst parserDefine parserFunction parserMethod parserGlobal parserInclude parserVar parserInlineTag parserIdInlineTag parserInheritdocInlineTag parserLinkInlineTag parserTutorialInlineTag parserSourceInlineTag parserExampleInlineTag parserTocInlineTag parserStringWithInlineTags parserB parserBr parserCData parserCode parserDesc parserDescVar parserI parserKbd

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 934 of 1382

parserList parserPackagePage parserTutorial parserPre parserSamp parserTag parserAccessTag parserFileSourceTag parserExampleTag parserLinkTag parserLicenseTag parserSeeTag parserTutorialTag parserUsesTag parserUsedByTag

parserNameTag parserReturnTag parserPropertyTag parserMethodTag parserPropertyReadTag parserPropertyWriteTag parserVarTag parserParamTag parserStaticvarTag

parserXMLDocBookTag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 935 of 1382

parserData
parserData

parserDocBlock
parserDocBlock

parserEntity
parserEntity

parserPage
parserPage

phpDocumentor_IntermediateParser
phpDocumentor_IntermediateParser

phpDocumentor_peardoc2_XML_Beautifier
XML_Beautifier phpDocumentor_peardoc2_XML_Beautifier

phpDocumentor_setup

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 936 of 1382

phpDocumentor_setup

phpDocumentor_XML_Beautifier_Tokenizer
XML_Beautifier_Tokenizer phpDocumentor_XML_Beautifier_Tokenizer

ProceduralPages
ProceduralPages

Publisher
Publisher Parser parserDescParser PDFParser phpDocumentorTParser phpDocumentor_HighlightParser phpDocumentor_TutorialHighlightParser ppageParser XMLPackagePageParser

RecordWarning
RecordWarning RecordError

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 937 of 1382

tests_HighlightParserTests
tests_HighlightParserTests

tests_IntermediateParserTests
tests_IntermediateParserTests

tests_ParserClassTests
tests_ParserClassTests

tests_ParserPageTests
tests_ParserPageTests

tests_phpDocumentorSetupTests
tests_phpDocumentorSetupTests

tests_phpDocumentorTParserTests
tests_phpDocumentorTParserTests

WordParser
WordParser ObjectWordParser phpDocumentorTWordParser phpDocumentor_HighlightWordParser

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 938 of 1382

Package HTML_TreeMenu

HTML_TreeMenu
HTML_TreeMenu

HTML_TreeMenu_Presentation
HTML_TreeMenu_Presentation HTML_TreeMenu_DHTML HTML_TreeMenu_Listbox

HTML_TreeNode
HTML_TreeNode DirNode

Package tests

a
a

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 939 of 1382

a
a

b553607_Parser
b553607_Parser

brokenlinkstovars
brokenlinkstovars

bug540341
bug540341

bug557861
bug557861

bug_489398
bug_489398

bug_556894_base
bug_556894_base bug_556894_sub1 bug_556894_sub2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 940 of 1382

childofpriv
priv childofpriv

ClubBase
PEAR ClubBase

ctest
ctest

few
few

functionincomment
functionincomment

iConverter
iConverter iHTMLConverter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 941 of 1382

iiparserBase
iiparserBase

iNewRender
iNewRender

iParser
iParser

iparserElement
iparserElement

mama
mama baby

metoo
metoo

multipl
multipl

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 942 of 1382

notseen
notseen

parent_b587733
parent_b587733 kiddie_b587733

priv1
priv1

RecordWarning
RecordWarning

summary_form
summary_form

test
test

test2
test2

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 943 of 1382

testarraybug
testarraybug

testClass
testClass

testme
testme

tests_HighlightParserGetInlineTagsTests
PHPUnit_Framework_TestCase tests_HighlightParserGetInlineTagsTests

tests_IntermediateParserAddPrivatePageTests
PHPUnit_Framework_TestCase tests_IntermediateParserAddPrivatePageTests

tests_ParserClassGetSourceLocationTests
PHPUnit_Framework_TestCase tests_ParserClassGetSourceLocationTests

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 944 of 1382

tests_ParserPageGetSourceLocationTests
PHPUnit_Framework_TestCase tests_ParserPageGetSourceLocationTests

tests_phpDocumentorSetupCleanConverterNamePieceTests
PHPUnit_Framework_TestCase tests_phpDocumentorSetupCleanConverterNamePieceTests

tests_phpDocumentorSetupDecideOnOrOffTests
PHPUnit_Framework_TestCase tests_phpDocumentorSetupDecideOnOrOffTests

tests_phpDocumentorTParserGetInlineTagsTests
PHPUnit_Framework_TestCase tests_phpDocumentorTParserGetInlineTagsTests

test_541886
test_541886

Package org-phpdoc Package Converters

Converter
Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 945 of 1382

Converter CHMdefaultConverter HTMLframesConverter HTMLSmartyConverter PDFdefaultConverter XMLDocBookConverter XMLDocBookpeardoc2Converter

PDFParser
Parser (Different package) PDFParser

phpdocpdf
Cezpdf (Different package) phpdocpdf

Package XML_Beautifier

PHPDoc_XML_Beautifier_Renderer_Plain
XML_Beautifier_Renderer PHPDoc_XML_Beautifier_Renderer_Plain

Package Cpdf

Cpdf
Cpdf Cezpdf phpdocpdf

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 946 of 1382

Package Smarty

Config_File
Config_File

Smarty
Smarty Smarty_Compiler

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 947 of 1382

Appendix B README/CHANGELOG/INSTALL

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 948 of 1382

README

$Id: README 242918 2007-09-26 02:57:11Z ashnazg $ ################################################################################ phpDocumentor ################################################################################ Installation ################################################################################ Installation for phpDocumentor is as simple as installing PHP and a web server. If you need help installing a webserver or php, refer to the documentation that comes with the webserver or with php. phpDocumentor also runs from the command-line, and only requires that PHP CLI version be installed. All users with PEAR should either install this version directly from the package.xml file included in the distribution, or install via "pear install PhpDocumentor." The command-line interface "phpdoc" will be in the path, you can use it immediately on both windows and unix. The web interface is in a subdirectory of your document root, be sure to "pear config-set data_dir /path/to/my/htdocs" prior to installation. To use phpDocumentor as a command-line tool in *nix-based systems, simply run the phpdoc script. In windows, run "c:\php\php.exe phpdoc" where C:\php is the path to the cli version of php. The phpdoc command-line interface will not run with the ISAPI module of PHP. To see the command line options, use phpdoc -h or read at the bottom of this README. There is a BASH shell script that you can put inside your project that can save time writing command-line options of phpdoc. Simply copy makedoc.sh to your project path and edit it. When you wish to rebuild the documentation, run it again. Note that .ini scripts are far easier to edit and are supported via "phpdoc -c file.ini" To use phpDocumentor's web interface, install the files into a subdirectory of your document root (read the webserver's documentation for more information if you don't understand how to install into a subdirectory of your document root). Then, browse to the web page as you would to any other web page. If you encounter problems, make sure that the web server has write access permissions to the output directory that you choose. Again, your web server documentation has detailed information on how to do this. The command-line interface will not have problems with access. If you need more detailed help, check out INSTALL. ################################################################################ Release Notes ################################################################################ Release notes for the newest version are in Release-@VER@.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 949 of 1382

@VER@ is out, a @STABILITY@ release. To learn how to write PHPDoc-style documentation, run phpDocumentor on itself, with ./phpdoc -c makedocs. Before you do, modify users/makedocs.ini to contain the proper path values. If you find a bug please post it at: http://pear.php.net/bugs/search.php?cmd=display&package_name%5B%5D=PhpDocumentor ################################################################################ General Notes ################################################################################ phpDocumentor is hosted at phpdoc.org, with downloads and mailing list through sourceforge.net, and primary support at PEAR. webpage: http://phpdoc.org/ documentation: http://phpdoc.org/manual.php mirror: http://phpdocu.sourceforge.net projectpage: http://www.phpdoc.org PEAR: http://pear.php.net/package/PhpDocumentor For a list of people who have helped work on this project please read the Authors file. phpDocumentor @VER@ is released under the LGPL version 2.1, text is in LICENSE. ################################################################################ Feature Notes ################################################################################ phpDocumentor is a JavaDoc-like automatic documentation generator for PHP, written in PHP. It is the most versatile tool for documenting PHP. For users new to phpDocumentor, phpDocumentor uses an event-driven parser and intermediary data structures that allow it to perform at a level other automatic documentors for PHP cannot achieve: --parsing any php file, with multiple classes and functions in the same file --fully compliant with even the most esoteric php syntax ($string = <<< EOF, for example) --ability to generate multiple output formats --extremely fast parsing --error/warnings by line number and file to allow for debugging of documentation tags --multiple output templates to easily customize the look of generated documentation --extensive documentation of the package, including a detailed specification for tags and templates --LGPL License New since version 1.3.0: --PHP 5 Parsing --hundreds of bugfixes from version 1.2.3 If something is missing from this list make sure sure to file a feature request at PEAR: http://pear.php.net/bugs/search.php?cmd=display&package_name%5B%5D=PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 950 of 1382

If you want to help code that new feature and get it just right, please let us know. Any help is greatly appreciated, just contact the phpDocumentor team for information on getting started. phpDocumentor needs php 4.1.0 or greater, but you'll see the best performance in the newest version. The recommended version for phpDocumentor 1.3.0 and up is PHP 5.1.3 or newer. ################################################################################ Command Line notes ################################################################################ Read the documentation at http://www.phpdoc.org/docs for the most up-to-date command-line information. You can also generate documentation from the source using: phpdoc -c makedocs Run this command from the installation directory, and make sure you have full write and directory creation permissions or it will not work. Generated documentation is accessible via Documentation/new/index.html ################################################################################ If you run phpdoc and get : bash: ./phpdoc: No such file or directory Then you haven't installed the cgi version of php. Go to your php src dir and try make clean ./configure make make install phpdoc should work now. If you're using php 4.2.0 or higher you will want to use the cli version instead of the cgi. Checkout php.net for details on these changes

################################################################################ Web Interface notes ################################################################################ Put phpdoc.php together with the *.inc files someplace on your webserver. NEVER USE THE WEB INTERFACE ON A PRODUCTION WEBSERVER. Allowing your server to write files to disk is a serious security risk, and phpDocumentor is not designed to work on insecure systems. Setup php on a development machine that has a firewall or no internet connection, and run phpDocumentor from there. Make sure your webserver can write to wherever you specify as a target or you will get lots of errors. ################################################################################ Thanks ################################################################################ Thanks to Sam Blum for his assistance with @example and other enhancements. Thanks to William K. Hardeman for his HTML:Smarty:HandS design.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 951 of 1382

Thanks to Marco von Ballmoos for transforming the HTML:frames converter and templates into a magnificent work of art. Thanks to Andrew Eddie for docbuilder and the CHM Converter enhancements. Thanks to Darren Cook for suggesting exciting new features, and making sure that they worked when implemented. Thanks to Marko Kaening, Dan Convissor for policing the source and finding bugs that would have otherwise gone undetected. Thanks to Juan Pablo Morales for the web interface. Thanks to whoever sent me the patch to make phpDocumentor work better in NT... I have your diff and patched the program but i seem to have lost your name... if you send it to me i'll add it to the Authors file. Thanks to Florian Clever for the newest set of win32 patches... they seem to have fixed the last of the problems. Thanks to EVERYONE who has provided ideas and input, without you, phpDocumentor would be nothing. ################################################################################ ################################################################################ If you have any questions please try our mailing list at [email protected]. joshua eichorn [email protected] gregory beaver [email protected] chuck burgess [email protected]

vim: set expandtab:

ChangeLog

$Id: ChangeLog 229303 2007-02-07 20:06:44Z ashnazg $ See package.xml for changelogs for all releases. Release details are under the <package><changelog> section, in the various <release> tags. Specific changelog info for each release is under each <release><notes> tag. vim: set expandtab:

INSTALL

$Id: INSTALL 256227 2008-03-28 02:27:12Z ashnazg $ phpDocumentor Installation instructions ---------------------------------------

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 952 of 1382

phpDocumentor is very easy to install. The hardest part is installing PHP and possibly a Web Server, if you plan to use the web interface phpdoc.php. To install phpDocumentor, use a compression program to decompress the contents to a directory, preserving internal directory structure of the archive. If you wish to use the web interface, you must unzip the archive into a subdirectory accessible by the web server. NOTE: There have been problems with the non GNU tar not being able to extracts some of the long directory paths properly. The simplest solution for BSD users is to download the zip version of phpDocumentor. PEAR installation ----------------This is by far the easiest way to install phpDocumentor. Included in this release is a package.xml file. If you plan to use the web interface, you must run this command prior to installation: pear config-set data_dir /path/to/public_html/pear The line above assumes that /path/to/public_html is the location of index.html if you browse to http://localhost/index.html To install or upgrade phpDocumentor, simply run pear upgrade PhpDocumentor To use the web interface, browse to http://localhost/pear/PhpDocumentor/index.html The cli interface is installed in the pear bin_dir, you can find this directory by running: pear config-show Command-line interface installation and usage instructions ---------------------------------------------------------To use phpDocumentor as a command-line interface, you need to install PHP version 4.1.0 or greater. *IMPORTANT* any version of PHP below 4.1.0 will not work with version 1.3.0 or later of phpDocumentor!!! To use the advanced tokenizer-based parser, you must have php 4.3.0 Windows ------You need the cli version of PHP (php-cli.exe or cli/php.exe in 4.3.0+). Either run phpDocumentor from the directory that PHP resides in, or put php.exe in your DOS PATH enviroment variable. The simplest usage of phpDocumentor is: C:\>php.exe "C:\Path\To\phpdoc" -t targetdir -o HTML:default:default -d parsedir where targetdir is the directory you wish phpDocumentor to create output, and parsedir is the directory you wish to parse. Unix ---Make sure that the cgi/cli version of PHP is in your path. The simplest usage of phpDocumentor is: phpdoc -t targetdir -o HTML:default:default -d parsedir

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 953 of 1382

You can also use makedoc.sh. Simply copy it to your project path and edit it. When you wish to (re)build your project's documentation, simply run it.

Web interface installation and usage instructions ------------------------------------------------To use phpDocumentor as a web interface, you need to install a Web server and configure it, as well as install PHP version 4.1.0 or greater. Consult the documentation of your webserver and of PHP for installation support. Windows and Unix ---------------Open a web browser and browse to index.html at the location that you set up. Instructions are in the web interface. vim: set expandtab :

FAQ

################################################################################ phpDocumentor Frequently Asked Questions ################################################################################ Introduction ################################################################################ Before we start with questions and their answers, make sure to read the documentation *thoroughly* found at http://www.phpdoc.org/manual.php. The complexity of phpDocumentor can be a bit impenetrable until you understand the logic behind it. If you have read the documentation thoroughly, and have read this FAQ and you are still lost, please go directly to the bug database at http://sourceforge.net/tracker/?group_id=11194&atid=111194 and read through the open bugs. If you don't find the solution to your problem (or proof that it at least is not your fault), then go to the help forum and post a help message at http://sourceforge.net/forum/forum.php?forum_id=35065. ################################################################################ All Questions (Table of Contents) ################################################################################ Installation Q: There is no package.xml in the release, where is it? Documentation Errors Q: I keep getting an illegal package tag error for the first DocBlock in a file, isn't this a page-level DocBlock? Q: I keep getting a warning that there is no @package tag in file xxx.php, but there is a @package tag in the class definition, doesn't this apply to the file? Feature Requests Q: Can you implement the @example tag inline so that I can put PHP source code examples directly in DocBlocks? Crash/Segfaults

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 954 of 1382

Q: phpDocumentor crashes if I use __FUNCTION__!!! ################################################################################ Installation ################################################################################ Q: There is no package.xml in the release, where is it? A: this problem occurs when one does the faulty steps of: $ tar xvf PhpDocumentor-1.3.1.tgz $ pear install package.xml instead, the user should simply run: $ pear install PhpDocumentor-1.3.1.tgz or, if the zlib extension is not enabled: $ gunzip PhpDocumentor-1.3.1.tgz $ pear install PhpDocumentor-1.3.1.tar ################################################################################ Documentation Errors ################################################################################ Q: I keep getting an illegal package tag error for the first DocBlock in a file, isn't this a page-level DocBlock? -----[[UPDATE]] ---VERSION 1.2.2 has a different page-level docblock recognition algorithm ---Now, the first docblock in a file is a page-level docblock if it contains ---a @package tag. --A: Please read the documentation very carefully. A page-level DocBlock does occur at the start of a file, but the first DocBlock is not always a page-level DocBlock! Why is this? Very often, you will want to document the entire page, or describe it (this page contains functions for blah), and also document the first item in a page separately. An example: <?php /** * This file contains all foobar functions and defines * @package mypackage */ /** * controls parsing of bar information */ define('parse_bar',true); ?> The page has its own information, and the define has its own information. An example of what not to do: <?php /** * This file contains all foobar functions and defines * @package mypackage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 955 of 1382

*/ define('parse_bar',true); ?> Here, the DocBlock belongs to the define and not to the page! phpDocumentor can successfully parse this DocBlock, but it will apply the comment to the documentation of define('parse_bar',true); and not to the page. Therefore, it warns you that your @package tag will be ignored because defines may not contain a @package tag. Q: I keep getting a warning that there is no @package tag in file xxx.php, but there is a @package tag in the class definition, doesn't this apply to the file? A: No. This example does not have a page-level DocBlock: <?php /** * This class is in package mypackage * @package mypackage */ class in_mypackage {...} ?> phpDocumentor therefore assumes the page-level package is the same as the class package, mypackage. This is fine in most cases, but if multiple classes are in the same file with different packages, as in: <?php /** * This class is in package mypackage * @package mypackage */ class in_mypackage {...} /** * This class is in package anotherpackage * @package anotherpackage */ class in_anotherpackage {...} ?> There is no way to determine which package the page should belong to, and phpDocumentor will automatically put it in the default package. This can cause incredible headaches debugging, and so we have added a warning in the 1.2.0 series that informs you if the package is inferred by phpDocumentor. To fix this warning, simply place a page-level DocBlock with a @package tag like: <?php /** * This file contains two packages * @package filepackage */ /** * This class is in package mypackage * @package mypackage */ class in_mypackage {...} /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 956 of 1382

* This class is in package anotherpackage * @package anotherpackage */ class in_anotherpackage {...} ?> ################################################################################ Feature Requests ################################################################################ Q: Can you implement the @example tag inline so that I can put PHP source code examples directly in DocBlocks? A: This is implemented using the HTML <code></code> tags as in: /** * Short description * * Start of long description, here is a code example: * <code> * $my_phpcode = "easy to explain"; * </code> * More text * <code> * define('morecode',true); * </code> */ ################################################################################ Crash/Segfaults ################################################################################ Q: phpDocumentor crashes if I use __FUNCTION__!!! A: This is caused by a known bug in all PHP versions prior to 4.3.2. It was fixed in PHP 4.3.2RC1, you must upgrade to PHP 4.3.2 if you use __FUNCTION__ in code that you wish to document (sorry!) or apply the bugfix patch to the tokenizer extension and recompile php (see the php.internals archive at php.net for help)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 957 of 1382

Appendix C - Source Code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 958 of 1382

Package phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 959 of 1382

File Source for Converter.inc


Documentation for this file is available at Converter.inc
1 <?php 2 /** 3 * Base class for all Converters 4 * 5 * phpDocumentor :: automatic documentation generator 6 * 7 * PHP versions 4 and 5 8 * 9 * Copyright (c) 2001-2006 Gregory Beaver 10 * 11 * LICENSE: 12 * 13 * This library is free software; you can redistribute it 14 * and/or modify it under the terms of the GNU Lesser General 15 * Public License as published by the Free Software Foundation; 16 * either version 2.1 of the License, or (at your option) any 17 * later version. 18 * 19 * This library is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 * 28 * @package Converters 29 * @author Greg Beaver <[email protected]> 30 * @copyright 2001-2006 Gregory Beaver 31 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 32 * @version CVS: $Id: Converter.inc 287891 2009-08-30 08:08:00Z ashnazg $ 33 * @filesource 34 * @link http://www.phpdoc.org 35 * @link http://pear.php.net/PhpDocumentor 36 * @see parserDocBlock, parserInclude, parserPage, parserClass 37 * @see parserDefine, parserFunction, parserMethod, parserVar 38 * @since 1.0rc1 39 */ 40 /** 41 * Smarty template files 42 */ 43 include_once("phpDocumentor/Smarty-2.6.0/libs/Smarty.class.php" ); 44 /** 45 * Base class for all output converters. 46 * 47 * The Converter marks the final stage in phpDocumentor. phpDocumentor works 48 * in this order: 49 * 50 * <pre>Parsing => Intermediate Parsing organization => Conversion to output</pre> 51 * 52 * A Converter takes output from the {@link phpDocumentor_IntermediateParser} and 53 * converts it to output. With version 1.2, phpDocumentor includes a variety 54 * of output converters: 55 * <ul> 56 * <li> {@link HTMLframesConverter}</li> 57 * <li> {@link HTMLSmartyConverter}</li> 58 * <li> {@link PDFdefaultConverter}</li> 59 * <li> {@link CHMdefaultConverter}</li> 60 * <li> {@link CSVdia2codeConverter}</li> 61 * <li> {@link XMLDocBookConverter}</li> 62 * </ul> 63 * {@internal 64 * The converter takes output directly from {@link phpDocumentor_IntermediateParser} 65 * and using {@link walk()} or {@link walk_everything} (depending on the value of 66 * {@link $sort_absolutely_everything}) it "walks" over an array of phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 960 of 1382

elements.}}} 67 * 68 * @package Converters 69 * @abstract 70 * @author Greg Beaver <[email protected]> 71 * @since 1.0rc1 72 * @version $Id: Converter.inc 287891 2009-08-30 08:08:00Z ashnazg $ 73 */ 74 class Converter 75 { 76 /** 77 * This converter knows about the new root tree processing 78 * In order to fix PEAR Bug #6389 79 * @var boolean 80 */ 81 var $processSpecialRoots = false; 82 /** 83 * output format of this converter 84 * 85 * in Child converters, this will match the first part of the -o command-line 86 * as in -o HTML:frames:default "HTML" 87 * @tutorial phpDocumentor.howto.pkg#using.command-line.output 88 * @var string 89 */ 90 var $outputformat = 'Generic'; 91 /** 92 * package name currently being converted 93 * @var string 94 */ 95 var $package = 'default'; 96 /** 97 * subpackage name currently being converted 98 * @var string 99 */ 100 var $subpackage = ''; 101 /** 102 * set to a classname if currently parsing a class, false if not 103 * @var string|false 104 */ 105 var $class = false; 106 /**#@+ 107 * @access private 108 */ 109 /** 110 * the workhorse of linking. 111 * 112 * This array is an array of link objects of format: 113 * [package][subpackage][eltype][elname] = descendant of {@link abstractLink} 114 * eltype can be page|function|define|class|method|var 115 * if eltype is method or var, the array format is: 116 * [package][subpackage][eltype][class][elname] 117 * @var array 118 * @see functionLink, pageLink, classLink, defineLink, methodLink, varLink, globalLink 119 */ 120 var $links = array(); 121 122 /** 123 * the workhorse of linking, with allowance for support of multiple 124 * elements in different files. 125 * 126 * This array is an array of link objects of format: 127 * [package][subpackage][eltype][file][elname] = descendant of {@link abstractLink} 128 * eltype can be function|define|class|method|var 129 * if eltype is method or var, the array format is: 130 * [package][subpackage][eltype][file][class][elname] 131 * @var array 132 * @see functionLink, pageLink, classLink, defineLink, methodLink, varLink, globalLink 133 */ 134 var $linkswithfile = array(); 135 /**#@-*/ 136 /** 137 * set to value of -po commandline 138 * @tutorial phpDocumentor.howto.pkg#using.command-line.packageoutput 139 * @var mixed 140 */ 141 var $package_output; 142 143 /** 144 * name of current page being converted 145 * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 961 of 1382

146 */ 147 var $page; 148 149 /** 150 * path of current page being converted 151 * @var string 152 */ 153 var $path; 154 155 /** 156 * template for the procedural page currently being processed 157 * @var Smarty 158 */ 159 var $page_data; 160 161 /** 162 * template for the class currently being processed 163 * @var Smarty 164 */ 165 var $class_data; 166 167 /** 168 * current procedural page being processed 169 * @var parserPage 170 */ 171 var $curpage; 172 /** 173 * alphabetical index of all elements sorted by package, subpackage, page, 174 * and class. 175 * @var array Format: array(package => array(subpackage => array('page'|'class' => array(path|classname => array(element, element,...))))) 176 * @uses $sort_absolutely_everything if true, then $package_elements is used, 177 * otherwise, the {@link ParserData::$classelements} and 178 * {@link ParserData::$pageelements} variables are used 179 */ 180 var $package_elements = array(); 181 /** 182 * alphabetical index of all elements 183 * 184 * @var array Format: array(first letter of element name => array( {@link parserElement} or {@link parserPage},...)) 185 * @see formatIndex(), HTMLframesConverter::formatIndex() 186 */ 187 var $elements = array(); 188 /** 189 * alphabetized index of procedural pages by package 190 * 191 * @see $leftindex 192 * @var array Format: array(package => array(subpackage => array( {@link pageLink} 1,{@link pageLink} 2,...) 193 */ 194 var $page_elements = array(); 195 /** 196 * alphabetized index of defines by package 197 * 198 * @see $leftindex 199 * @var array Format: array(package => array(subpackage => array( {@link defineLink} 1,{@link defineLink} 2,...) 200 */ 201 var $define_elements = array(); 202 /** 203 * alphabetized index of classes by package 204 * 205 * @see $leftindex 206 * @var array Format: array(package => array(subpackage => array( {@link classLink} 1,{@link classLink} 2,...) 207 */ 208 var $class_elements = array(); 209 /** 210 * alphabetized index of global variables by package 211 * 212 * @see $leftindex 213 * @var array Format: array(package => array(subpackage => array( {@link globalLink} 1,{@link globalLink} 2,...) 214 */ 215 var $global_elements = array(); 216 /** 217 * alphabetized index of functions by package 218 * 219 * @see $leftindex

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 962 of 1382

220 * @var array Format: array(package => array(subpackage => array( {@link functionLink} 1,{@link functionLink} 2,...) 221 */ 222 var $function_elements = array(); 223 /** 224 * alphabetical index of all elements, indexed by package/subpackage 225 * 226 * @var array Format: array(first letter of element name => array( {@link parserElement} or {@link parserPage},...)) 227 * @see formatPkgIndex(), HTMLframesConverter::formatPkgIndex() 228 */ 229 var $pkg_elements = array(); 230 231 /** 232 * alphabetical index of all elements on a page by package/subpackage 233 * 234 * The page itself has a link under ###main 235 * @var array Format: array(package => array(subpackage => array(path => array({@link abstractLink} descendant 1, ...))) 236 * @see formatLeftIndex() 237 */ 238 var $page_contents = array(); 239 240 /** 241 * This determines whether the {@link $page_contents} array should be sorted by element type as well as alphabetically by name 242 * @see sortPageContentsByElementType() 243 * @var boolean 244 */ 245 var $sort_page_contents_by_type = false; 246 /** 247 * This is used if the content must be passed in the order it should be read, i.e. by package, procedural then classes 248 * 249 * This fixes bug 637921, and is used by {@link PDFdefaultConverter} 250 */ 251 var $sort_absolutely_everything = false; 252 /** 253 * alphabetical index of all methods and vars in a class by package/subpackage 254 * 255 * The class itself has a link under ###main 256 * @var array 257 * Format:<pre> 258 * array(package => 259 * array(subpackage => 260 * array(path => 261 * array(class => 262 * array({@link abstractLink} descendant 1, ... 263 * ) 264 * ) 265 * ) 266 * )</pre> 267 * @see formatLeftIndex() 268 */ 269 var $class_contents = array(); 270 /** 271 * controls processing of elements marked private with @access private 272 * 273 * defaults to false. Set with command-line --parseprivate or -pp 274 * @var bool 275 */ 276 var $parseprivate; 277 /** 278 * controls display of progress information while parsing. 279 * 280 * defaults to false. Set to true for cron jobs or other situations where no visual output is necessary 281 * @var bool 282 */ 283 var $quietmode; 284 285 /** 286 * directory that output is sent to. -t command-line sets this. 287 * @tutorial phpDocumentor.howto.pkg#using.command-line.target 288 */ 289 var $targetDir = ''; 290 291 /** 292 * Directory that the template is in, relative to phpDocumentor root directory 293 * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 963 of 1382

294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373

*/ var $templateDir = ''; /** * Directory that the smarty templates are in * @var string */ var $smarty_dir = ''; /** * Name of the template, from last part of -o * @tutorial phpDocumentor.howto.pkg#using.command-line.output * @var string */ var $templateName = ''; /** * full path of the current file being converted */ var $curfile; /** * All class information, organized by path, and by package * @var Classes */ var $classes; /** * Flag used to help converters determine whether to do special source highlighting * @var boolean */ var $highlightingSource = false; /** * Hierarchy of packages * * Every package that contains classes may have parent or child classes * in other packages. In other words, this code is legal: * * <code> * /** * * @package one * * / * class one {} * * /** * * @package two * * / * class two extends one {} * </code> * * In this case, package one is a parent of package two * @var array * @see phpDocumentor_IntermediateParser::$package_parents */ var $package_parents; /** * Packages associated with categories * * Used by the XML:DocBook/peardoc2 converter, and available to others, to * group many packages into categories * @see phpDocumentor_IntermediateParser::$packagecategories * @var array */ var $packagecategories; /** * All packages encountered in parsing * @var array * @see phpDocumentor_IntermediateParser::$all_packages */ var $all_packages; /** * A list of files that have had source code generated * @var array */ var $sourcePaths = array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 964 of 1382

374 /** 375 * Controls which of the one-element-only indexes are generated. 376 * 377 * Generation of these indexes for large packages is time-consuming. This is an optimization feature. An 378 * example of how to use this is in {@link HTMLframesConverter::$leftindex}, and in {@link HTMLframesConverter::formatLeftIndex()}. 379 * These indexes are intended for use as navigational aids through documentation, but can be used for anything by converters. 380 * @see $class_elements, $page_elements, $function_elements, $define_elements, $global_elements 381 * @see formatLeftIndex() 382 * @var array 383 */ 384 var $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => true, 'globals' => true); 385 386 /** @access private */ 387 var $killclass = false; 388 /** 389 * @var string 390 * @see phpDocumentor_IntermediateParser::$title 391 */ 392 var $title = 'Generated Documentation'; 393 394 /** 395 * Options for each template, parsed from the options.ini file in the template base directory 396 * @tutorial phpDocumentor/tutorials.pkg#conversion.ppage 397 * @var array 398 */ 399 var $template_options; 400 401 /** 402 * Tutorials and Extended Documentation parsed from a tutorials/package[/subpackage] directory 403 * @tutorial tutorials.pkg 404 * @access private 405 */ 406 var $tutorials = array(); 407 408 /** 409 * tree-format structure of tutorials and their child tutorials, if any 410 * @var array 411 * @access private 412 */ 413 var $tutorial_tree = false; 414 415 /** 416 * list of tutorials that have already been processed. Used by @link _setupTutorialTree() 417 * @var array 418 * @access private 419 */ 420 var $processed_tutorials; 421 422 /** 423 * List of all @todo tags and a link to the element with the @todo 424 * 425 * Format: array(package => array(link to element, array(todo {@link parserTag},...)),...) 426 * @tutorial tags.todo.pkg 427 * @var array 428 */ 429 var $todoList = array(); 430 431 /** 432 * Directory where compiled templates go - will be deleted on exit 433 * 434 * @var string 435 * @access private 436 */ 437 var $_compiledDir = array(); 438 439 /** 440 * Initialize Converter data structures 441 * @param array {@link $all_packages} value 442 * @param array {@link $package_parents} value 443 * @param Classes {@link $classes} value 444 * @param ProceduralPages {@link $proceduralpages} value 445 * @param array {@link $package_output} value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 965 of 1382

446 * @param boolean {@link $parseprivate} value 447 * @param boolean {@link $quietmode} value 448 * @param string {@link $targetDir} value 449 * @param string {@link $templateDir} value 450 * @param string (@link $title} value 451 */ 452 function Converter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $template, $title) 453 { 454 $this-> all_packages = $allp; 455 $this-> package_parents = $packp; 456 $this-> package = $GLOBALS['phpDocumentor_DefaultPackageName']; 457 $this-> proceduralpages = & $procpages; 458 $this-> package_output = $po; 459 if (is_array($po)) 460 { 461 $a = $po[0]; 462 $this-> all_packages = array_flip($po); 463 $this-> all_packages[$a] = 1; 464 } 465 $this-> parseprivate = $pp; 466 $this-> quietmode = $qm; 467 $this-> classes = & $classes; 468 $this-> roots = $classes-> getRoots($this-> processSpecialRoots); 469 $this-> title = $title; 470 $this-> setTemplateDir($template); 471 $this-> setTargetdir($targetDir); 472 } 473 474 /** 475 * Called by IntermediateParser after creation 476 * @access private 477 */ 478 function setTutorials($tutorials) 479 { 480 $this-> tutorials = $tutorials; 481 } 482 483 /** 484 * @param pkg|cls|procthe tutorial type to search for 485 * @param tutorial name 486 * @param string package name 487 * @param string subpackage name, if any 488 * @return false|parserTutorialif the tutorial exists, return it 489 */ 490 function hasTutorial($type, $name, $package, $subpackage = '') 491 { 492 if (isset($this-> tutorials[$package][$subpackage][$type][$name . '.' . $type])) 493 return $this-> tutorials[$package][$subpackage][$type][$name . '.' . $type]; 494 return false; 495 } 496 497 /** 498 * Called by {@link walk()} while converting, when the last class element 499 * has been parsed. 500 * 501 * A Converter can use this method in any way it pleases. HTMLframesConverter 502 * uses it to complete the template for the class and to output its 503 * documentation 504 * @see HTMLframesConverter::endClass() 505 * @abstract 506 */ 507 function endClass() 508 { 509 } 510 511 /** 512 * Called by {@link walk()} while converting, when the last procedural page 513 * element has been parsed. 514 * 515 * A Converter can use this method in any way it pleases. HTMLframesConverter 516 * uses it to complete the template for the procedural page and to output its 517 * documentation 518 * @see HTMLframesConverter::endClass() 519 * @abstract 520 */ 521 function endPage() 522 { 523 } 524

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 966 of 1382

525 /** 526 * Called by {@link walk()} while converting. 527 * 528 * This method is intended to be the place that {@link $pkg_elements} is 529 * formatted for output. 530 * @see HTMLframesConverter::formatPkgIndex() 531 * @abstract 532 */ 533 function formatPkgIndex() 534 { 535 } 536 537 /** 538 * Called by {@link walk()} while converting. 539 * 540 * This method is intended to be the place that {@link $elements} is 541 * formatted for output. 542 * @see HTMLframesConverter::formatIndex() 543 * @abstract 544 */ 545 function formatIndex() 546 { 547 } 548 549 /** 550 * Called by {@link walk()} while converting. 551 * 552 * This method is intended to be the place that any of 553 * {@link $class_elements, $function_elements, $page_elements}, 554 * {@link $define_elements}, and {@link $global_elements} is formatted for 555 * output, depending on the value of {@link $leftindex} 556 * @see HTMLframesConverter::formatLeftIndex() 557 * @abstract 558 */ 559 function formatLeftIndex() 560 { 561 } 562 563 /** 564 * Called by {@link parserSourceInlineTag::stringConvert()} to allow 565 * converters to format the source code the way they'd like. 566 * 567 * default returns it unchanged (html with xhtml tags) 568 * @param string output from highlight_string() - use this function to 569 * reformat the returned data for Converter-specific output 570 * @return string 571 * @deprecated in favor of tokenizer-based highlighting. This will be 572 * removed for 2.0 573 */ 574 function unmangle($sourcecode) 575 { 576 return $sourcecode; 577 } 578 579 /** 580 * Initialize highlight caching 581 */ 582 function startHighlight() 583 { 584 $this-> _highlightCache = array(false, false); 585 $this-> _appendHighlight = ''; 586 } 587 588 function getHighlightState() 589 { 590 return $this-> _highlightCache; 591 } 592 593 function _setHighlightCache($type, $token) 594 { 595 $test = ($this-> _highlightCache[0] === $type && $this-> _highlightCache[1] == $token); 596 if (!$test) { 597 $this-> _appendHighlight = $this-> flushHighlightCache(); 598 } else { 599 $this-> _appendHighlight = ''; 600 } 601 $this-> _highlightCache = array($type, $token); 602 return $test; 603 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 967 of 1382

604 605 /** 606 * Return the close text for the current token 607 * @return string 608 */ 609 function flushHighlightCache() 610 { 611 $hc = $this-> _highlightCache; 612 $this-> _highlightCache = array(false, false); 613 if ($hc[0]) { 614 if (!isset($this-> template_options[$hc[0]]['/'.$hc[1]])) { 615 return ''; 616 } 617 return $this-> template_options[$hc[0]]['/'.$hc[1]]; 618 } 619 return ''; 620 } 621 622 /** 623 * Used to allow converters to format the source code the way they'd like. 624 * 625 * default returns it unchanged. Mainly used by the {@link HighlightParser} 626 * {@internal 627 * The method takes information from options.ini, the template options 628 * file, specifically the [highlightSourceTokens] and [highlightSource] 629 * sections, and uses them to enclose tokens. 630 * 631 * {@source } } 632 * @param integer token value from {@link PHP_MANUAL#tokenizer tokenizer constants} 633 * @param string contents of token 634 * @param boolean whether the contents are preformatted or need modification 635 * @return string 636 */ 637 function highlightSource($token, $word, $preformatted = false) 638 { 639 if ($token !== false) 640 { 641 if (!$preformatted) $word = $this-> postProcess($word); 642 if (isset($this-> template_options['highlightSourceTokens'][token_name($token)])) 643 { 644 if ($this-> _setHighlightCache('highlightSourceTokens', token_name($token))) { 645 return $word; 646 } 647 $e = $this-> _appendHighlight; 648 return $e . $this> template_options['highlightSourceTokens'][token_name($token)] . $word; 649 } else 650 { 651 $this-> _setHighlightCache(false, false); 652 $e = $this-> _appendHighlight; 653 return $e . $word; 654 } 655 } else 656 { 657 if (isset($this-> template_options['highlightSource'][$word])) 658 { 659 $newword = ($preformatted ? $word : $this-> postProcess($word)); 660 if ($this-> _setHighlightCache('highlightSource', $word)) { 661 return $newword; 662 } 663 $e = $this-> _appendHighlight; 664 return $e . $this-> template_options['highlightSource'][$word] . $newword; 665 } else 666 { 667 $this-> _setHighlightCache(false, false); 668 $e = $this-> _appendHighlight; 669 return $e . ($preformatted ? $word : $this-> postProcess($word)); 670 } 671 } 672 } 673 674 /** 675 * Used to allow converters to format the source code of DocBlocks the way 676 * they'd like. 677 * 678 * default returns it unchanged. Mainly used by the {@link HighlightParser} 679 * {@internal 680 * The method takes information from options.ini, the template options 681 * file, specifically the [highlightDocBlockSourceTokens] section, and uses 682 * it to enclose tokens.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 968 of 1382

683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 $word; 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 $word; 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760

* * {@source } } * @param string name of docblock token type * @param string contents of token * @param boolean whether the contents are preformatted or need modification * @return string */ function highlightDocBlockSource($token, $word, $preformatted = false) { if (empty($word)) { $this-> _setHighlightCache(false, false); $e = $this-> _appendHighlight; return $e . $word; } if (isset($this-> template_options['highlightDocBlockSourceTokens'][$token])) { if (!$preformatted) $word = $this-> postProcess($word); if ($this-> _setHighlightCache('highlightDocBlockSourceTokens', $token)) { return $word; } $e = $this-> _appendHighlight; return $e . $this-> template_options['highlightDocBlockSourceTokens'][$token] . } else { $this-> _setHighlightCache(false, false); $e = $this-> _appendHighlight; return $e . ($preformatted ? $word : $this-> } } /** * Used to allow converters to format the source code of Tutorial XML the way * they'd like. * * default returns it unchanged. Mainly used by the {@link HighlightParser} * {@internal * The method takes information from options.ini, the template options * file, specifically the [highlightDocBlockSourceTokens] section, and uses * it to enclose tokens. * * {@source } } * @param string name of docblock token type * @param string contents of token * @param boolean whether the contents are preformatted or need modification * @return string */ function highlightTutorialSource($token, $word, $preformatted = false) { if (empty($word)) { $this-> _setHighlightCache(false, false); $e = $this-> _appendHighlight; return $e . $word; } if (isset($this-> template_options['highlightTutorialSourceTokens'][$token])) { if (!$preformatted) $word = $this-> postProcess($word); if ($this-> _setHighlightCache('highlightTutorialSourceTokens', $token)) { return $word; } $e = $this-> _appendHighlight; return $e . $this-> template_options['highlightTutorialSourceTokens'][$token] . } else { $this-> _setHighlightCache(false, false); $e = $this-> _appendHighlight; return $e . ($preformatted ? $word : $this-> } } /** * Called by {@link parserReturnTag::Convert()} to allow converters to * change type names to desired formatting * * Used by {@link XMLDocBookConverter::type_adjust()} to change true and * false to the peardoc2 values * @param string * @return string */ function type_adjust($typename) {

postProcess($word));

postProcess($word));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 969 of 1382

761 return $typename; 762 } 763 764 /** 765 * Used to convert the {@}example} inline tag in a docblock. 766 * 767 * By default, this just wraps ProgramExample 768 * @see XMLDocBookpeardoc2Converter::exampleProgramExample 769 * @param string 770 * @param boolean true if this is to highlight a tutorial <programlisting> 771 * @return string 772 */ 773 function exampleProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 774 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 775 { 776 return $this-> ProgramExample($example, $tutorial, $inlinesourceparse, $class, $linenum, $filesourcepath); 777 } 778 779 /** 780 * Used to convert the <<code>> tag in a docblock 781 * @param string 782 * @param boolean true if this is to highlight a tutorial <programlisting> 783 * @return string 784 */ 785 function ProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 786 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 787 { 788 $this-> highlightingSource = true; 789 if (tokenizer_ext) 790 { 791 $e = $example; 792 if (!is_array($example)) 793 { 794 $obj = new phpDocumentorTWordParser; 795 $obj-> setup($example); 796 $e = $obj-> getFileSource(); 797 $bOpenTagFound = false; 798 foreach ($e as $ke => $ee) 799 { 800 foreach ($ee as $kee => $eee) 801 { 802 if ((int) $e[$ke][$kee][0] == T_OPEN_TAG) 803 { 804 $bOpenTagFound = true; 805 } 806 } 807 } 808 if (!$bOpenTagFound) { 809 $example = "<?php\n" .$example; 810 $obj-> setup($example); 811 $e = $obj-> getFileSource(); 812 unset($e[0]); 813 $e = array_values($e); 814 } 815 unset($obj); 816 } 817 $saveclass = $this-> class; 818 $parser = new phpDocumentor_HighlightParser; 819 if (!isset($inlinesourceparse)) 820 { 821 $example = $parser-> parse($e, $this, true); // force php mode 822 } else 823 { 824 if (isset($filesourcepath)) 825 { 826 $example = $parser-> parse($e, $this, $inlinesourceparse, $class, $linenum, $filesourcepath); 827 } elseif (isset($linenum)) 828 { 829 $example = $parser-> parse($e, $this, $inlinesourceparse, $class, $linenum); 830 } elseif (isset($class)) 831 { 832 $example = $parser-> parse($e, $this, $inlinesourceparse, $class); 833 } else 834 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 970 of 1382

835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914

$example = $parser-> }

parse($e, $this, $inlinesourceparse);

} $this-> class = $saveclass; } else { $example = $this-> postProcess($example); } $this-> highlightingSource = false; if ($tutorial) { return $example; } if (!isset($this-> template_options['desctranslate'])) return $example; if (!isset($this-> template_options['desctranslate']['code'])) return $example; $example = $this-> template_options['desctranslate']['code'] . $example; if (!isset($this-> template_options['desctranslate']['/code'])) return $example; return $example . $this-> template_options['desctranslate']['/code']; } /** * @param string */ function TutorialExample($example) { $this-> highlightingSource = true; $parse = new phpDocumentor_TutorialHighlightParser; $x = $parse-> parse($example, $this); $this-> highlightingSource = false; return $x; } /** * Used to convert the contents of <<li>> in a docblock * @param string * @return string */ function ListItem($item) { if (!isset($this-> template_options['desctranslate'])) return $item; if (!isset($this-> template_options['desctranslate']['li'])) return $item; $item = $this-> template_options['desctranslate']['li'] . $item; if (!isset($this-> template_options['desctranslate']['/li'])) return $item; return $item . $this-> template_options['desctranslate']['/li']; } /** * Used to convert the contents of <<ol>> or <<ul>> in a docblock * @param string * @return string */ function EncloseList($list,$ordered) { $listname = ($ordered ? 'ol' : 'ul'); if (!isset($this-> template_options['desctranslate'])) return $list; if (!isset($this-> template_options['desctranslate'][$listname])) return $list; $list = $this-> template_options['desctranslate'][$listname] . $list; if (!isset($this-> template_options['desctranslate']['/'.$listname])) return $list; return $list . $this-> template_options['desctranslate']['/'.$listname]; } /** * Used to convert the contents of <<pre>> in a docblock * @param string * @return string */ function PreserveWhiteSpace($string) { if (!isset($this-> template_options['desctranslate'])) return $string; if (!isset($this-> template_options['desctranslate']['pre'])) return $string; $string = $this-> template_options['desctranslate']['pre'] . $string; if (!isset($this-> template_options['desctranslate']['/pre'])) return $string; return $string . $this-> template_options['desctranslate']['/pre']; } /** * Used to enclose a paragraph in a docblock * @param string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 971 of 1382

915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994

* @return string */ function EncloseParagraph($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['p'])) return $para; $para = $this-> template_options['desctranslate']['p'] . $para; if (!isset($this-> template_options['desctranslate']['/p'])) return $para; return $para . $this-> template_options['desctranslate']['/p']; } /** * Used to convert the contents of <<b>> in a docblock * @param string * @return string */ function Bolden($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['b'])) return $para; $para = $this-> template_options['desctranslate']['b'] . $para; if (!isset($this-> template_options['desctranslate']['/b'])) return $para; return $para . $this-> template_options['desctranslate']['/b']; } /** * Used to convert the contents of <<i>> in a docblock * @param string * @return string */ function Italicize($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['i'])) return $para; $para = $this-> template_options['desctranslate']['i'] . $para; if (!isset($this-> template_options['desctranslate']['/i'])) return $para; return $para . $this-> template_options['desctranslate']['/i']; } /** * Used to convert the contents of <<var>> in a docblock * @param string * @return string */ function Varize($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['var'])) return $para; $para = $this-> template_options['desctranslate']['var'] . $para; if (!isset($this-> template_options['desctranslate']['/var'])) return $para; return $para . $this-> template_options['desctranslate']['/var']; } /** * Used to convert the contents of <<kbd>> in a docblock * @param string * @return string */ function Kbdize($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['kbd'])) return $para; $para = $this-> template_options['desctranslate']['kbd'] . $para; if (!isset($this-> template_options['desctranslate']['/kbd'])) return $para; return $para . $this-> template_options['desctranslate']['/kbd']; } /** * Used to convert the contents of <<samp>> in a docblock * @param string * @return string */ function Sampize($para) { if (!isset($this-> template_options['desctranslate'])) return $para; if (!isset($this-> template_options['desctranslate']['samp'])) return $para; $para = $this-> template_options['desctranslate']['samp'] . $para; if (!isset($this-> template_options['desctranslate']['/samp'])) return $para; return $para . $this-> template_options['desctranslate']['/samp']; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 972 of 1382

995 996 /** 997 * Used to convert <<br>> in a docblock 998 * @param string 999 * @return string 1000 */ 1001 function Br($para) 1002 { 1003 if (!isset($this-> template_options['desctranslate'])) return $para; 1004 if (!isset($this-> template_options['desctranslate']['br'])) return $para; 1005 $para = $this-> template_options['desctranslate']['br'] . $para; 1006 return $para; 1007 } 1008 1009 /** 1010 * This version does nothing 1011 * 1012 * Perform necessary post-processing of string data. For example, the HTML 1013 * Converters should escape < and > to become &lt; and &gt; 1014 * @return string 1015 */ 1016 function postProcess($text) 1017 { 1018 return $text; 1019 } 1020 1021 /** 1022 * Creates a table of contents for a {@}toc} inline tag in a tutorial 1023 * 1024 * This function should return a formatted table of contents. By default, it 1025 * does nothing, it is up to the converter to format the TOC 1026 * @abstract 1027 * @return string table of contents formatted for use in the current output format 1028 * @param array format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...) 1029 */ 1030 function formatTutorialTOC($toc) 1031 { 1032 return ''; 1033 } 1034 1035 /** 1036 * Write out the formatted source code for a php file 1037 * 1038 * This function provides the primary functionality for the 1039 * {@tutorial tags.filesource.pkg} tag. 1040 * @param string full path to the file 1041 * @param string fully highlighted/linked source code of the file 1042 * @abstract 1043 */ 1044 function writeSource($filepath, $source) 1045 { 1046 debug($source); 1047 return; 1048 } 1049 1050 /** 1051 * Write out the formatted source code for an example php file 1052 * 1053 * This function provides the primary functionality for the 1054 * {@tutorial tags.example.pkg} tag. 1055 * @param string example title 1056 * @param string example filename (no path) 1057 * @param string fully highlighted/linked source code of the file 1058 * @abstract 1059 */ 1060 function writeExample($title, $path, $source) 1061 { 1062 return; 1063 } 1064 1065 /** Translate the path info into a unique file name for the highlighted 1066 * source code. 1067 * @param string $pathinfo 1068 * @return string 1069 */ 1070 function getFileSourceName($path) 1071 { 1072 global $_phpDocumentor_options; 1073 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 973 of 1382

1074 $pathinfo['source_loc'] = str_replace($_phpDocumentor_options['Program_Root'].'/','',$pathinfo['source_loc']); 1075 $pathinfo['source_loc'] = str_replace('/','_',$pathinfo['source_loc']); 1076 return " fsource_{$pathinfo['package']}_{$pathinfo['subpackage']}_{$pathinfo['source_loc']}" 1077 } 1078 1079 /** Return the fixed path to the source-code file folder. 1080 * @param string $base Path is relative to this folder 1081 * @return string 1082 */ 1083 function getFileSourcePath($base) 1084 { 1085 if (substr($base, strlen($base) - 1) != PATH_DELIMITER) { 1086 $base .= PATH_DELIMITER; 1087 } 1088 return $base . '__filesource'; 1089 } 1090 1091 /** Return the path to the current 1092 * @param string $pathinfo 1093 * @return string 1094 */ 1095 function getCurrentPageURL() 1096 { 1097 return '{$srcdir}' . PATH_DELIMITER . $this-> page_dir; 1098 } 1099 1100 /** 1101 * @return string an output-format dependent link to phpxref-style highlighted 1102 * source code 1103 * @abstract 1104 */ 1105 function getSourceLink($path) 1106 { 1107 return ''; 1108 } 1109 1110 /** 1111 * @return string Link to the current page being parsed. 1112 * Should return {@link $curname} and a converter-specific extension. 1113 * @abstract 1114 */ 1115 function getCurrentPageLink() 1116 { 1117 } 1118 1119 /** 1120 * Return a line of highlighted source code with formatted line number 1121 * 1122 * If the $path is a full path, then an anchor to the line number will be 1123 * added as well 1124 * @param integer line number 1125 * @param string highlighted source code line 1126 * @param false|stringfull path to @filesource file this line is a part of, 1127 * if this is a single line from a complete file. 1128 * @return string formatted source code line with line number 1129 */ 1130 function sourceLine($linenumber, $line, $path = false) 1131 { 1132 if ($path) 1133 { 1134 return $this-> getSourceAnchor($path, $linenumber) . 1135 $this-> Br(sprintf('%6u',$linenumber).str_replace("\n" ,'',$line)); 1136 } else 1137 { 1138 return $this-> Br(sprintf('%6u',$linenumber).str_replace("\n" ,'',$line)); 1139 } 1140 } 1141 1142 /** 1143 * Determine whether an element's file has generated source code, used for 1144 * linking to line numbers of source. 1145 * 1146 * Wrapper for {@link $sourcePaths} in this version 1147 * 1148 * {@internal since file paths get stored with most/all slashes 1149 * set to forward slash '/', we need to doublecheck that

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 974 of 1382

1150 * we're not given a backslashed path to search for... 1151 * if we are, it's likely that it was originally stored 1152 * with a forward slash. Further, I'm not convinced it's safe 1153 * to just check the {@link PHPDOCUMENTOR_WINDOWS} flag, so I'm checking 1154 * specifically for backslashes intead.}}} 1155 * 1156 * @param string full path to the source code file 1157 * @return boolean 1158 */ 1159 function hasSourceCode($path) 1160 { 1161 return isset($this-> sourcePaths[$path]); 1162 if (strpos($path, '\\') > 1) { 1163 $modifiedPath = str_replace('\\', '/', $path); 1164 return isset($this-> sourcePaths[$modifiedPath]); 1165 } else { 1166 return isset($this-> sourcePaths[$path]); 1167 } 1168 } 1169 1170 /** 1171 * Mark a file as having had source code highlighted 1172 * @param string full path of source file 1173 */ 1174 function setSourcePaths($path) 1175 { 1176 $this-> sourcePaths[$path] = true; 1177 } 1178 1179 /** 1180 * Used to translate an XML DocBook entity like &rdquo; from a tutorial by 1181 * reading the options.ini file for the template. 1182 * @param string entity name 1183 */ 1184 function TranslateEntity($name) 1185 { 1186 if (!isset($this-> template_options['ppage'])) 1187 { 1188 if (!$this-> template_options['preservedocbooktags']) 1189 return ''; 1190 else 1191 return '&' .$name.';'; 1192 } 1193 if (isset($this-> template_options['ppage']['&' .$name.';'])) 1194 { 1195 return $this-> template_options['ppage']['&' .$name.';']; 1196 } else 1197 { 1198 if (!$this-> template_options['preservedocbooktags']) 1199 return ''; 1200 else 1201 return '&' .$name.';'; 1202 } 1203 } 1204 1205 /** 1206 * Used to translate an XML DocBook tag from a tutorial by reading the 1207 * options.ini file for the template. 1208 * @param string tag name 1209 * @param string any attributes Format: array(name => value) 1210 * @param string the tag contents, if any 1211 * @param string the tag contents, if any, unpost-processed 1212 * @return string 1213 */ 1214 function TranslateTag($name,$attr,$cdata,$unconvertedcdata) 1215 { 1216 if (!isset($this-> template_options['ppage'])) 1217 { 1218 if (!$this-> template_options['preservedocbooktags']) 1219 return $cdata; 1220 else 1221 return '<' .$name.$this> AttrToString($name,$attr,true).'>' .$cdata.'</' .$name.'>' ."\n" ; 1222 } 1223 // make sure this template transforms the tag into something 1224 if (isset($this-> template_options['ppage'][$name])) 1225 { 1226 // test for global attribute transforms like $attr$role = class, changing 1227 // all role="*" attributes to class="*" in html, for example 1228 foreach($attr as $att => $val)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 975 of 1382

1229 { 1230 if (isset($this-> template_options['$attr$'.$att])) 1231 { 1232 $new = ''; 1233 if (!isset($this-> template_options['$attr$'.$att]['close'])) 1234 { 1235 $new .= '<' .$this-> template_options['$attr$'.$att]['open']; 1236 if (isset($this-> template_options['$attr$'.$att]['cdata!'])) 1237 { 1238 if (isset($this-> template_options['$attr$'.$att]['separateall'])) 1239 $new .= $this-> template_options['$attr$'.$att]['separator']; 1240 else 1241 $new .= ' '; 1242 $new .= $this-> template_options['$attr$'.$att]['$'.$att]; 1243 $new .= $this-> template_options['$attr$'.$att]['separator']; 1244 if ($this-> template_options['$attr$'.$att]['quotevalues']) $val = '"' .$val.'"' ; 1245 $new .= $val.'>' ; 1246 } else 1247 { 1248 $new .= '>' .$val; 1249 } 1250 $new .= '</' .$this> template_options['$attr$'.$att]['open'].'>' ; 1251 } else 1252 { 1253 $new .= $this-> template_options['$attr$'.$att]['open'] . $val . $this-> template_options['$attr$'.$att]['close']; 1254 } 1255 unset($attr[$att]); 1256 $cdata = $new . $cdata; 1257 } 1258 } 1259 1260 if (!isset($this-> template_options['ppage']['/'.$name])) 1261 {// if the close tag isn't specified, we put opening and closing tags around it, with translated attributes 1262 if (isset($this-> template_options['ppage'][$name.'/'])) 1263 $cdata = '<' .$this-> template_options['ppage'][$name].$this> AttrToString($name,$attr).'/>' . $cdata; 1264 else 1265 $cdata = '<' .$this-> template_options['ppage'][$name].$this> AttrToString($name,$attr).'>' . $cdata . 1266 '</' .$this-> template_options['ppage'][$name].'>' ; 1267 } else 1268 { // if close tag is specified, use the open and close as literal 1269 if ($name == 'programlisting' && isset( $attr['role']) && 1270 ($attr['role'] == 'php' || $attr['role'] == 'tutorial' || $attr['role'] == 'html')) 1271 { // highlight PHP source 1272 // var_dump($unconvertedcdata, $cdata);exit; 1273 if ($attr['role'] == 'php') { 1274 $cdata = $this-> ProgramExample($unconvertedcdata, true); 1275 } elseif ($attr['role'] == 'tutorial') { 1276 $cdata = $this-> TutorialExample($unconvertedcdata); 1277 } elseif ($attr['role'] == 'html') { 1278 $cdata = $unconvertedcdata; 1279 } 1280 } else 1281 {// normal case below 1282 $cdata = $this-> template_options['ppage'][$name].$this> AttrToString($name,$attr). $cdata .$this-> template_options['ppage']['/'.$name]; 1283 } 1284 } 1285 return $cdata; 1286 } else 1287 { 1288 if ($this-> template_options['preservedocbooktags']) 1289 { 1290 return '<' .$name.$this-> AttrToString($name,$attr,true).'>' . $cdata . 1291 '</' .$name.'>' ."\n" ; 1292 } else 1293 { 1294 return $cdata; 1295 } 1296 } 1297 } 1298 1299 /** 1300 * Convert the attribute of a Tutorial docbook tag's attribute list

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 976 of 1382

1301 * to a string based on the template options.ini 1302 * @param string tag name 1303 * @param attribute array 1304 * @param boolean if true, returns attrname="value"... 1305 * @return string 1306 */ 1307 function AttrToString($tag,$attr,$unmodified = false) 1308 { 1309 $ret = ''; 1310 if ($unmodified) 1311 { 1312 $ret = ' '; 1313 foreach($attr as $n => $v) 1314 { 1315 $ret .= $n.' = "' .$v.'"' ; 1316 } 1317 return $ret; 1318 } 1319 // no_attr tells us to ignore all attributes 1320 if (isset($this-> template_options['no_attr'])) return $ret; 1321 // tagname! tells us to ignore all attributes for this tag 1322 if (isset($this-> template_options['ppage'][$tag.'!'])) return $ret; 1323 if (count($attr)) $ret = ' '; 1324 // pass 1, check to see if any attributes add together 1325 $same = array(); 1326 foreach($attr as $n => $v) 1327 { 1328 if (isset($this-> template_options['ppage'][$tag.'->' .$n])) 1329 { 1330 $same[$this-> template_options['ppage'][$tag.'->' .$n]][] = $n; 1331 } 1332 } 1333 foreach($attr as $n => $v) 1334 { 1335 if (isset($this-> template_options['ppage'][$tag.'->' .$n])) 1336 { 1337 if (count($same[$this-> template_options['ppage'][$tag.'->' .$n]]) == 1) 1338 { // only 1 attribute translated for this one 1339 // this is useful for equivalent value names 1340 if (isset($this-> template_options['ppage'][$tag.'->' .$n.'+'.$v])) $v = $this-> template_options['ppage'][$tag.'->' .$n.'+'.$v]; 1341 } else 1342 { // more than 1 attribute combines to make the new attribute 1343 $teststrtemp = array(); 1344 foreach($same[$this-> template_options['ppage'][$tag.'->' .$n]] as $oldattr) 1345 { 1346 $teststrtemp[] = $oldattr.'+'.$attr[$oldattr]; 1347 } 1348 $teststrs = array(); 1349 $num = count($same[$this-> template_options['ppage'][$tag.'->' .$n]]); 1350 for($i=0;$i< $num;$i++) 1351 { 1352 $started = false; 1353 $a = ''; 1354 for($j=$i;!$started || $j != $i;$j = ($j + $i) % $num) 1355 { 1356 if (!empty($a)) $a .= '|'; 1357 $a .= $teststrtemp[$j]; 1358 } 1359 $teststrs[$i] = $a; 1360 } 1361 $done = false; 1362 foreach($teststrs as $test) 1363 { 1364 if ($done) break; 1365 if (isset($this-> template_options['ppage'][$tag.'->' .$test])) 1366 { 1367 $done = true; 1368 $v = $this-> template_options['ppage'][$tag.'->' .$test]; 1369 } 1370 } 1371 } 1372 $ret .= $this-> template_options['ppage'][$tag.'->' .$n].' = "' .$v.'"' ; 1373 } else 1374 { 1375 if (!isset($this-> template_options['ppage'][$tag.'!'.$n])) 1376 { 1377 if (isset($this-> template_options['ppage']['$attr$'.$n]))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 977 of 1382

1378 "' 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456

$ret .= $this-> .$v.'"' ; else $ret .= $n.' = "' } } } return $ret; }

template_options['ppage']['$attr$'.$n].' = .$v.'"' ;

/** * Convert the title of a Tutorial docbook tag section * to a string based on the template options.ini * @param string tag name * @param array * @param string title text * @param string * @return string */ function ConvertTitle($tag,$attr,$title,$cdata) { if (!isset($this-> template_options[$tag.'_title'])) return array($attr,$cdata); if (isset($this-> template_options[$tag.'_title']['tag_attr'])) { $attr[$this-> template_options[$tag.'_title']['tag_attr']] = urlencode($cdata); $cdata = ''; } elseif(isset($this-> template_options[$tag.'_title']['cdata_start'])) { $cdata = $this-> template_options[$tag.'_title']['open'] . $title . $this-> template_options[$tag.'_title']['close'] . $cdata; } else $cdata = $title.$cdata; return array($attr,$cdata); } /** * Return a converter-specific id to distinguish tutorials and their * sections * * Used by {@}id} * @return string */ function getTutorialId($package,$subpackage,$tutorial,$id) { return $package.$subpackage.$tutorial.$id; } /** * Create the {@link $elements, $pkg_elements} and {@link $links} arrays * @access private * @todo version 2.0 - faulty package_output logic should be removed * * in this version, if the parent file isn't in the package, all * the procedural elements are simply shunted to another package! */ function _createPkgElements(& $pages) { if (empty($this-> elements)) { $this-> elements = array(); $this-> pkg_elements = array(); $this-> links = array(); phpDocumentor_out('Building indexes...'); flush(); foreach($pages as $j => $flub) { $this-> package = $pages[$j]-> parent-> package; $this-> subpackage = $pages[$j]-> parent-> subpackage; $this-> class = false; $this-> curfile = $pages[$j]-> parent-> getFile(); $this-> curname = $this-> getPageName($pages[$j]-> parent); $this-> curpath = $pages[$j]-> parent-> getPath(); $use = true; if ($this-> package_output) { if (in_array($this-> package,$this-> package_output)) { $this-> addElement($pages[$j]-> parent,$pages[$j]); } else { if (count($pages[$j]-> classelements))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 978 of 1382

1457 { 1458 list(,$pages[$j]-> parent-> package) = each($this> package_output); 1459 reset($this-> package_output); 1460 $pages[$j]-> parent-> subpackage = ''; 1461 $this-> addElement($pages[$j]-> parent,$pages[$j]); 1462 } else 1463 { 1464 unset($pages[$j]); 1465 continue; 1466 } 1467 } 1468 } else 1469 { 1470 $this-> addElement($pages[$j]-> parent,$pages[$j]); 1471 } 1472 if ($use) 1473 for($i=0; $i< count($pages[$j]-> elements); $i++) 1474 { 1475 $pages[$j]-> elements[$i]-> docblock-> package = $this-> package; 1476 $pages[$j]-> elements[$i]-> docblock-> subpackage = $this> subpackage; 1477 $this-> proceduralpages-> replaceElement($pages[$j]-> elements[$i]); 1478 $this-> addElement($pages[$j]-> elements[$i]); 1479 } 1480 for($i=0; $i< count($pages[$j]-> classelements); $i++) 1481 { 1482 if ($this-> class) 1483 { 1484 if ($pages[$j]-> classelements[$i]-> type == 'class') 1485 { 1486 if ($this-> checkKillClass($pages[$j]-> classelements[$i]> getName(),$pages[$j]-> classelements[$i]-> getPath())) continue; 1487 $this-> package = $pages[$j]-> classelements[$i]-> docblock> package; 1488 if ($this-> package_output) if (!in_array($this-> package,$this> package_output)) continue; 1489 $this-> subpackage = $pages[$j]-> classelements[$i]> docblock-> subpackage; 1490 $this-> class = $pages[$j]-> classelements[$i]-> name; 1491 } else 1492 { 1493 if ($this-> killclass) continue; 1494 // force all contained elements to have parent package/subpackage 1495 $pages[$j]-> classelements[$i]-> docblock-> package = $this> package; 1496 $pages[$j]-> classelements[$i]-> docblock-> subpackage = $this-> subpackage; 1497 } 1498 } 1499 if ($pages[$j]-> classelements[$i]-> type == 'class') 1500 { 1501 if ($this-> checkKillClass($pages[$j]-> classelements[$i]> getName(),$pages[$j]-> classelements[$i]-> getPath())) continue; 1502 $this-> package = $pages[$j]-> classelements[$i]-> docblock> package; 1503 if ($this-> package_output) if (!in_array($this-> package,$this> package_output)) continue; 1504 $this-> subpackage = $pages[$j]-> classelements[$i]-> docblock> subpackage; 1505 $this-> class = $pages[$j]-> classelements[$i]-> name; 1506 } 1507 if (!$this-> killclass) $this-> addElement($pages[$j]> classelements[$i]); 1508 } 1509 } 1510 phpDocumentor_out("done\n" ); 1511 flush(); 1512 } 1513 $this-> sortIndexes(); 1514 $this-> sortTodos(); 1515 if ($this-> sort_page_contents_by_type) $this> sortPageContentsByElementType($pages); 1516 } 1517 1518 /** 1519 * Process the {@link $tutorials} array 1520 * 1521 * Using the tutorialname.ext.ini files, this method sets up tutorial 1522 * hierarchy. There is some minimal error checking to make sure that no

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 979 of 1382

1523 * tutorial links to itself, even two levels deep as in tute->next->tute. 1524 * 1525 * If all tests pass, it creates the hierarchy 1526 * @uses generateTutorialOrder() 1527 * @uses _setupTutorialTree() 1528 * @access private 1529 */ 1530 function _processTutorials() 1531 { 1532 $parents = $all = array(); 1533 foreach($this-> tutorials as $package => $els) 1534 { 1535 if ($this-> package_output) 1536 { 1537 if (!in_array($package,$this-> package_output)) 1538 { 1539 unset($this-> tutorials[$package]); 1540 continue; 1541 } 1542 } 1543 if (!isset($this-> pkg_elements[$package])) 1544 { 1545 unset($this-> tutorials[$package]); 1546 continue; 1547 } 1548 foreach($els as $subpackage => $els2) 1549 { 1550 foreach($els2 as $type => $tutorials) 1551 { 1552 foreach($tutorials as $tutorial) 1553 { 1554 if ($tutorial-> ini) 1555 { 1556 if (isset($tutorial-> ini['Linked Tutorials'])) 1557 { 1558 foreach($tutorial-> ini['Linked Tutorials'] as $child) 1559 { 1560 $sub = (empty($tutorial-> subpackage) ? '' : $tutorial> subpackage . '/'); 1561 $kid = $tutorial-> package . '/' . $sub . $child . '.' . $tutorial-> tutorial_type; 1562 // parent includes self as a linked tutorial? 1563 $kidlink = $this> getTutorialLink($kid,false,false,array($tutorial-> package)); 1564 if (is_object($kidlink) && $this> returnSee($kidlink) == $tutorial-> getLink($this)) 1565 { // bad! 1566 addErrorDie(PDERROR_TUTORIAL_IS_OWN_CHILD,$tutorial> name,$tutorial-> name.'.ini'); 1567 } 1568 } 1569 $parents[] = $tutorial; 1570 } 1571 } 1572 $all[$package][$subpackage][$type][] = $tutorial; 1573 } 1574 } 1575 } 1576 } 1577 // loop error-checking, use this to eliminate possibility of accidentally linking to a parent as a child 1578 $testlinks = array(); 1579 foreach($parents as $parent) 1580 { 1581 $testlinks[$parent-> name]['links'][] = $parent-> getLink($this); 1582 $testlinks[$parent-> name]['name'][$parent-> getLink($this)] = $parent-> name; 1583 } 1584 // generate the order of tutorials, and link them together 1585 foreach($parents as $parent) 1586 { 1587 foreach($parent-> ini['Linked Tutorials'] as $child) 1588 { 1589 $sub = (empty($parent-> subpackage) ? '' : $parent-> subpackage . '/'); 1590 $kid = $parent-> package . '/' . $sub . $child . '.' . $parent> tutorial_type; 1591 // child tutorials must be in the same package AND subpackage 1592 // AND have the same extension as the parent, makes things clearer for both ends 1593 if (in_array($this-> returnSee($this> getTutorialLink($kid,false,false,array($parent-> package))),$testlinks[$parent> name]['links']))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 980 of 1382

1594 addErrorDie(PDERROR_TUTORIAL_IS_OWN_GRANDPA,$testlinks[$parent> name][$this-> returnSee($this-> getTutorialLink($kid,false,false,array($parent> package)))],$kid-> name,$testlinks[$parent-> name][$this-> returnSee($this> getTutorialLink($kid,false,false,array($parent-> package)))],$kid-> name.'.ini'); 1595 if ($this-> returnSee($this> getTutorialLink($kid,false,false,array($parent-> package))) == $kid) 1596 { 1597 addWarning(PDERROR_CHILD_TUTORIAL_NOT_FOUND, $child . '.' . $parent> tutorial_type, $parent-> name .'.ini',$parent-> package, $parent-> subpackage); 1598 } 1599 } 1600 } 1601 $new = $tree = $roots = array(); 1602 // build a list of all 'root' tutorials (tutorials without parents). 1603 foreach($parents as $i => $parent) 1604 { 1605 if (! $parent-> isChildOf($parents)) { 1606 $roots[] = $parent; 1607 } 1608 } 1609 $parents = $roots; 1610 // add the parents and all child tutorials in order to the list of tutorials to process 1611 foreach($parents as $parent) 1612 { 1613 $this-> generateTutorialOrder($parent,$all,$new); 1614 } 1615 if (count($all)) 1616 { 1617 // add the leftover tutorials 1618 foreach($all as $package => $els) 1619 { 1620 foreach($els as $subpackage => $els2) 1621 { 1622 foreach($els2 as $type => $tutorials) 1623 { 1624 foreach($tutorials as $tutorial) 1625 { 1626 $new[$package][$subpackage][$type][] = $tutorial; 1627 } 1628 } 1629 } 1630 } 1631 } 1632 // remove the old, unprocessed tutorials, and set it up with the next code 1633 $this-> tutorials = array(); 1634 // reset integrity of the tutorial list 1635 $prev = false; 1636 uksort($new, 'tutorialcmp'); 1637 // debug($this->vardump_tree($new));exit; 1638 foreach($new as $package => $els) 1639 { 1640 foreach($els as $subpackage => $els2) 1641 { 1642 foreach($els2 as $type => $tutorials) 1643 { 1644 foreach($tutorials as $tutorial) 1645 { 1646 if ($prev) 1647 { 1648 $this> tutorials[$prevpackage][$prevsubpackage][$prevtype][$prevname]-> setNext($tutorial,$this); 1649 $tutorial-> setPrev($prev,$this); 1650 } 1651 $this-> tutorials[$package][$subpackage][$type][$tutorial-> name] = $tutorial; 1652 $prev = $tutorial-> getLink($this,true); 1653 $prevpackage = $package; 1654 $prevsubpackage = $subpackage; 1655 $prevtype = $type; 1656 $prevname = $tutorial-> name; 1657 } 1658 } 1659 } 1660 } 1661 $this-> tutorial_tree = $this-> _setupTutorialTree(); 1662 return $new; 1663 } 1664 1665 /** 1666 * called by {@link phpDocumentor_IntermediateParser::Convert()} to traverse

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 981 of 1382

1667 * the array of pages and their elements, converting them to the output format 1668 * 1669 * The walk() method should be flexible enough such that it never needs 1670 * modification. walk() sets up all of the indexes, and sorts everything in 1671 * logical alphabetical order. It then passes each element individually to 1672 * {@link Convert()}, which then passes to the Convert*() methods. A child 1673 * Converter need not override any of these unless special functionality must 1674 * be added. see {@tutorial Converters/template.vars.cls} for details. 1675 * {@internal 1676 * walk() first creates all of the indexes {@link $elements, $pkg_elements} 1677 * and the left indexes specified by {@link $leftindexes}, 1678 * and then sorts them by calling {@link sortIndexes()}. 1679 * 1680 * Next, it converts all README/CHANGELOG/INSTALL-style files, using 1681 * {@link Convert_RIC}. 1682 * 1683 * After this, it 1684 * passes all package-level docs to Convert(). Then, it calls the index 1685 * sorting functions {@link formatPkgIndex(), formatIndex()} and 1686 * {@link formatLeftIndex()}. 1687 * 1688 * Finally, it converts each procedural page in alphabetical order. This 1689 * stage passes elements from the physical file to Convert() in alphabetical 1690 * order. First, procedural page elements {@link parserDefine, parserInclude} 1691 * {@link parserGlobal}, and {@link parserFunction} are passed to Convert(). 1692 * 1693 * Then, class elements are passed in this order: {@link parserClass}, then 1694 * all of the {@link parserVar}s in the class and all of the 1695 * {@link parserMethod}s in the class. Classes are in alphabetical order, 1696 * and both vars and methods are in alphabetical order. 1697 * 1698 * Finally, {@link ConvertErrorLog()} is called and the data walk is complete.}}} 1699 * @param array Format: array(fullpath => {@link parserData} structure with full {@link parserData::$elements} 1700 * and {@link parserData::$class_elements}. 1701 * @param array Format: array({@link parserPackagePage} 1, {@link parserPackagePage} 2,...) 1702 * @uses Converter::_createPkgElements() sets up {@link $elements} and 1703 * {@link $pkg_elements} array, as well as {@link $links} 1704 */ 1705 function walk(& $pages,& $package_pages) 1706 { 1707 if (empty($pages)) 1708 { 1709 die("<b>ERROR</b>: nothing parsed" ); 1710 } 1711 $this-> _createPkgElements($pages); 1712 if (count($this-> ric)) 1713 { 1714 phpDocumentor_out("Converting README/INSTALL/CHANGELOG contents...\n" ); 1715 flush(); 1716 foreach($this-> ric as $name => $contents) 1717 { 1718 phpDocumentor_out(" $name..." ); 1719 flush(); 1720 $this-> Convert_RIC($name,$contents); 1721 } 1722 phpDocumentor_out("\ndone\n" ); 1723 flush(); 1724 } 1725 foreach($package_pages as $i => $perp) 1726 { 1727 if ($this-> package_output) 1728 { 1729 if (!in_array($package_pages[$i]-> package,$this-> package_output)) continue; 1730 } 1731 phpDocumentor_out('Converting package page for package '.$package_pages[$i]> package.'... '); 1732 flush(); 1733 $this-> package = $package_pages[$i]-> package; 1734 $this-> subpackage = ''; 1735 $this-> class = false; 1736 $this-> Convert($package_pages[$i]); 1737 phpDocumentor_out("done\n" ); 1738 flush(); 1739 } 1740 phpDocumentor_out("Converting tutorials/extended docs\n" ); 1741 flush(); 1742 // get tutorials into the order they will display, and set next/prev links 1743 $new = $this-> _processTutorials();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 982 of 1382

1744 foreach($this-> tutorials as $package => $els) 1745 { 1746 foreach($els as $subpackage => $els2) 1747 { 1748 foreach($els2 as $type => $tutorials) 1749 { 1750 foreach($tutorials as $tutorial) 1751 { 1752 switch ($type) 1753 { 1754 case 'pkg' : 1755 $a = ''; 1756 if ($tutorial-> ini) 1757 $a .= 'Top-level '; 1758 if (!empty($tutorial-> subpackage)) 1759 $a .= 'Sub-'; 1760 $ptext = " Converting ${a}Package-level tutorial " .$tutorial-> name.'...'; 1761 break; 1762 case 'cls' : 1763 $a = ''; 1764 if ($tutorial-> ini) 1765 $a .= 'Top-level '; 1766 $ptext = " Converting ${a}Class-level tutorial " . $tutorial-> name ." and associating..." ; 1767 $link = Converter::getClassLink(str_replace('.cls','',$tutorial> name), $tutorial-> package); 1768 if (is_object($link)) 1769 { 1770 if ($this-> sort_absolutely_everything) 1771 { 1772 $addend = 'unsuccessful '; 1773 if (isset($this-> package_elements[$tutorial> package][$tutorial-> subpackage]['class'][$link-> name])) 1774 { 1775 $this-> package_elements[$tutorial> package][$tutorial-> subpackage]['class'][$link-> name][0]-> addTutorial($tutorial,$this); 1776 $addend = 'success '; 1777 } 1778 } else 1779 { 1780 $addend = 'unsuccessful '; 1781 if (!isset($this-> classes> killclass[str_replace('.cls','',$tutorial-> name)]) && !isset( $this-> classes> killclass[str_replace('.cls','',$tutorial-> name)][$tutorial-> path])) 1782 { 1783 foreach($pages as $j => $inf) 1784 { 1785 foreach($inf-> classelements as $i => $class) 1786 { 1787 if ($class-> type == 'class' && $class-> name == str_replace('.cls','',$tutorial-> name) && $class-> path == $link> path) 1788 { 1789 $pages[$j]-> classelements[$i]> addTutorial($tutorial,$this); 1790 $addend = 'success '; 1791 } 1792 } 1793 } 1794 } 1795 } 1796 $ptext .= $addend; 1797 } else $ptext .= "unsuccessful " ; 1798 break; 1799 case 'proc' : 1800 $a = ''; 1801 if ($tutorial-> ini) 1802 $a .= 'Top-level '; 1803 $ptext = " Converting ${a}Procedural-level tutorial " .$tutorial-> name." and associating..." ; 1804 $link = Converter::getPageLink(str_replace('.proc','',$tutorial> name), $tutorial-> package); 1805 if (is_object($link)) 1806 { 1807 $addend = 'unsuccessful '; 1808 if ($this-> sort_absolutely_everything) 1809 { 1810 if (isset($this-> package_elements[$tutorial-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 983 of 1382

> package][$tutorial-> subpackage]['page'][$link-> path])) 1811 { 1812 $this-> package_elements[$tutorial> package][$tutorial-> subpackage]['page'][$link-> path][0]-> addTutorial($tutorial,$this); 1813 $addend = "success " ; 1814 } 1815 } else 1816 { 1817 foreach($pages as $j => $info) 1818 { 1819 if ($j == $link-> path) 1820 { 1821 $pages[$j]-> addTutorial($tutorial,$this); 1822 $addend = "success " ; 1823 } 1824 } 1825 } 1826 $ptext .= $addend; 1827 } else $ptext .= "unsuccessful " ; 1828 break; 1829 } 1830 phpDocumentor_out($ptext); 1831 flush(); 1832 $this-> package = $tutorial-> package; 1833 $this-> subpackage = $tutorial-> subpackage; 1834 $this-> Convert($tutorial); 1835 phpDocumentor_out("done\n" ); 1836 flush(); 1837 } 1838 } 1839 } 1840 } 1841 phpDocumentor_out("Formatting Package Indexes..." ); 1842 flush(); 1843 $this-> formatPkgIndex(); 1844 phpDocumentor_out("done\n" ); 1845 flush(); 1846 phpDocumentor_out("Formatting Index..." ); 1847 flush(); 1848 $this-> formatIndex(); 1849 phpDocumentor_out("done\n\n" ); 1850 flush(); 1851 phpDocumentor_out("Formatting Left Quick Index..." ); 1852 flush(); 1853 $this-> formatLeftIndex(); 1854 phpDocumentor_out("done\n\n" ); 1855 flush(); 1856 if ($this-> sort_absolutely_everything) return $this-> walk_everything(); 1857 foreach($pages as $j => $flub) 1858 { 1859 phpDocumentor_out('Converting '.$pages[$j]-> parent-> getPath()); 1860 flush(); 1861 $this-> package = $pages[$j]-> parent-> package; 1862 $this-> subpackage = $pages[$j]-> parent-> subpackage; 1863 $this-> class = false; 1864 $this-> curfile = $pages[$j]-> parent-> getFile(); 1865 $this-> curname = $this-> getPageName($pages[$j]-> parent); 1866 $this-> curpath = $pages[$j]-> parent-> getPath(); 1867 $use = true; 1868 if ($this-> package_output) 1869 { 1870 if (in_array($this-> package,$this-> package_output)) 1871 { 1872 $this-> Convert($pages[$j]); 1873 } else 1874 { 1875 $use = false; 1876 } 1877 } else 1878 { 1879 $this-> Convert($pages[$j]); 1880 } 1881 phpDocumentor_out(" Procedural Page Elements..." ); 1882 flush(); 1883 if ($use) 1884 for($i=0; $i< count($pages[$j]-> elements); $i++) 1885 { 1886 $a = $pages[$j]-> elements[$i]-> docblock-> getKeyword('access'); 1887 if (is_object($a)) $a = $a-> getString(); 1888 if (!$this-> parseprivate && ( $a == 'private'))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 984 of 1382

1889 continue; 1890 // phpDocumentor_out(" ".$pages[$j]->elements[$i]>name."\n"); 1891 $pages[$j]-> elements[$i]-> docblock-> package = $this-> package; 1892 $pages[$j]-> elements[$i]-> docblock-> subpackage = $this-> subpackage; 1893 $this-> Convert($pages[$j]-> elements[$i]); 1894 } 1895 phpDocumentor_out(" Classes..." ); 1896 $this-> class = false; 1897 flush(); 1898 for($i=0; $i< count($pages[$j]-> classelements); $i++) 1899 { 1900 if ($this-> class) 1901 { 1902 if ($pages[$j]-> classelements[$i]-> type == 'class') 1903 { 1904 if (!$this-> killclass) $this-> endClass(); 1905 $this-> killclass = false; 1906 if ($this-> checkKillClass($pages[$j]-> classelements[$i]> getName(),$pages[$j]-> classelements[$i]-> getPath())) continue; 1907 $this-> package = $pages[$j]-> classelements[$i]-> docblock> package; 1908 if ($this-> package_output) if (!in_array($this-> package,$this> package_output)) continue; 1909 $this-> subpackage = $pages[$j]-> classelements[$i]-> docblock> subpackage; 1910 $this-> class = $pages[$j]-> classelements[$i]-> name; 1911 } else 1912 { 1913 $a = $pages[$j]-> classelements[$i]-> docblock> getKeyword('access'); 1914 if (is_object($a)) $a = $a-> getString(); 1915 if (!$this-> parseprivate && ( $a == 'private')) 1916 continue; 1917 if ($this-> killclass) continue; 1918 // force all contained elements to have parent package/subpackage 1919 $pages[$j]-> classelements[$i]-> docblock-> package = $this> package; 1920 $pages[$j]-> classelements[$i]-> docblock-> subpackage = $this> subpackage; 1921 } 1922 } 1923 if ($pages[$j]-> classelements[$i]-> type == 'class') 1924 { 1925 $this-> killclass = false; 1926 if ($this-> checkKillClass($pages[$j]-> classelements[$i]> getName(),$pages[$j]-> classelements[$i]-> getPath())) continue; 1927 $this-> package = $pages[$j]-> classelements[$i]-> docblock> package; 1928 if ($this-> package_output) if (!in_array($this-> package,$this> package_output)) continue; 1929 $this-> subpackage = $pages[$j]-> classelements[$i]-> docblock> subpackage; 1930 $this-> class = $pages[$j]-> classelements[$i]-> name; 1931 } 1932 if ($this-> killclass) continue; 1933 // phpDocumentor_out(" ".$pages[$j]->classelements[$i]>name."\n"); 1934 $this-> Convert($pages[$j]-> classelements[$i]); 1935 } 1936 if (count($pages[$j]-> classelements) && ! $this-> killclass) $this> endClass(); 1937 phpDocumentor_out(" done\n" ); 1938 flush(); 1939 $this-> endPage(); 1940 } 1941 phpDocumentor_out("\nConverting @todo List..." ); 1942 flush(); 1943 if (count($this-> todoList)) 1944 { 1945 $this-> ConvertTodoList(); 1946 } 1947 phpDocumentor_out("done\n" ); 1948 flush(); 1949 phpDocumentor_out("\nConverting Error Log..." ); 1950 flush(); 1951 $this-> ConvertErrorLog(); 1952 phpDocumentor_out("done\n" ); 1953 flush(); 1954 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 985 of 1382

1955 1956 1957 /** 1958 * Get a tree structure representing the hierarchy of tutorials 1959 * 1960 * Returns an array in format: 1961 * <pre> 1962 * array('tutorial' => {@link parserTutorial}, 1963 * 'kids' => array( // child tutorials 1964 * array('tutorial' => child {@link parserTutorial}, 1965 * 'kids' => array(...) 1966 * ) 1967 * ) 1968 * ) 1969 * </pre> 1970 * @param parserTutorial|array 1971 * @tutorial tutorials.pkg 1972 * @return array 1973 */ 1974 function getTutorialTree($tutorial) 1975 { 1976 if (is_object($tutorial)) 1977 { 1978 $path = $this-> _tutorial_path($tutorial,$tutorial,$tutorial); 1979 if (isset($this-> tutorial_tree[$path])) { 1980 $tutorial = $this-> tutorial_tree[$path]; 1981 } else { 1982 return false; 1983 } 1984 } 1985 $tree = array(); 1986 if (isset($tutorial['tutorial'])) 1987 { 1988 $tree['tutorial'] = $tutorial['tutorial']; 1989 if (isset($tutorial['child'])) 1990 { 1991 foreach($tutorial['child'] as $a => $b) 1992 { 1993 $btut = $b['tutorial']; 1994 $res = array( 1995 'tutorial' => $this-> tutorials 1996 [$btut-> package][$btut-> subpackage] 1997 [$btut-> tutorial_type][$btut-> name] 1998 ); 1999 if (isset($b['child'])) 2000 { 2001 $tempres = Converter::getTutorialTree($b); 2002 $res['kids'] = $tempres['kids']; 2003 } 2004 $tree['kids'][] = $res; 2005 } 2006 } 2007 } 2008 return $tree; 2009 } 2010 2011 /** 2012 * Remove tutorials one by one from $all, and transfer them into $new in the 2013 * order they should be parsed 2014 * @param parserTutorial 2015 * @param array 2016 * @param array 2017 * @access private 2018 */ 2019 function generateTutorialOrder($parent,& $all,& $new) 2020 { 2021 // remove from the list of tutorials to process 2022 foreach($all[$parent-> package][$parent-> subpackage][$parent-> tutorial_type] as $ind => $t) 2023 { 2024 if ($t-> name == $parent-> name) { 2025 unset($all[$parent-> package][$parent-> subpackage][$parent> tutorial_type][$ind]); 2026 } 2027 } 2028 // add to the new ordered list of tutorials 2029 $x = & $new[$parent-> package][$parent-> subpackage][$parent-> tutorial_type]; 2030 if (!is_object($x[count($x) - 1]) || $x[count($x) - 1]-> name != $parent-> name) 2031 { // only add if the parent isn't also a child 2032 $new[$parent-> package][$parent-> subpackage][$parent-> tutorial_type][] =

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 986 of 1382

$parent; 2033 // add a new branch to the tree 2034 } 2035 // process all child tutorials, and insert them in order 2036 // debug("processing parent ".$parent->name); 2037 if ($parent-> ini) 2038 { 2039 foreach($parent-> ini['Linked Tutorials'] as $child) 2040 { 2041 $sub = (empty($parent-> subpackage) ? '' : $parent-> subpackage . '/'); 2042 $kid = $parent-> package . '/' . $sub . $child . '.' . $parent> tutorial_type; 2043 $_klink = $this-> getTutorialLink($kid,false,false,array($parent> package)); 2044 if (is_object($_klink)) { 2045 $klink = $this-> returnSee($_klink); 2046 } else { 2047 $klink = false; 2048 } 2049 // remove the child from the list of remaining tutorials 2050 foreach($all[$parent-> package][$parent-> subpackage][$parent> tutorial_type] as $ind => $tute) 2051 { 2052 if ($klink && $tute-> getLink($this) == $klink) 2053 { 2054 // set up parent, next and prev links 2055 $tute-> setParent($parent, $this); 2056 // remove the child from the list of tutorials to process 2057 foreach($all[$parent-> package][$parent-> subpackage][$parent> tutorial_type] as $ind => $t) 2058 { 2059 if ($t-> name == $tute-> name) 2060 unset($all[$parent-> package][$parent-> subpackage][$parent> tutorial_type][$ind]); 2061 } 2062 // add to the new ordered list of tutorials 2063 $new[$parent-> package][$parent-> subpackage][$parent> tutorial_type][] = $tute; 2064 if ($tute-> ini) 2065 { 2066 // add all the child's child tutorials to the list 2067 $this-> generateTutorialOrder($tute,$all,$new); 2068 } 2069 } 2070 } 2071 } 2072 } 2073 return; 2074 } 2075 2076 /** Returns the path to this tutorial as a string 2077 * @param parserTutorial $pkg 2078 * @param parserTutorial $subpkg 2079 * @param parserTutorial $namepkg 2080 * @return string */ 2081 function _tutorial_path($pkg, $subpkg = 0, $namepkg = 0) 2082 { 2083 if (!$subpkg) { 2084 $subpkg = $pkg; 2085 } 2086 if (!$namepkg) { 2087 $namepkg = $pkg; 2088 } 2089 $subpackagename = ($subpkg-> subpackage ? '/' . $subpkg-> subpackage : ''); 2090 return $pkg-> package . $subpackagename . '/' . $namepkg-> name; 2091 } 2092 2093 2094 /** 2095 * Creates a tree structure of tutorials 2096 * 2097 * Format: 2098 * <pre> 2099 * array('package/subpackage/tutorial1.ext' => 2100 * array('tutorial' => {@link parserTutorial}, 2101 * 'child' => 2102 * array('package/subpackage/child1tutorial.ext' => ..., 2103 * 'package/subpackage/child2tutorial.ext' => ..., 2104 * ... 2105 * )

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 987 of 1382

2106 * 'package/subpackage/tutorial2.ext' => ..., 2107 * ... 2108 * ) 2109 * </pre> 2110 * @return array the tutorial tree 2111 * @access private 2112 */ 2113 function _setupTutorialTree($parent = false) 2114 { 2115 if (! isset($this-> processed_tutorials)) { 2116 $this-> processed_tutorials = array(); 2117 } 2118 $tree = array(); 2119 if (!$parent) 2120 { 2121 foreach($this-> tutorials as $package => $s) 2122 { 2123 foreach($s as $subpackage => $t) 2124 { 2125 foreach($t as $type => $n) 2126 { 2127 foreach($n as $name => $tutorial) 2128 { 2129 if ($tutorial-> parent) { 2130 continue; 2131 } 2132 2133 $child_path = $this> _tutorial_path($tutorial,$tutorial,$tutorial); 2134 if (isset($this-> processed_tutorials[$child_path])) { 2135 continue; 2136 } 2137 $this-> processed_tutorials[$child_path] = $tutorial; 2138 //debug("parent ".$tutorial->name); 2139 $ret = $this-> _setupTutorialTree($tutorial); 2140 if (!count($tree)) { 2141 $tree = $ret; 2142 } else { 2143 $tree = array_merge($tree,$ret); 2144 } 2145 } 2146 } 2147 } 2148 } 2149 return $tree; 2150 } 2151 $parent_path = $this-> _tutorial_path($parent); 2152 $tree[$parent_path]['tutorial'] = $parent; 2153 // process all child tutorials, and insert them in order 2154 if ($parent-> ini) 2155 { 2156 foreach($parent-> ini['Linked Tutorials'] as $child) 2157 { 2158 if (isset($this-> tutorials[$parent-> package][$parent-> subpackage] 2159 [$parent-> tutorial_type][$child . '.' . 2160 $parent-> tutorial_type])) { 2161 // remove the child from the list of remaining tutorials 2162 $tute = $this-> tutorials[$parent-> package][$parent-> subpackage] 2163 [$parent-> tutorial_type][$child . '.' . 2164 $parent-> tutorial_type]; 2165 } else { 2166 $tute = false; 2167 } 2168 2169 if (!$tute) { 2170 continue; 2171 } 2172 $child_path = $this-> _tutorial_path($parent,$parent,$tute); 2173 if (isset($this-> processed_tutorials[$child_path])) { 2174 continue; 2175 } 2176 $this-> processed_tutorials[$child_path] = $tute; 2177 if ($tute-> name != $child . '.' . $parent-> tutorial_type) { 2178 continue; 2179 } 2180 //echo "Adding [$child_path] to [$parent_path]<br>"; 2181 $tree[$parent_path]['child'][$this> _tutorial_path($parent,$parent,$tute)]['tutorial'] 2182 = $tute; 2183 if (!$tute-> ini) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 988 of 1382

2184 continue; 2185 } 2186 // add all the child's child tutorials to the list 2187 if (!isset($tree[$parent_path]['child'])) { 2188 $tree[$parent_path]['child'] = $this-> _setupTutorialTree($tute); 2189 } else { 2190 $tree[$parent_path]['child'] = array_merge($tree[$parent_path]['child'], 2191 $this-> _setupTutorialTree($tute)); 2192 } 2193 } 2194 } 2195 return $tree; 2196 } 2197 2198 /** 2199 * Debugging function for dumping {@link $tutorial_tree} 2200 * @return string 2201 */ 2202 function vardump_tree($tree,$indent='') 2203 { 2204 if (phpDocumentor_get_class($tree) == 'parsertutorial') return $tree-> name.' extends '.($tree-> parent? $tree-> parent-> name : 'nothing'); 2205 $a = ''; 2206 foreach($tree as $ind => $stuff) 2207 { 2208 $x = $this-> vardump_tree($stuff," $indent " ); 2209 $a .= $indent.'['.$ind." => \n " .$indent.$x."]\n" ; 2210 } 2211 return substr($a,0,strlen($a) - 1); 2212 } 2213 2214 /** 2215 * @access private 2216 */ 2217 function sort_package_elements($a,$b) 2218 { 2219 if (($a-> type == $b-> type) && (isset( $a-> isConstructor) && $a> isConstructor)) return -1; 2220 if (($a-> type == $b-> type) && (isset( $b-> isConstructor) && $b> isConstructor)) return 1; 2221 if ($a-> type == $b-> type) return strnatcasecmp($a-> name,$b-> name); 2222 if ($a-> type == 'class') return -1; 2223 if ($b-> type == 'class') return 1; 2224 if ($a-> type == 'const') return -1; 2225 if ($b-> type == 'const') return 1; 2226 if ($a-> type == 'var') return -1; 2227 if ($b-> type == 'var') return 1; 2228 if ($a-> type == 'page') return -1; 2229 if ($b-> type == 'page') return 1; 2230 if ($a-> type == 'include') return -1; 2231 if ($b-> type == 'include') return 1; 2232 if ($a-> type == 'define') return -1; 2233 if ($b-> type == 'define') return 1; 2234 if ($a-> type == 'global') return -1; 2235 if ($b-> type == 'global') return 1; 2236 if ($a-> type == 'function') return -1; 2237 if ($b-> type == 'function') return 1; 2238 } 2239 2240 /** 2241 * @access private 2242 */ 2243 function defpackagesort($a,$b) 2244 { 2245 if ($a == $GLOBALS['phpDocumentor_DefaultPackageName']) return -1; 2246 if ($b == $GLOBALS['phpDocumentor_DefaultPackageName']) return 0; 2247 return strnatcasecmp($a,$b); 2248 } 2249 2250 /** 2251 * @access private 2252 */ 2253 function Pc_sort($a,$b) 2254 { 2255 return strnatcasecmp(key($a),key($b)); 2256 } 2257 2258 /** 2259 * walk over elements by package rather than page 2260 *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 989 of 1382

2261 * This method is designed for converters like the PDF converter that need 2262 * everything passed in alphabetical order by package/subpackage and by 2263 * procedural and then class information 2264 * @see PDFdefaultConverter 2265 * @see walk() 2266 */ 2267 function walk_everything() 2268 { 2269 global $hooser; 2270 $hooser = false; 2271 uksort($this-> package_elements,array($this,'defpackagesort')); 2272 foreach($this-> package_elements as $package => $r) 2273 { 2274 if ($this-> package_output) 2275 { 2276 if (!in_array($this-> package,$this-> package_output)) 2277 { 2278 unset($this-> package_elements[$package]); 2279 continue; 2280 } 2281 } 2282 uksort($this-> package_elements[$package],'strnatcasecmp'); 2283 } 2284 foreach($this-> package_elements as $package => $r) 2285 { 2286 foreach($this-> package_elements[$package] as $subpackage => $r) 2287 { 2288 if (isset($r['page'])) 2289 { 2290 uksort($r['page'],'strnatcasecmp'); 2291 foreach($r['page'] as $page => $oo) 2292 { 2293 usort($this> package_elements[$package][$subpackage]['page'][$page],array($this,'sort_package_elements')); 2294 } 2295 } 2296 if (isset($r['class'])) 2297 { 2298 uksort($r['class'],'strnatcasecmp'); 2299 foreach($r['class'] as $page => $oo) 2300 { 2301 usort($r['class'][$page],array($this,'sort_package_elements')); 2302 } 2303 } 2304 $this-> package_elements[$package][$subpackage] = $r; 2305 } 2306 } 2307 foreach($this-> package_elements as $package => $s) 2308 { 2309 $notyet = false; 2310 foreach($s as $subpackage => $r) 2311 { 2312 $this-> package = $package; 2313 $this-> subpackage = $subpackage; 2314 if (isset($r['page'])) 2315 { 2316 $this-> class = false; 2317 foreach($r['page'] as $page => $elements) 2318 { 2319 if (is_array($elements)) 2320 { 2321 foreach($elements as $element) 2322 { 2323 if ($element-> type == 'page') 2324 { 2325 phpDocumentor_out('Converting '.$element-> parent> getPath()); 2326 flush(); 2327 $this-> curfile = $element-> parent-> getFile(); 2328 $this-> curname = $this-> getPageName($element> parent); 2329 $this-> curpath = $element-> parent-> getPath(); 2330 $notyet = true; 2331 } else 2332 { 2333 // force all contained elements to have parent package/subpackage 2334 $element-> docblock-> package = $this-> package; 2335 $element-> docblock-> subpackage = $this-> subpackage; 2336 $a = $element-> docblock-> getKeyword('access');

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 990 of 1382

2337 if (is_object($a)) $a = $a-> getString(); 2338 if (!$this-> parseprivate && ( $a == 'private')) 2339 continue; 2340 } 2341 if ($notyet) 2342 { 2343 phpDocumentor_out(" Procedural Page Elements..." ); 2344 flush(); 2345 $notyet = false; 2346 } 2347 $this-> Convert($element); 2348 } 2349 } 2350 $this-> endPage(); 2351 phpDocumentor_out("done\n" ); 2352 flush(); 2353 } 2354 } 2355 $start_classes = true; 2356 if (isset($r['class'])) 2357 { 2358 foreach($r['class'] as $class => $elements) 2359 { 2360 foreach($elements as $element) 2361 { 2362 if ($element-> type == 'class') 2363 { 2364 if (!$start_classes) 2365 { 2366 if (count($elements) && ! $this-> killclass) $this> endClass(); 2367 phpDocumentor_out("done\n" ); 2368 flush(); 2369 } 2370 $start_classes = false; 2371 $this-> class = $element-> getName(); 2372 $this-> killclass = false; 2373 if ($this-> checkKillClass($element-> getName(),$element> getPath())) continue; 2374 if (!$this-> killclass) 2375 { 2376 phpDocumentor_out('Converting '.$this> class."..." ); 2377 flush(); 2378 $notyet = true; 2379 } 2380 } else 2381 { 2382 if ($notyet) 2383 { 2384 phpDocumentor_out("Variables/methods/Class constants...\n" ); 2385 flush(); 2386 $notyet = false; 2387 } 2388 $a = $element-> docblock-> getKeyword('access'); 2389 if (is_object($a)) $a = $a-> getString(); 2390 if (!$this-> parseprivate && ( $a == 'private')) 2391 continue; 2392 if ($this-> killclass) continue; 2393 // force all contained elements to have parent package/subpackage 2394 $element-> docblock-> package = $this-> package; 2395 $element-> docblock-> subpackage = $this-> subpackage; 2396 } 2397 if ($this-> killclass) continue; 2398 $this-> Convert($element); 2399 } 2400 } 2401 if (count($elements) && ! $this-> killclass) $this-> endClass(); 2402 phpDocumentor_out("done\n" ); 2403 flush(); 2404 } // if isset($r['class']) 2405 } // foreach($s 2406 } // foreach($this->package_elements) 2407 phpDocumentor_out("\nConverting @todo List..." ); 2408 flush(); 2409 if (count($this-> todoList)) 2410 { 2411 $this-> ConvertTodoList();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 991 of 1382

2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491

} phpDocumentor_out("done\n" ); flush(); phpDocumentor_out("\nConverting Error Log..." flush(); $this-> ConvertErrorLog(); phpDocumentor_out("done\n" ); flush(); } /** * Convert the phpDocumentor parsing/conversion error log * @abstract */ function ConvertErrorLog() { } /** * Convert the list of all @todo tags * @abstract */ function ConvertTodoList() { }

);

/** * Sorts the @todo list - do not override or modify this function * @access private * @uses _sortTodos passed to {@link usort()} to sort the todo list */ function sortTodos() { phpDocumentor_out("\nSorting @todo list..." ); flush(); foreach($this-> todoList as $package => $r) { usort($this-> todoList[$package], array('Converter', '_sortTodoPackage')); foreach ($r as $a => $sub) { if (is_array($this-> todoList[$package][$a][1])) { usort($this-> todoList[$package][$a][1],array('Converter', '_sortTodos')); } } } phpDocumentor_out("done\n" ); } /** @access private */ function _sortTodoPackage($a, $b) { return strnatcasecmp($a[0]-> } /** @access private */ function _sortTodos($a, $b) { if (!is_object($a)) { var_dump($a); } return strnatcasecmp($a-> }

name, $b[0]->

name);

getString(), $b->

getString());

/** * Sorts all indexes - do not override or modify this function * @uses $leftindex based on the value of leftindex, sorts link arrays * @uses $class_elements sorts with {@link compareLink} * @uses $page_elements sorts with {@link compareLink} * @uses $define_elements sorts with {@link compareLink} * @uses $global_elements sorts with {@link compareLink} * @uses $function_elements sorts with {@link compareLink} * @uses $elements sorts with {@link elementCmp} * @uses $pkg_elements sorts with {@link elementCmp} after sorting by * package/subpackage alphabetically * @access private */ function sortIndexes() { phpDocumentor_out("\nSorting Indexes..." ); flush(); uksort($this-> elements,'strnatcasecmp'); if ($this-> leftindex['classes'])

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 992 of 1382

2492 { 2493 foreach($this-> class_elements as $package => $o1) 2494 { 2495 foreach($o1 as $subpackage => $links) 2496 { 2497 usort($this> class_elements[$package][$subpackage],array($this,'compareLink')); 2498 } 2499 } 2500 } 2501 if ($this-> leftindex['pages']) 2502 { 2503 foreach($this-> page_elements as $package => $o1) 2504 { 2505 uksort($this-> page_elements[$package],'strnatcasecmp'); 2506 foreach($o1 as $subpackage => $links) 2507 { 2508 usort($this> page_elements[$package][$subpackage],array($this,'compareLink')); 2509 } 2510 } 2511 } 2512 if ($this-> leftindex['defines']) 2513 { 2514 foreach($this-> define_elements as $package => $o1) 2515 { 2516 uksort($this-> define_elements[$package],'strnatcasecmp'); 2517 foreach($o1 as $subpackage => $links) 2518 { 2519 usort($this> define_elements[$package][$subpackage],array($this,'compareLink')); 2520 } 2521 } 2522 } 2523 if ($this-> leftindex['globals']) 2524 { 2525 foreach($this-> global_elements as $package => $o1) 2526 { 2527 uksort($this-> global_elements[$package],'strnatcasecmp'); 2528 foreach($o1 as $subpackage => $links) 2529 { 2530 usort($this> global_elements[$package][$subpackage],array($this,'compareLink')); 2531 } 2532 } 2533 } 2534 if ($this-> leftindex['functions']) 2535 { 2536 foreach($this-> function_elements as $package => $o1) 2537 { 2538 uksort($this-> function_elements[$package],'strnatcasecmp'); 2539 foreach($o1 as $subpackage => $links) 2540 { 2541 usort($this> function_elements[$package][$subpackage],array($this,'compareLink')); 2542 } 2543 } 2544 } 2545 foreach($this-> elements as $letter => $nothuing) 2546 { 2547 uasort($this-> elements[$letter],array($this,"elementCmp" )); 2548 } 2549 foreach($this-> pkg_elements as $package => $els) 2550 { 2551 uksort($this-> pkg_elements[$package],'strnatcasecmp'); 2552 foreach($this-> pkg_elements[$package] as $subpackage => $els) 2553 { 2554 if (empty($els)) continue; 2555 uksort($this-> pkg_elements[$package][$subpackage],'strnatcasecmp'); 2556 foreach($els as $letter => $yuh) 2557 { 2558 usort($this> pkg_elements[$package][$subpackage][$letter],array($this,"elementCmp" )); 2559 } 2560 } 2561 } 2562 phpDocumentor_out("done\n" ); 2563 flush(); 2564 } 2565

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 993 of 1382

2566 /** 2567 * sorts {@link $page_contents} by element type as well as alphabetically 2568 * @see $sort_page_contents_by_element_type 2569 */ 2570 function sortPageContentsByElementType(& $pages) 2571 { 2572 foreach($this-> page_contents as $package => $els) 2573 { 2574 foreach($this-> page_contents[$package] as $subpackage => $els) 2575 { 2576 if (empty($els)) continue; 2577 foreach($this-> page_contents[$package][$subpackage] as $path => $stuff) 2578 { 2579 if (!count($pages[$path]-> elements)) continue; 2580 usort($pages[$path]-> elements,array($this,'eltypecmp')); 2581 usort($this> page_contents[$package][$subpackage][$path],array($this,'eltypecmp')); 2582 if (isset($this-> page_contents[$package][$subpackage][$path][0])) 2583 $this-> page_contents[$package][$subpackage][$path]['###main'] = $this> page_contents[$package][$subpackage][$path][0]; 2584 unset($this-> page_contents[$package][$subpackage][$path][0]); 2585 } 2586 } 2587 } 2588 } 2589 2590 /** 2591 * @access private 2592 * @see Converter::sortIndexes() 2593 */ 2594 function compareLink($a, $b) 2595 { 2596 return strnatcasecmp($a-> name,$b-> name); 2597 } 2598 2599 /** 2600 * @access private 2601 * @see Converter::sortPageContentsByElementType() 2602 */ 2603 function eltypecmp($a, $b) 2604 { 2605 if ($a-> type == 'page') return -1; 2606 if ($b-> type == 'page') return 1; 2607 return strnatcasecmp($a-> type.$a-> name,$b-> type.$b-> name); 2608 } 2609 2610 /** 2611 * does a nat case sort on the specified second level value of the array 2612 * 2613 * @param mixed $a 2614 * @param mixed $b 2615 * @return int 2616 * @access private 2617 */ 2618 function elementCmp ($a, $b) 2619 { 2620 return strnatcasecmp($a-> getName(), $b-> getName()); 2621 } 2622 2623 /** 2624 * Used to stop conversion of @ignored or private @access classes 2625 * @uses $killclass sets killclass based on the value of {@link Classes::$killclass} 2626 * and {@link $package_output} 2627 * @access private 2628 */ 2629 function checkKillClass($class, $path) 2630 { 2631 $this-> killclass = false; 2632 if (isset($this-> classes-> killclass[$class]) && isset( $this-> classes> killclass[$class][$path])) $this-> killclass = true; 2633 if ($this-> package_output) 2634 { 2635 $a = $this-> classes-> getClass($class, $path); 2636 if (!in_array($a-> docblock-> package,$this-> package_output)) $this> killclass = true; 2637 } 2638 if (PHPDOCUMENTOR_DEBUG && $this-> killclass) debug(" $class $path killed" ); 2639 return $this-> killclass; 2640 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 994 of 1382

2641 2642 /** 2643 * @param abstractLink descendant of abstractLink 2644 * @param array|parserTaglist of @todos|@todo tag 2645 * @access private 2646 */ 2647 function addTodoLink($link, $todos) 2648 { 2649 $this-> todoList[$link-> package][] = array($link, $todos); 2650 } 2651 2652 /** 2653 * Adds all elements to the {@link $elements, $pkg_elements, $links}, 2654 * {@link $linkswithfile} and left indexes - Do not modify or override 2655 * @access private 2656 * @param parserBase any documentable element descendant of parserBase 2657 * except parserTutorial 2658 * @param false|parserPageonly used to add a {@link parserPage} if the 2659 * $element passed is a parserPage 2660 * @staticvar string path of current page, used for {@link $page_contents} setup 2661 */ 2662 function addElement(& $element,$pageel=false) 2663 { 2664 static $curpath = ''; 2665 if ($this-> package_output) 2666 { 2667 if (!in_array($this-> package, $this-> package_output)) return; 2668 } 2669 if ($pageel && phpDocumentor_get_class($pageel) == 'parserdata') 2670 { 2671 if (isset($pageel-> docblock) && phpDocumentor_get_class($pageel> docblock) == 'parserdocblock') 2672 { 2673 $a = $pageel-> docblock-> getKeyword('todo'); 2674 if ($a) 2675 { 2676 $this-> addTodoLink($this-> addLink($element),$a); 2677 } 2678 } 2679 } 2680 if (isset($element-> docblock)) 2681 { 2682 $a = $element-> docblock-> getKeyword('access'); 2683 if (is_object($a)) $a = $a-> getString(); 2684 if (!$this-> parseprivate && ( $a == 'private')) 2685 return; 2686 $a = $element-> docblock-> getKeyword('todo'); 2687 if ($a) 2688 { 2689 if ($element-> type != 'include') { 2690 $this-> addTodoLink($this-> addLink($element),$a); 2691 } else { 2692 addWarning(PDERROR_NOTODO_INCLUDE, $element-> getLineNumber(), 2693 $element-> getPath()); 2694 } 2695 } 2696 } 2697 $startPositionOfElementName = 0; // which character of the element name actually starts its textual name 2698 switch($element-> type) 2699 { 2700 case 'page' : 2701 if ($this-> sort_absolutely_everything) 2702 { 2703 $this-> package_elements[$element-> package][$element> subpackage]['page'][$element-> getPath()][] = $pageel; 2704 } 2705 $link = $this-> addLink($element); 2706 $curpath = $element-> getPath(); 2707 if ($this-> leftindex['pages']) 2708 $this-> page_elements[$element-> package][$element-> subpackage][] = $link; 2709 $this-> page_contents[$element-> package][$element> subpackage][$curpath]['###main'] = $link; 2710 break; 2711 case 'class' : 2712 if ($this-> sort_absolutely_everything) 2713 { 2714 $this-> package_elements[$element-> docblock-> package][$element> docblock-> subpackage]['class'][$this-> class][] = $element;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 995 of 1382

2715 2716 2717 2718 > docblock-> 2719 > docblock-> 2720 2721 2722 2723 2724 > docblock-> 2725 2726 2727 2728 2729 2730 2731 > docblock-> 2732 2733 2734 2735 > docblock-> 2736 > docblock-> 2737 2738 2739 2740 2741 > docblock-> 2742 2743 2744 2745 2746 > docblock-> 2747 > docblock-> 2748 2749 2750 2751 2752 > docblock-> 2753 2754 2755 2756 > docblock-> 2757 2758 2759 2760 2761 > docblock-> 2762 2763 2764 > docblock-> 2765 2766 2767 2768 2769 > docblock-> 2770 2771 2772 > docblock-> 2773 2774 2775 2776 2777 > docblock-> 2778

} $link = $this-> addLink($element); if ($this-> leftindex['classes']) $this-> class_elements[$element-> docblock-> package][$elementsubpackage][] = $link; $this-> class_contents[$element-> docblock-> package][$elementsubpackage][$this-> class]['###main'] = $link; break; case 'include' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['page'][$curpath][] = $element; } $link = $this-> addLink($element); break; case 'define' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['page'][$curpath][] = $element; } $link = $this-> addLink($element); if ($this-> leftindex['defines']) $this-> define_elements[$element-> docblock-> package][$elementsubpackage][] = $link; $this-> page_contents[$element-> docblock-> package][$elementsubpackage][$curpath][] = $link; break; case 'global' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['page'][$curpath][] = $element; } $link = $this-> addLink($element); $startPositionOfElementName = 1; // lose the leading "$" character if ($this-> leftindex['globals']) $this-> global_elements[$element-> docblock-> package][$elementsubpackage][] = $link; $this-> page_contents[$element-> docblock-> package][$elementsubpackage][$curpath][] = $link; break; case 'var' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['class'][$this-> class][] = $element; } $link = $this-> addLink($element); $startPositionOfElementName = 1; // lose the leading "$" character $this-> class_contents[$element-> docblock-> package][$elementsubpackage][$this-> class][] = $link; break; case 'const' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['class'][$this-> class][] = $element; } $link = $this-> addLink($element); $this-> class_contents[$element-> docblock-> package][$elementsubpackage][$this-> class][] = $link; break; case 'method' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['class'][$this-> class][] = $element; } $link = $this-> addLink($element); $this-> class_contents[$element-> docblock-> package][$elementsubpackage][$this-> class][] = $link; break; case 'function' : if ($this-> sort_absolutely_everything) { $this-> package_elements[$element-> docblock-> package][$elementsubpackage]['page'][$curpath][] = $element; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 996 of 1382

2779 $link = $this-> addLink($element); 2780 if ($this-> leftindex['functions']) 2781 $this-> function_elements[$element-> docblock-> package][$element> docblock-> subpackage][] = $link; 2782 $this-> page_contents[$element-> docblock-> package][$element> docblock-> subpackage][$curpath][] = $link; 2783 break; 2784 default : 2785 break; 2786 } 2787 if ($element-> getType() != 'include') 2788 { 2789 if ($element-> getType() == 'var' || $element-> getType() == 'method'|| $element-> getType() == 'const') 2790 { 2791 $this-> links[$this-> package][$this-> subpackage][$element> getType()][$element-> class][$element-> getName()] = $link; 2792 $this-> linkswithfile[$this-> package][$this-> subpackage][$element> getType()][$element-> getPath()][$element-> class][$element-> getName()] = $link; 2793 } else 2794 { 2795 if ($element-> type == 'page') 2796 { 2797 $this-> links[$this-> package][$this-> subpackage][$element> getType()][$element-> getFile()] = $link; 2798 $this-> linkswithfile[$this-> package][$this-> subpackage][$element> getType()][$element-> getPath()][$element-> getFile()] = $link; 2799 } else 2800 { 2801 $this-> links[$this-> package][$this-> subpackage][$element> getType()][$element-> getName()] = $link; 2802 $this-> linkswithfile[$this-> package][$this-> subpackage][$element> getType()][$element-> getPath()][$element-> getName()] = $link; 2803 } 2804 } 2805 } 2806 if ($element-> type == 'page') 2807 { 2808 $this-> elements[substr(strtolower($element> getFile()),$startPositionOfElementName,1)][] = $element; 2809 $this-> pkg_elements[$this-> package][$this> subpackage][substr(strtolower($element-> getFile()),$startPositionOfElementName,1)][] = $element; 2810 } else 2811 { 2812 $this-> elements[substr(strtolower($element> getName()),$startPositionOfElementName,1)][] = $element; 2813 $this-> pkg_elements[$this-> package][$this> subpackage][substr(strtolower($element-> getName()),$startPositionOfElementName,1)][] = $element; 2814 } 2815 } 2816 2817 /** 2818 * returns an abstract link to element. Do not modify or override 2819 * 2820 * This method should only be called in process of Conversion, unless 2821 * $element is a parserPage, or $page is set to true, and $element is 2822 * not a parserPage 2823 * @return abstractLink abstractLink descendant 2824 * @access private 2825 * @param parserElement element to add a new link (descended from 2826 * {@link abstractLink})to the {@link $links} array 2827 * @param string classname for elements that are class-based (this may be 2828 * deprecated in the future, as the classname 2829 * should be contained within the element. if $element is a 2830 * page, this parameter is a package name 2831 * @param string subpackage name for page elements 2832 */ 2833 function addLink(& $element,$page = false) 2834 { 2835 if ($page) 2836 { 2837 // create a fake parserPage to extract the fileAlias for this link 2838 $fakepage = new parserPage; 2839 $fakepage-> setPath($element-> getPath()); 2840 $fakepage-> setFile(basename($element-> getPath())); 2841 $this-> curname = $this-> getPageName($fakepage); 2842 } 2843 switch($element-> type)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 997 of 1382

2844 { 2845 case 'function': 2846 $x = new functionLink; 2847 $x-> addLink($element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element-> docblock> category); 2848 return $x; 2849 break; 2850 case 'define': 2851 $x = new defineLink; 2852 $x-> addLink($element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element-> docblock> category); 2853 return $x; 2854 break; 2855 case 'global': 2856 $x = new globalLink; 2857 $x-> addLink($element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element-> docblock> category); 2858 return $x; 2859 break; 2860 case 'class': 2861 $x = new classLink; 2862 $x-> addLink($element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element-> docblock> category); 2863 return $x; 2864 break; 2865 case 'method': 2866 $x = new methodLink; 2867 $x-> addLink($this-> class, $element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element> docblock-> category); 2868 return $x; 2869 break; 2870 case 'var': 2871 $x = new varLink; 2872 $x-> addLink($this-> class, $element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element> docblock-> category); 2873 return $x; 2874 break; 2875 case 'const': 2876 $x = new constLink; 2877 $x-> addLink($this-> class, $element-> getPath(), $this-> curname, $element-> name, $element-> docblock-> package, $element-> docblock-> subpackage, $element> docblock-> category); 2878 return $x; 2879 break; 2880 case 'page': 2881 $x = new pageLink; 2882 $x-> addLink($element-> getPath(),$this-> getPageName($element),$element> file,$element-> package, $element-> subpackage, $element-> category); 2883 return $x; 2884 break; 2885 } 2886 } 2887 2888 /** 2889 * Return a tree of all classes that extend this class 2890 * 2891 * The data structure returned is designed for a non-recursive algorithm, 2892 * and is somewhat complex. 2893 * In most cases, the array returned is: 2894 * 2895 * <pre> 2896 * array('#root' => 2897 * array('link' => {@link classLink} to $class, 2898 * 'parent' => false, 2899 * 'children' => array(array('class' => 'childclass1', 2900 * 'package' => 'child1package'), 2901 * array('class' => 'childclass2', 2902 * 'package' => 'child2package'),... 2903 * ) 2904 * ), 2905 * 'child1package#childclass1' => 2906 * array('link' => {@link classLink} to childclass1, 2907 * 'parent' => '#root', 2908 * 'children' => array(array('class' => 'kidclass',

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 998 of 1382

2909 * 'package' => 'kidpackage'),... 2910 * ) 2911 * ), 2912 * 'kidpackage#kidclass' => 2913 * array('link' => {@link classLink} to kidclass, 2914 * 'parent' => 'child1package#childclass1', 2915 * 'children' => array() // no children 2916 * ), 2917 * .... 2918 * ) 2919 *</pre> 2920 * 2921 * To describe this format using language, every class in the tree has an 2922 * entry in the first level of the array. The index for all child 2923 * classes that extend the root class is childpackage#childclassname. 2924 * Each entry in the array has 3 elements: link, parent, and children. 2925 * <ul> 2926 * <li>link - a {@link classLink} to the current class</li> 2927 * <li>parent - a {@link classLink} to the class's parent, or false (except for one special case described below)</li> 2928 * <li>children - an array of arrays, each entry has a 'class' and 'package' index to the child class, 2929 * used to find the entry in the big array</li> 2930 * </ul> 2931 * 2932 * special cases are when the #root class has a parent in another package, 2933 * or when the #root class extends a class not found 2934 * by phpDocumentor. In the first case, parent will be a 2935 * classLink to the parent class. In the second, parent will be the 2936 * extends clause, as in: 2937 * <code> 2938 * class X extends Y 2939 * { 2940 * ... 2941 * } 2942 * </code> 2943 * in this case, the #root entry will be array('link' => classLink to X, 'parent' => 'Y', children => array(...)) 2944 * 2945 * The fastest way to design a method to process the array returned 2946 * is to copy HTMLframesConverter::getRootTree() into 2947 * your converter and to modify the html to whatever output format you are going to use 2948 * @see HTMLframesConverter::getRootTree() 2949 * @param string class name 2950 * @param string 2951 * @param string 2952 * @return array Format: see docs 2953 */ 2954 function getSortedClassTreeFromClass($class,$package,$subpackage) 2955 { 2956 $my_tree = array(); 2957 $root = $this-> classes-> getClassByPackage($class,$package); 2958 if (!$root) return false; 2959 $class_children = $this-> classes-> getDefiniteChildren($class,$root-> curfile); 2960 if (!$class_children) 2961 { 2962 // special case: parent class is found, but is not part of this package, class has no children 2963 if (is_array($root-> parent)) 2964 { 2965 $x = $root-> getParent($this); 2966 if ($x-> docblock-> package != $package) 2967 { 2968 $v = Converter::getClassLink($root-> getName(),$package,$root> getPath()); 2969 return array('#root' => array( 'link' => $v,'parent' => Converter::getClassLink($x-> getName(),$x-> docblock-> package,$x-> getPath()), 'children' => array())); 2970 } 2971 } else 2972 { // class has normal situation, no children 2973 if (is_string($root-> getParent($this))) 2974 return array('#root' => array( 'link' => Converter::getClassLink($root> getName(),$package,$root-> getPath()), 'parent' => $root-> getExtends(),'children' => array())); 2975 else 2976 return array('#root' => array( 'link' => Converter::getClassLink($root> getName(),$package,$root-> getPath()), 'parent' => false, 'children' => array())); 2977 } 2978 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 999 of 1382

2979 // special case: parent class is found, but is not part of this package, class has children 2980 if (is_array($root-> parent)) 2981 { 2982 $x = $root-> getParent($this); 2983 if ($x-> docblock-> package != $package) 2984 { 2985 $v = Converter::getClassLink($root-> getName(),$package,$root-> getPath()); 2986 $my_tree = array('#root' => array( 'link' => $v, 'parent' => Converter::getClassLink($x-> getName(),$x-> docblock-> package,$x-> getPath()), 'children' => array())); 2987 } else 2988 { 2989 } 2990 } else 2991 $my_tree = array('#root' => array( 'link' => Converter::getClassLink($root> getName(),$package,$root-> getPath()), 'parent' => false, 'children' => array())); 2992 // location of tree walker 2993 $cur = '#root'; 2994 $lastcur = array(array(false,0)); 2995 $childpos = 0; 2996 if (isset($class_children)) 2997 { 2998 do 2999 { 3000 if (!$class_children) 3001 { 3002 list($cur, $childpos) = array_pop($lastcur); 3003 if (isset($my_tree[$cur]['children'][$childpos + 1])) 3004 { 3005 array_push($lastcur, array($cur, $childpos + 1)); 3006 $par = $cur; 3007 $cur = $my_tree[$cur]['children'][$childpos + 1]; 3008 $x = $this-> classes> getClassByPackage($cur['class'],$cur['package']); 3009 $childpos = 0; 3010 $cur = $cur['package'] . '#' . $cur['class']; 3011 $my_tree[$cur]['link'] = Converter::getClassLink($x-> getName(),$x> docblock-> package,$x-> getPath()); 3012 $my_tree[$cur]['parent'] = $par; 3013 $my_tree[$cur]['children'] = array(); 3014 $class_children = $this-> classes-> getDefiniteChildren($x> getName(), $x-> curfile); 3015 continue; 3016 } else 3017 { 3018 $class_children = false; 3019 continue; 3020 } 3021 } 3022 foreach($class_children as $chileclass => $chilefile) 3023 { 3024 $ch = $this-> classes-> getClass($chileclass,$chilefile); 3025 $my_tree[$cur]['children'][] = array('class' => $ch-> getName(), 'package' => $ch-> docblock-> package); 3026 } 3027 usort($my_tree[$cur]['children'],'rootcmp'); 3028 if (isset($my_tree[$cur]['children'][$childpos])) 3029 { 3030 array_push($lastcur, array($cur, $childpos)); 3031 $par = $cur; 3032 $cur = $my_tree[$cur]['children'][$childpos]; 3033 $x = $this-> classes-> getClassByPackage($cur['class'],$cur['package']); 3034 $cur = $cur['package'] . '#' . $cur['class']; 3035 $my_tree[$cur]['link'] = Converter::getClassLink($x-> getName(),$x> docblock-> package,$x-> getPath()); 3036 $my_tree[$cur]['parent'] = $par; 3037 $my_tree[$cur]['children'] = array(); 3038 $childpos = 0; 3039 $class_children = $this-> classes-> getDefiniteChildren($x> getName(), $x-> curfile); 3040 } else 3041 { 3042 list($cur, $childpos) = array_pop($lastcur); 3043 } 3044 } while ($cur); 3045 } 3046 return $my_tree; 3047 } 3048

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1000 of 1382

3049 /** 3050 * do not override 3051 * @return bool true if a link to this class exists in package $package and subpackage $subpackage 3052 * @param string $expr class name 3053 * @param string $package package to search in 3054 * @param string $subpackage subpackage to search in 3055 * @access private 3056 */ 3057 function isLinkedClass($expr,$package,$subpackage,$file=false) 3058 { 3059 if ($file) 3060 return isset($this-> linkswithfile[$package][$subpackage]['class'][$file][$expr]); 3061 return isset($this-> links[$package][$subpackage]['class'][$expr]); 3062 } 3063 3064 /** 3065 * do not override 3066 * @return bool true if a link to this function exists in package $package and subpackage $subpackage 3067 * @param string $expr function name 3068 * @param string $package package to search in 3069 * @param string $subpackage subpackage to search in 3070 * @access private 3071 */ 3072 function isLinkedFunction($expr,$package,$subpackage,$file=false) 3073 { 3074 if ($file) 3075 return isset($this-> linkswithfile[$package][$subpackage]['function'][$file][$expr]); 3076 return isset($this-> links[$package][$subpackage]['function'][$expr]); 3077 } 3078 3079 /** 3080 * do not override 3081 * @return bool true if a link to this define exists in package $package and subpackage $subpackage 3082 * @param string $expr define name 3083 * @param string $package package to search in 3084 * @param string $subpackage subpackage to search in 3085 * @access private 3086 */ 3087 function isLinkedDefine($expr,$package,$subpackage,$file=false) 3088 { 3089 if ($file) 3090 return isset($this-> linkswithfile[$package][$subpackage]['define'][$file][$expr]); 3091 return isset($this-> links[$package][$subpackage]['define'][$expr]); 3092 } 3093 3094 /** 3095 * do not override 3096 * @return bool true if a link to this define exists in package $package and subpackage $subpackage 3097 * @param string $expr define name 3098 * @param string $package package to search in 3099 * @param string $subpackage subpackage to search in 3100 * @access private 3101 */ 3102 function isLinkedGlobal($expr,$package,$subpackage,$file=false) 3103 { 3104 if ($file) 3105 return isset($this-> linkswithfile[$package][$subpackage]['global'][$file][$expr]); 3106 return isset($this-> links[$package][$subpackage]['global'][$expr]); 3107 } 3108 3109 /** 3110 * do not override 3111 * @return bool true if a link to this procedural page exists in package $package and subpackage $subpackage 3112 * @param string $expr procedural page name 3113 * @param string $package package to search in 3114 * @param string $subpackage subpackage to search in 3115 * @access private 3116 */ 3117 function isLinkedPage($expr,$package,$subpackage,$path=false) 3118 { 3119 if ($path) 3120 return isset($this-> linkswithfile[$package][$subpackage]['page'][$path][$expr]); 3121 return isset($this-> links[$package][$subpackage]['page'][$expr]); 3122 } 3123

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1001 of 1382

3124 /** 3125 * do not override 3126 * @return bool true if a link to this method exists in package $package, subpackage $subpackage and class $class 3127 * @param string $expr method name 3128 * @param string $class class name 3129 * @param string $package package to search in 3130 * @param string $subpackage subpackage to search in 3131 * @access private 3132 */ 3133 function isLinkedMethod($expr,$package,$subpackage,$class,$file=false) 3134 { 3135 if ($file) 3136 return isset($this> linkswithfile[$package][$subpackage]['method'][$file][$class][$expr]); 3137 return isset($this-> links[$package][$subpackage]['method'][$class][$expr]); 3138 } 3139 3140 /** 3141 * do not override 3142 * @return bool true if a link to this method exists in package $package, subpackage $subpackage and class $class 3143 * @param string $expr var name 3144 * @param string $class class name 3145 * @param string $package package to search in 3146 * @param string $subpackage subpackage to search in 3147 * @access private 3148 */ 3149 function isLinkedVar($expr,$package,$subpackage,$class,$file=false) 3150 { 3151 if ($file) 3152 return isset($this> linkswithfile[$package][$subpackage]['var'][$file][$class][$expr]); 3153 return isset($this-> links[$package][$subpackage]['var'][$class][$expr]); 3154 } 3155 3156 /** 3157 * do not override 3158 * @return bool true if a link to this method exists in package $package, subpackage $subpackage and class $class 3159 * @param string $expr constant name 3160 * @param string $class class name 3161 * @param string $package package to search in 3162 * @param string $subpackage subpackage to search in 3163 * @access private 3164 */ 3165 function isLinkedConst($expr,$package,$subpackage,$class,$file=false) 3166 { 3167 if ($file) 3168 return isset($this> linkswithfile[$package][$subpackage]['const'][$file][$class][$expr]); 3169 return isset($this-> links[$package][$subpackage]['const'][$class][$expr]); 3170 } 3171 3172 /** 3173 * return false or a {@link classLink} to $expr 3174 * @param string $expr class name 3175 * @param string $package package name 3176 * @return mixed returns a {@link classLink} or false if the element is not found in package $package 3177 * @see classLink 3178 */ 3179 function getClassLink($expr,$package,$file=false, $text = false) 3180 { 3181 if (!isset($this-> links[$package])) return false; 3182 foreach($this-> links[$package] as $subpackage => $notused) 3183 { 3184 if ($this-> isLinkedClass($expr,$package,$subpackage,$file)) 3185 { 3186 if ($file) 3187 { 3188 return $this> linkswithfile[$package][$subpackage]['class'][$file][$expr]; 3189 } 3190 return $this-> links[$package][$subpackage]['class'][$expr]; 3191 } 3192 } 3193 return false; 3194 } 3195

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1002 of 1382

3196 /** 3197 * return false or a {@link functionLink} to $expr 3198 * @param string $expr function name 3199 * @param string $package package name 3200 * @return mixed returns a {@link functionLink} or false if the element is not found in package $package 3201 * @see functionLink 3202 */ 3203 function getFunctionLink($expr,$package,$file=false, $text = false) 3204 { 3205 if (!isset($this-> links[$package])) return false; 3206 foreach($this-> links[$package] as $subpackage => $notused) 3207 { 3208 if ($this-> isLinkedFunction($expr,$package,$subpackage,$file)) 3209 { 3210 if ($file) 3211 { 3212 return $this> linkswithfile[$package][$subpackage]['function'][$file][$expr]; 3213 } 3214 return $this-> links[$package][$subpackage]['function'][$expr]; 3215 } 3216 } 3217 return false; 3218 } 3219 3220 /** 3221 * return false or a {@link defineLink} to $expr 3222 * @param string $expr constant name 3223 * @param string $package package name 3224 * @return mixed returns a {@link defineLink} or false if the element is not found in package $package 3225 * @see defineLink 3226 */ 3227 function getDefineLink($expr,$package,$file=false, $text = false) 3228 { 3229 if (!isset($this-> links[$package])) return false; 3230 foreach($this-> links[$package] as $subpackage => $notused) 3231 { 3232 if ($this-> isLinkedDefine($expr,$package,$subpackage,$file)) 3233 { 3234 if ($file) 3235 { 3236 return $this> linkswithfile[$package][$subpackage]['define'][$file][$expr]; 3237 } 3238 return $this-> links[$package][$subpackage]['define'][$expr]; 3239 } 3240 } 3241 return false; 3242 } 3243 3244 /** 3245 * return false or a {@link globalLink} to $expr 3246 * @param string $expr global variable name (with leading $) 3247 * @param string $package package name 3248 * @return mixed returns a {@link defineLink} or false if the element is not found in package $package 3249 * @see defineLink 3250 */ 3251 function getGlobalLink($expr,$package,$file=false, $text = false) 3252 { 3253 if (!isset($this-> links[$package])) return false; 3254 foreach($this-> links[$package] as $subpackage => $notused) 3255 { 3256 if ($this-> isLinkedGlobal($expr,$package,$subpackage,$file)) 3257 { 3258 if ($file) 3259 { 3260 return $this> linkswithfile[$package][$subpackage]['global'][$file][$expr]; 3261 } 3262 return $this-> links[$package][$subpackage]['global'][$expr]; 3263 } 3264 } 3265 return false; 3266 } 3267 3268 /** 3269 * return false or a {@link pageLink} to $expr

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1003 of 1382

3270 * @param string $expr procedural page name 3271 * @param string $package package name 3272 * @return mixed returns a {@link pageLink} or false if the element is not found in package $package 3273 * @see pageLink 3274 */ 3275 function getPageLink($expr,$package,$path = false, $text = false, $packages = false) 3276 { 3277 if (!isset($this-> links[$package])) return false; 3278 foreach($this-> links[$package] as $subpackage => $notused) 3279 { 3280 if ($this-> isLinkedPage($expr,$package,$subpackage,$path)) 3281 { 3282 if ($path) 3283 { 3284 return $this-> linkswithfile[$package][$subpackage]['page'][$path][$expr]; 3285 } 3286 return $this-> links[$package][$subpackage]['page'][$expr]; 3287 } 3288 } 3289 return false; 3290 } 3291 3292 /** 3293 * return false or a {@link methodLink} to $expr in $class 3294 * @param string $expr method name 3295 * @param string $class class name 3296 * @param string $package package name 3297 * @return mixed returns a {@link methodLink} or false if the element is not found in package $package, class $class 3298 * @see methodLink 3299 */ 3300 function getMethodLink($expr,$class,$package,$file=false, $text = false) 3301 { 3302 $expr = trim($expr); 3303 $class = trim($class); 3304 if (!isset($this-> links[$package])) return false; 3305 foreach($this-> links[$package] as $subpackage => $notused) 3306 { 3307 if ($this-> isLinkedMethod($expr,$package,$subpackage,$class,$file)) 3308 { 3309 if ($file) 3310 { 3311 return $this> linkswithfile[$package][$subpackage]['method'][$file][$class][$expr]; 3312 } 3313 return $this-> links[$package][$subpackage]['method'][$class][$expr]; 3314 } 3315 } 3316 return false; 3317 } 3318 3319 /** 3320 * return false or a {@link varLink} to $expr in $class 3321 * @param string $expr var name 3322 * @param string $class class name 3323 * @param string $package package name 3324 * @return mixed returns a {@link varLink} or false if the element is not found in package $package, class $class 3325 * @see varLink 3326 */ 3327 function getVarLink($expr,$class,$package,$file=false, $text = false) 3328 { 3329 $expr = trim($expr); 3330 $class = trim($class); 3331 if (!isset($this-> links[$package])) return false; 3332 foreach($this-> links[$package] as $subpackage => $notused) 3333 { 3334 if ($this-> isLinkedVar($expr,$package,$subpackage,$class,$file)) 3335 { 3336 if ($file) 3337 { 3338 return $this> linkswithfile[$package][$subpackage]['var'][$file][$class][$expr]; 3339 } 3340 return $this-> links[$package][$subpackage]['var'][$class][$expr]; 3341 } 3342 } 3343 return false; 3344 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1004 of 1382

3345 3346 /** 3347 * return false or a {@link constLink} to $expr in $class 3348 * @param string $expr constant name 3349 * @param string $class class name 3350 * @param string $package package name 3351 * @return mixed returns a {@link varLink} or false if the element is not found in package $package, class $class 3352 * @see constLink 3353 */ 3354 function getConstLink($expr,$class,$package,$file=false, $text = false) 3355 { 3356 $expr = trim($expr); 3357 $class = trim($class); 3358 if (!isset($this-> links[$package])) return false; 3359 foreach($this-> links[$package] as $subpackage => $notused) 3360 { 3361 if ($this-> isLinkedConst($expr,$package,$subpackage,$class,$file)) 3362 { 3363 if ($file) 3364 { 3365 return $this> linkswithfile[$package][$subpackage]['const'][$file][$class][$expr]; 3366 } 3367 return $this-> links[$package][$subpackage]['const'][$class][$expr]; 3368 } 3369 } 3370 return false; 3371 } 3372 3373 /** 3374 * The meat of the @tutorial tag and inline {@}tutorial} tag 3375 * 3376 * Take a string and return an abstract link to the tutorial it represents. 3377 * Since tutorial naming literally works like the underlying filesystem, the 3378 * way to reference the tutorial is similar. Tutorials are located in a 3379 * subdirectory of any directory parsed, which is named 'tutorials/' (we 3380 * try to make things simple when we can :). They are further organized by 3381 * package and subpackage as: 3382 * 3383 * tutorials/package/subpackage 3384 * 3385 * and the files are named *.cls, *.pkg, or *.proc, and so a link to a tutorial 3386 * named file.cls can be referenced (depending on context) as any of: 3387 * 3388 * <code> 3389 * * @tutorial package/subpackage/file.cls 3390 * * @tutorial package/file.cls 3391 * * @tutorial file.cls 3392 * </code> 3393 * 3394 * The first case will only be needed if file.cls exists in both the current 3395 * package, in anotherpackage/file.cls and in anotherpackage/subpackage/file.cls 3396 * and you wish to reference the one in anotherpackage/subpackage. 3397 * The second case is only needed if you wish to reference file.cls in another 3398 * package and it is unique in that package. the third will link to the first 3399 * file.cls it finds using this search method: 3400 * 3401 * <ol> 3402 * <li>current package/subpackage</li> 3403 * <li>all other subpackages of current package</li> 3404 * <li>parent package, if this package has classes that extend classes in 3405 * another package</li> 3406 * <li>all other packages</li> 3407 * </ol> 3408 * @return tutorialLink|stringreturns either a link, or the original text, if not found 3409 * @param string the original expression 3410 * @param string package to look in first 3411 * @param string subpackage to look in first 3412 * @param array array of package names to search in if not found in parent packages. 3413 * This is used to limit the search, phpDocumentor automatically searches 3414 * all packages 3415 * @since 1.2 3416 */ 3417 function getTutorialLink($expr, $package = false, $subpackage = false, $packages = false) 3418 { 3419 // is $expr a comma-delimited list? 3420 if (strpos($expr,',')) 3421 { 3422 $a = explode(',',$expr);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1005 of 1382

3423 $b = array(); 3424 for($i=0;$i< count($a);$i++) 3425 { 3426 // if so return each component with a link 3427 $b[] = Converter::getTutorialLink(trim($a[$i])); 3428 } 3429 return $b; 3430 } 3431 $subsection = ''; 3432 if (strpos($expr,'#')) 3433 { 3434 $a = explode('#',$expr); 3435 $org = $expr; 3436 $expr = $a[0]; 3437 $subsection = $a[1]; 3438 } 3439 if (strpos($expr,'/')) 3440 { 3441 $a = explode('/',$expr); 3442 if (count($a) == 3) 3443 { 3444 return Converter::getTutorialLink($a[2],$a[0],$a[1],array()); 3445 } 3446 if (count($a) == 2) 3447 { 3448 return Converter::getTutorialLink($a[1],$a[0],false,array()); 3449 } 3450 } 3451 if (!$package) $package = $this-> package; 3452 if (!$subpackage) $subpackage = $this-> subpackage; 3453 if (!isset($this-> all_packages[$package])) return $expr; 3454 elseif (isset($packages[$package])) unset($packages[$package]); 3455 $ext = pathinfo($expr, PATHINFO_EXTENSION); 3456 if (isset($this-> tutorials[$package][$subpackage][$ext][$expr])) 3457 { 3458 $a = $this-> tutorials[$package][$subpackage][$ext][$expr]; 3459 $link = new tutorialLink; 3460 $link-> addLink($subsection,$a-> path,$a-> name,$a-> package,$a> subpackage,$a-> getTitle($this,$subsection)); 3461 return $link; 3462 } 3463 do 3464 { 3465 if (!is_array($packages)) 3466 { 3467 $packages = $this-> all_packages; 3468 if (isset($packages[$package])) unset($packages[$package]); 3469 } 3470 if (isset($this-> tutorials[$package])) 3471 { 3472 if (isset($this-> tutorials[$package][$subpackage][$ext][$expr])) 3473 { 3474 $a = $this-> tutorials[$package][$subpackage][$ext][$expr]; 3475 $link = new tutorialLink; 3476 $link-> addLink($subsection,$a-> path,$a-> name,$a-> package,$a> subpackage,$a-> getTitle($this)); 3477 return $link; 3478 } else 3479 { 3480 foreach($this-> tutorials[$package] as $subpackage => $stuff) 3481 { 3482 if (isset($stuff[$ext][$expr])) 3483 { 3484 $a = $stuff[$ext][$expr]; 3485 $link = new tutorialLink; 3486 $link-> addLink($subsection,$a-> path,$a-> name,$a> package,$a-> subpackage,$a-> getTitle($this)); 3487 return $link; 3488 } 3489 } 3490 } 3491 } 3492 // try other packages 3493 // look in parent package first, if found 3494 if (isset($this-> package_parents[$package])) 3495 { 3496 $p1 = $package; 3497 $package = $this-> package_parents[$package]; 3498 } else 3499 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1006 of 1382

3500 // no parent package, so start with the first one that's left 3501 list($package,) = @each($packages); 3502 } 3503 if ($package) 3504 { 3505 if (isset($packages[$package])) unset($packages[$package]); 3506 } 3507 } while (count($packages) || $package); 3508 addWarning(PDERROR_TUTORIAL_NOT_FOUND,$expr); 3509 return $expr; 3510 } 3511 3512 /** 3513 * The meat of the @see tag and inline {@}link} tag 3514 * 3515 * $expr is a string with many allowable formats: 3516 * <ol> 3517 * <li>proceduralpagename.ext</li> 3518 * <li>constant_name</li> 3519 * <li>classname::function()</li> 3520 * <li>classname::constantname</li> (new 1.2.4) 3521 * <li>classname::$variablename</li> 3522 * <li>classname</li> 3523 * <li>object classname</li> 3524 * <li>function functionname()</li> 3525 * <li>global $globalvarname</li> 3526 * <li>packagename#expr where expr is any of the above</li> 3527 * </ol> 3528 * 3529 * New in version 1.1, you can explicitly specify a package to link to that 3530 * is different from the current package. Use the # operator 3531 * to specify a new package, as in tests#bug-540368.php (which should appear 3532 * as a link like: " {@link tests#bug-540368.php}"). This 3533 * example links to the procedural page bug-540368.php in package 3534 * tests. Also, the "function" operator is now used to specifically 3535 * link to a function instead of a method in the current class. 3536 * 3537 * <code> 3538 * class myclass 3539 * { 3540 * // from inside the class definition, use "function conflict()" to refer to procedural function "conflict()" 3541 * function conflict() 3542 * { 3543 * } 3544 * } 3545 * 3546 * function conflict() 3547 * { 3548 * } 3549 * </code> 3550 * 3551 * If classname:: is not present, and the see tag is in a documentation 3552 * block within a class, then the function uses the classname to 3553 * search for $expr as a function or variable within classname, or any of its parent classes. 3554 * given an $expr without '$', '::' or '()' getLink first searches for 3555 * classes, procedural pages, constants, global variables, and then searches for 3556 * methods and variables within the default class, and finally for any function 3557 * 3558 * @param string $expr expression to search for a link 3559 * @param string $package package to start searching in 3560 * @param array $packages list of all packages to search in 3561 * @return mixed getLink returns a descendant of {@link abstractLink} if it finds a link, otherwise it returns a string 3562 * @see getPageLink(), getDefineLink(), getVarLink(), getFunctionLink(), getClassLink() 3563 * @see pageLink, functionLink, defineLink, classLink, methodLink, varLink 3564 */ 3565 function & getLink($expr, $package = false, $packages = false) 3566 { 3567 // is $expr a comma-delimited list? 3568 if (strpos($expr,',')) 3569 { 3570 $a = explode(',',$expr); 3571 $b = array(); 3572 for($i=0;$i< count($a);$i++) 3573 { 3574 // if so return each component with a link 3575 $b[] = Converter::getLink(trim($a[$i])); 3576 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1007 of 1382

3577 return $b; 3578 } 3579 if (strpos($expr,'#')) 3580 { 3581 $a = explode('#',$expr); 3582 if (count($a) == 2) 3583 { // can have exactly 1 package override, otherwise it's ignored 3584 // feature 564991, link to php manual 3585 if ($a[0] == 'PHP_MANUAL') { 3586 $s = 'http://www.php.net/'.$a[1]; 3587 return $s; 3588 } 3589 $s = & Converter::getLink($a[1],$a[0],array()); 3590 return $s; 3591 } 3592 } 3593 $a = & $this-> _getLink($expr, $package, $packages); 3594 return $a; 3595 } 3596 3597 /** 3598 * @access private 3599 */ 3600 function & _getLink($expr, $package = false, $packages = false) 3601 { 3602 if (!$package) $package = $this-> package; 3603 // 3604 if (!isset($this-> all_packages[$package])) return $expr; 3605 elseif (isset($packages[$package])) unset($packages[$package]); 3606 $links = & $this-> links; 3607 $class = $this-> class; 3608 if (strpos($expr,'function ') === 0) 3609 { // asking for a function, not a method 3610 if ($test = Converter::getFunctionLink(str_replace('function ','',str_replace('()','',$expr)), $package)) return $test; 3611 else return $expr; 3612 } 3613 if (strpos($expr,'global ') === 0) 3614 { // asking for a global variable 3615 if ($test = Converter::getGlobalLink(str_replace('global ','',$expr), $package)) return $test; 3616 else return $expr; 3617 } 3618 if (strpos($expr,'object ') === 0) 3619 { // asking for a class 3620 if ($test = Converter::getClassLink(str_replace('object ','',$expr), $package)) return $test; 3621 else return $expr; 3622 } 3623 if (strpos($expr,'constant ') === 0) 3624 { // asking for a class 3625 if ($test = Converter::getDefineLink(str_replace('constant ','',$expr), $package)) return $test; 3626 else return $expr; 3627 } 3628 // are we in a class? 3629 if ($class) 3630 { 3631 // is $expr simply a word? see if it is the class 3632 if (trim($expr) == $class) 3633 { 3634 if ($test = Converter::getClassLink(trim(str_replace('object ','',$expr)),$package)) return $test; 3635 } 3636 // if not, check to see if it is a method or variable of this class tree 3637 if (!strpos($expr,'::')) 3638 { 3639 // if get is neither get() nor $get, assume get is a function, add () to make get() 3640 if (strpos($expr,'$') !== 0 && ! strpos($expr,'()')) //$get = $get.'()'; 3641 { 3642 if ($a = $this-> getLinkMethod($expr,$class,$package)) return $a; 3643 if ($a = $this-> getLinkConst($expr,$class,$package)) return $a; 3644 if ($a = $this-> getLinkVar('$'.$expr,$class,$package)) return $a; 3645 } 3646 if (strpos($expr,'()')) if ($a = $this> getLinkMethod($expr,$class,$package)) return $a; 3647 if (is_numeric(strpos($expr,'$'))) if ($a = $this> getLinkVar($expr,$class,$package)) return $a; 3648 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1008 of 1382

3649 } 3650 if ($test = Converter::getClassLink(trim(str_replace('object ','',$expr)),$package)) return $test; 3651 if ($test = Converter::getPageLink(trim($expr),$package)) return $test; 3652 if ($test = Converter::getDefineLink(trim($expr),$package)) return $test; 3653 if ($test = Converter::getGlobalLink(trim($expr),$package)) return $test; 3654 // if (strpos($expr,'.')) 3655 // package specified 3656 3657 if (!is_array($packages)) 3658 { 3659 $packages = $this-> all_packages; 3660 } 3661 do 3662 { 3663 if (isset($packages[$package])) unset($packages[$package]); 3664 if ($test = Converter::getClassLink(str_replace('object ','',$expr),$package)) return $test; 3665 if ($test = Converter::getPageLink($expr,$package)) return $test; 3666 if ($test = Converter::getDefineLink($expr,$package)) return $test; 3667 if ($test = Converter::getGlobalLink($expr,$package)) return $test; 3668 // is $expr in class::method() or class::$variable format? 3669 if (strpos($expr,'function ') === 0) 3670 { // asking for a function, not a method 3671 if ($test = Converter::getFunctionLink(str_replace('function','',str_replace('()','',$expr)), $package)) return $test; 3672 else return $expr; 3673 } 3674 $test = $this-> _getDoubleColon($expr, $package, $packages, $class, $links); 3675 if (!is_string($test)) return $test; 3676 if (strpos($test, 'parent::') === 0) return $test; 3677 // $expr does not have :: 3678 if (is_numeric(@strpos('$',$expr))) 3679 { 3680 // default to current class, whose name is contained in $this->render>parent 3681 if ($test = Converter::getVarLink($expr, $class, $package)) return $test; 3682 } 3683 // $expr is a function? (non-method) 3684 if (@strpos($expr,'()')) 3685 { 3686 // otherwise, see if it is a method 3687 if ($class) 3688 { 3689 if ($test = Converter::getMethodLink(str_replace('()','',$expr), $class, $package)) return $test; 3690 } 3691 // extract the function name, use it to retrieve the file that the function is in 3692 // $page = $this->func_page[str_replace('function ','',str_replace('()','',$expr))]; 3693 // return the link 3694 if ($test = Converter::getFunctionLink(str_replace('function ','',str_replace('()','',$expr)), $package)) return $test; 3695 } 3696 // $expr is just a word. First, test to see if it is a function of the current package 3697 if ($test = Converter::getFunctionLink(str_replace('function ','',str_replace('()','',$expr)), $package)) return $test; 3698 // try other packages 3699 // look in parent package first, if found 3700 if (isset($this-> package_parents[$package]) && in_array($this> package_parents[$package], $packages)) 3701 { 3702 $p1 = $package; 3703 $package = $this-> package_parents[$package]; 3704 if ($package) 3705 { 3706 if (isset($packages[$package])) unset($packages[$package]); 3707 } 3708 continue; 3709 } 3710 // no parent package, so start with the first one that's left 3711 $package = @array_shift(@array_keys($packages)); 3712 if ($package && isset( $packages[$package])) 3713 { 3714 unset($packages[$package]); 3715 } 3716 } while (count($packages) || $package);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1009 of 1382

3717 $funcs = get_defined_functions(); 3718 // feature 564991, link to php manual 3719 if (in_array(str_replace(array('(',')'),array('',''),$expr),$funcs['internal'])) 3720 { 3721 $return = 'http://www.php.net/'.str_replace(array('(',')'),array('',''),$expr); 3722 return $return; 3723 } 3724 // no links found 3725 return $expr; 3726 } 3727 3728 /** 3729 * Split up getLink to make it easier to debug 3730 * @access private 3731 */ 3732 function _getDoubleColon(& $expr, & $package, & $packages, $class, $links) 3733 { 3734 if (@strpos($expr,'::')) 3735 { 3736 $class_method = explode('::',$expr); 3737 if ($class_method[0] == 'parent') 3738 { 3739 // can only have parent in the same package as the class! subtle bug 3740 $package = $this-> package; 3741 $packages = array(); 3742 $cl = $this-> classes-> getClassByPackage($class,$package); 3743 if (!$cl) 3744 { // this is possible if an example file has parent::method() 3745 return $expr; 3746 } 3747 $par = $cl-> getParent($this); 3748 $phpparent = false; 3749 if (is_object($par)) 3750 { 3751 $package = $par-> docblock-> package; 3752 $phpparent = $par-> getName(); 3753 } else 3754 { 3755 addWarning(PDERROR_CLASS_PARENT_NOT_FOUND,$class,$package,$class_method[1]); 3756 return $expr; 3757 } 3758 if ($phpparent) $class_method[0] = $phpparent; 3759 } 3760 if (strpos($class_method[1],'()')) 3761 { 3762 // strip everything but the function name, return a link 3763 if ($test = Converter::getMethodLink(str_replace('()','',$class_method[1]), $class_method[0], $package)) return $test; 3764 } 3765 if ($test = Converter::getVarLink($class_method[1], $class_method[0], $package)) return $test; 3766 if ($test = Converter::getConstLink($class_method[1], $class_method[0], $package)) return $test; 3767 } 3768 return $expr; 3769 } 3770 3771 /** 3772 * cycle through parent classes to retrieve a link to a method 3773 * do not use or override, used by getLink 3774 * @access private 3775 */ 3776 function & getLinkMethod($expr, $class, $package) 3777 { 3778 $links = & $this-> links; 3779 do 3780 { 3781 // is $expr in class::method() or class::$variable format? 3782 if (@strpos($expr,'::')) 3783 { 3784 $class_method = explode('::',$expr); 3785 if ($class_method[0] == 'parent') 3786 { 3787 $cl = $this-> classes-> getClassByPackage($class,$package); 3788 $par = $cl-> getParent($this); 3789 $phpparent = false; 3790 if (is_object($par)) 3791 { 3792 $package = $par-> docblock-> package; 3793 $phpparent = $par-> getName();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1010 of 1382

3794 } else addWarning(PDERROR_CLASSPARENT_NOTFOUND,$class,$package,$class_method[1]); 3795 if ($phpparent) $class_method[0] = $phpparent; 3796 } else 3797 { 3798 $cl = $this-> classes-> getClassByPackage($class,$package); 3799 } 3800 if (strpos($class_method[1],'()')) 3801 { 3802 // strip everything but the function name, return a link 3803 if ($test = Converter::getMethodLink(str_replace('function ','',str_replace('()','',$class_method[1])), $class_method[0], $package)) return $test; 3804 } 3805 } 3806 if ($test = Converter::getMethodLink(str_replace('()','',$expr), $class, $package)) return $test; 3807 $cl = $this-> classes-> getClassByPackage($class,$package); 3808 if ($cl) 3809 { 3810 $par = $cl-> getParent($this); 3811 if (is_object($par)) 3812 { 3813 $package = $par-> docblock-> package; 3814 $class = $par-> getName(); 3815 } else $class = $par; 3816 } else $class = false; 3817 } while ($class); 3818 // no links found 3819 $flag = false; 3820 return $flag; 3821 } 3822 3823 /** 3824 * cycle through parent classes to retrieve a link to a var 3825 * do not use or override, used by getLink 3826 * @access private 3827 */ 3828 function & getLinkVar($expr, $class, $package) 3829 { 3830 $links = & $this-> links; 3831 do 3832 { 3833 // is $expr in class::method() or class::$variable format? 3834 if (@strpos($expr,'::')) 3835 { 3836 $class_method = explode('::',$expr); 3837 if ($class_method[0] == 'parent') 3838 { 3839 $cl = $this-> classes-> getClassByPackage($class,$package); 3840 $phpparent = false; 3841 $par = $cl-> getParent($this); 3842 if (is_object($par)) 3843 { 3844 $package = $par-> docblock-> package; 3845 $phpparent = $par-> getName(); 3846 } else addWarning(PDERROR_CLASSPARENT_NOTFOUND,$class,$package,$class_method[1]); 3847 if ($phpparent) $class_method[0] = $phpparent; 3848 } else 3849 { 3850 $cl = $this-> classes-> getClassByPackage($class,$package); 3851 } 3852 if ($test = Converter::getVarLink($class_method[1], $class_method[0], $package)) return $test; 3853 if ($test = Converter::getVarLink('$'.$class_method[1], $class_method[0], $package)) return $test; 3854 } 3855 if ($test = Converter::getVarLink($expr, $class, $package)) return $test; 3856 if ($test = Converter::getVarLink('$'.$expr, $class, $package)) return $test; 3857 $cl = $this-> classes-> getClassByPackage($class,$package); 3858 if ($cl) 3859 { 3860 $par = $cl-> getParent($this); 3861 if (is_object($par)) 3862 { 3863 $package = $par-> docblock-> package; 3864 $class = $par-> getName(); 3865 } else $class = $par; 3866 } else $class = false; 3867 } while ($class);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1011 of 1382

3868 // no links found 3869 $class = false; 3870 return $class; 3871 } 3872 3873 /** 3874 * cycle through parent classes to retrieve a link to a class constant 3875 * do not use or override, used by getLink 3876 * @access private 3877 * @since 1.2.4 3878 */ 3879 function & getLinkConst($expr, $class, $package) 3880 { 3881 $links = & $this-> links; 3882 do 3883 { 3884 // is $expr in class::method() or class::$variable format? 3885 if (@strpos($expr,'::')) 3886 { 3887 $class_method = explode('::',$expr); 3888 if ($class_method[0] == 'parent') 3889 { 3890 $cl = $this-> classes-> getClassByPackage($class,$package); 3891 $phpparent = false; 3892 $par = $cl-> getParent($this); 3893 if (is_object($par)) 3894 { 3895 $package = $par-> docblock-> package; 3896 $phpparent = $par-> getName(); 3897 } else addWarning(PDERROR_CLASSPARENT_NOTFOUND,$class,$package,$class_method[1]); 3898 if ($phpparent) $class_method[0] = $phpparent; 3899 } else 3900 { 3901 $cl = $this-> classes-> getClassByPackage($class,$package); 3902 } 3903 if ($test = Converter::getConstLink($class_method[1], $class_method[0], $package)) return $test; 3904 } 3905 if ($test = Converter::getConstLink($expr, $class, $package)) return $test; 3906 $cl = $this-> classes-> getClassByPackage($class,$package); 3907 if ($cl) 3908 { 3909 $par = $cl-> getParent($this); 3910 if (is_object($par)) 3911 { 3912 $package = $par-> docblock-> package; 3913 $class = $par-> getName(); 3914 } else $class = $par; 3915 } else $class = false; 3916 } while ($class); 3917 // no links found 3918 $flag = false; 3919 return $flag; 3920 } 3921 3922 /** 3923 * take URL $link and text $text and return a link in the format needed for the Converter 3924 * @param string URL 3925 * @param string text to display 3926 * @return string link to $link 3927 * @abstract 3928 */ 3929 function returnLink($link,$text) 3930 { 3931 } 3932 3933 /** 3934 * take {@link abstractLink} descendant and text $eltext and return a link 3935 * in the format needed for the Converter 3936 * @param abstractLink 3937 * @param string 3938 * @return string link to $element 3939 * @abstract 3940 */ 3941 function returnSee(& $link, $eltext = false) 3942 { 3943 } 3944 3945 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1012 of 1382

3946 * take {@link abstractLink} descendant and text $eltext and return a 3947 * unique ID in the format needed for the Converter 3948 * @param abstractLink 3949 * @return string unique identifier of $element 3950 * @abstract 3951 */ 3952 function getId(& $link) 3953 { 3954 } 3955 3956 /** 3957 * Convert README/INSTALL/CHANGELOG file contents to output format 3958 * @param README|INSTALL|CHANGELOG 3959 * @param string contents of the file 3960 * @abstract 3961 */ 3962 function Convert_RIC($name, $contents) 3963 { 3964 } 3965 3966 /** 3967 * Convert all elements to output format 3968 * 3969 * This will call ConvertXxx where Xxx is {@link ucfirst}($element->type). 3970 * It is expected that a child converter defines a handler for every 3971 * element type, even if that handler does nothing. phpDocumentor will 3972 * terminate with an error if a handler doesn't exist. 3973 * {@internal 3974 * Since 1.2.0 beta 3, this function has been moved from child converters 3975 * to the parent, because it doesn't really make sense to put it in the 3976 * child converter, and we can add error handling. 3977 * 3978 * {@source } } 3979 * @throws {@link PDERROR_NO_CONVERT_HANDLER} 3980 * @param mixed {@link parserElement} descendant or {@link parserPackagePage} or {@link parserData} 3981 */ 3982 function Convert(& $element) 3983 { 3984 $handler = 'convert'.ucfirst($element-> type); 3985 if (method_exists($this,$handler)) 3986 { 3987 $this-> $handler($element); 3988 } else 3989 { 3990 addErrorDie(PDERROR_NO_CONVERTER_HANDLER,$element> type,$handler,phpDocumentor_get_class($this)); 3991 } 3992 } 3993 /**#@+ 3994 * Conversion Handlers 3995 * 3996 * All of the convert* handlers set up template variables for the Smarty 3997 * template.{@internal In addition, the {@link newSmarty()} method is 3998 * called to retrieve the global Smarty template}} 3999 */ 4000 /** 4001 * Default Tutorial Handler 4002 * 4003 * Sets up the tutorial template, and its prev/next/parent links 4004 * {@internal 4005 * Retrieves the title using {@link parserTutorial::getTitle()} and uses the 4006 * {@link parserTutorial::prev, parserTutorial::next, parserTutorial::parent} 4007 * links to set up those links.}}} 4008 * @param parserTutorial 4009 */ 4010 function & convertTutorial(& $element) 4011 { 4012 $this-> package = $element-> package; 4013 $this-> subpackage = $element-> subpackage; 4014 $x = $element-> Convert($this); 4015 $template = & $this-> newSmarty(); 4016 $template-> assign('contents',$x); 4017 $template-> assign('title',$element-> getTitle($this)); 4018 $template-> assign('nav',$element-> parent || $element-> prev || $element> next); 4019 if ($element-> parent) 4020 { 4021 $template-> assign('up',$this-> getId($element-> parent)); 4022 $template-> assign('uptitle',$element-> parent-> title);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1013 of 1382

4023 } 4024 if ($element-> prev) 4025 { 4026 $template-> assign('prev',$this-> getId($element-> prev)); 4027 $template-> assign('prevtitle',$element-> prev-> title); 4028 } 4029 if ($element-> next) 4030 { 4031 $template-> assign('next',$this-> getId($element-> next)); 4032 $template-> assign('nexttitle',$element-> next-> title); 4033 } 4034 return $template; 4035 } 4036 /** 4037 * Default Class Handler 4038 * 4039 * Sets up the class template. 4040 * {@internal special methods 4041 * {@link generateChildClassList(), generateFormattedClassTree()}, 4042 * {@link getFormattedConflicts, getFormattedInheritedMethods}, 4043 * and {@link getFormattedInheritedVars} are called to complete vital 4044 * template setup.}}} 4045 */ 4046 function convertClass(& $element) 4047 { 4048 $this-> class = $element-> getName(); 4049 $this-> class_data = & $this-> newSmarty(); 4050 $this-> class_data-> assign("class_name" ,$element-> getName()); 4051 $this-> class_data-> assign("vars" ,array()); 4052 $this-> class_data-> assign("methods" ,array()); 4053 $this-> class_data-> assign("consts" ,array()); 4054 $this-> class_data-> assign("is_interface" , $element-> isInterface()); 4055 $this-> class_data-> assign("implements" , $this> getFormattedImplements($element)); 4056 $this-> class_data-> assign("package" ,$element-> docblock-> package); 4057 $this-> class_data-> assign("line_number" ,$element-> getLineNumber()); 4058 $this-> class_data-> assign("source_location" ,$element> getSourceLocation($this)); 4059 $this-> class_data-> assign("page_link" ,$this> getCurrentPageLink()); 4060 $docblock = $this-> prepareDocBlock($element, false); 4061 $this-> class_data-> assign("sdesc" ,$docblock['sdesc']); 4062 $this-> class_data-> assign("desc" ,$docblock['desc']); 4063 $this-> class_data-> assign("access" , $docblock['access']); 4064 $this-> class_data-> assign("abstract" , $docblock['abstract']); 4065 $this-> class_data-> assign("tags" ,$docblock['tags']); 4066 $this-> class_data-> assign("api_tags" ,$docblock['api_tags']); 4067 $this-> class_data-> assign("info_tags" ,$docblock['info_tags']); 4068 $this-> class_data-> assign("utags" ,$docblock['utags']); 4069 $this-> class_data-> assign( "prop_tags" , $docblock['property_tags'] ); 4070 if ($this-> hasSourceCode($element-> getPath())) { 4071 $this-> class_data-> assign("class_slink" ,$this> getSourceAnchor($element-> getPath(),$element-> getLineNumber(),$element> getLineNumber(),true)); 4072 } 4073 4074 else 4075 $this-> class_data-> assign("class_slink" ,false); 4076 $this-> class_data-> assign("children" , $this> generateChildClassList($element)); 4077 $this-> class_data-> assign("class_tree" , $this> generateFormattedClassTree($element)); 4078 $this-> class_data-> assign("conflicts" , $this> getFormattedConflicts($element,"classes" )); 4079 $inherited_methods = $this-> getFormattedInheritedMethods($element); 4080 if (!empty($inherited_methods)) 4081 { 4082 $this-> class_data-> assign("imethods" ,$inherited_methods); 4083 } else 4084 { 4085 $this-> class_data-> assign("imethods" ,false); 4086 } 4087 $inherited_vars = $this-> getFormattedInheritedVars($element); 4088 if (!empty($inherited_vars)) 4089 { 4090 $this-> class_data-> assign("ivars" ,$inherited_vars); 4091 } else 4092 { 4093 $this-> class_data-> assign("ivars" ,false); 4094 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1014 of 1382

4095 $inherited_consts = $this-> getFormattedInheritedConsts($element); 4096 if (!empty($inherited_consts)) 4097 { 4098 $this-> class_data-> assign("iconsts" ,$inherited_consts); 4099 } else 4100 { 4101 $this-> class_data-> assign("iconsts" ,false); 4102 } 4103 } 4104 4105 4106 /** 4107 * Converts method for template output 4108 * 4109 * This function must be called by a child converter with any extra 4110 * template variables needed in the parameter $addition 4111 * @param parserMethod 4112 */ 4113 function convertMethod(& $element, $additions = array()) 4114 { 4115 $fname = $element-> getName(); 4116 $docblock = $this-> prepareDocBlock($element); 4117 $returntype = 'void'; 4118 if ($element-> isConstructor) $returntype = $element-> class; 4119 if ($element-> docblock-> return) 4120 { 4121 $a = $element-> docblock-> return-> Convert($this); 4122 $returntype = $element-> docblock-> return-> converted_returnType; 4123 } 4124 $params = $param_i = array(); 4125 if (count($element-> docblock-> params)) 4126 foreach($element-> docblock-> params as $param => $val) 4127 { 4128 $a = $val-> Convert($this); 4129 $params[] = $param_i[$param] = array("var" => $param,"datatype" => $val-> converted_returnType,"data" => $a); 4130 } 4131 4132 if ($element-> docblock-> hasaccess) { 4133 $acc = $docblock['access']; 4134 } else { 4135 $acc = 'public'; 4136 } 4137 4138 if ($this-> hasSourceCode($element-> getPath())) 4139 $additions["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4140 $this-> class_data-> append('methods',array_merge( 4141 array('sdesc' => $docblock['sdesc'], 4142 'desc' => $docblock['desc'], 4143 'static' => $docblock['static'], 4144 'abstract' => $docblock['abstract'], 4145 'tags' => $docblock['tags'], 4146 'api_tags' => $docblock['api_tags'], 4147 'see_tags' => $docblock['see_tags'], 4148 'info_tags_sorted' => $docblock['info_tags_sorted'], 4149 'info_tags' => $docblock['info_tags'], 4150 'utags' => $docblock['utags'], 4151 'constructor' => $element> isConstructor, 4152 'access' => $acc, 4153 'function_name' => $fname, 4154 'function_return' => $returntype, 4155 'function_call' => $element> getFunctionCall(), 4156 'ifunction_call' => $element> getIntricateFunctionCall($this, $param_i), 4157 'descmethod' => $this> getFormattedDescMethods($element), 4158 'method_overrides' => $this> getFormattedOverrides($element), 4159 'method_implements' => $this> getFormattedMethodImplements($element), 4160 'line_number' => $element> getLineNumber(), 4161 'id' => $this-> getId($element), 4162 'params' => $params), 4163 $additions)); 4164 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1015 of 1382

4165 4166 /** 4167 * Converts class variables for template output. 4168 * 4169 * This function must be called by a child converter with any extra 4170 * template variables needed in the parameter $addition 4171 * @param parserVar 4172 */ 4173 function convertVar(& $element, $additions = array()) 4174 { 4175 $docblock = $this-> prepareDocBlock($element); 4176 $b = 'mixed'; 4177 4178 if ($element-> docblock-> hasaccess) 4179 $acc = $element-> docblock-> tags['access'][0]-> value; 4180 else 4181 $acc = 'public'; 4182 4183 if ($element-> docblock-> var) 4184 { 4185 $b = $element-> docblock-> var-> converted_returnType; 4186 } 4187 if ($this-> hasSourceCode($element-> getPath())) 4188 $additions["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4189 $this-> class_data-> append('vars',array_merge( 4190 array('sdesc' => $docblock['sdesc'], 4191 'desc' => $docblock['desc'], 4192 'static' => $docblock['static'], 4193 'abstract' => $docblock['abstract'], 4194 'utags' => $docblock['utags'], 4195 'tags' => $docblock['tags'], 4196 'api_tags' => $docblock['api_tags'], 4197 'info_tags' => $docblock['info_tags'], 4198 'var_name' => $element-> getName(), 4199 'has_default' => strlen($element> getValue()), 4200 'var_default' => $this> postProcess($element-> getValue()), 4201 'var_type' => $b, 4202 'access' => $acc, 4203 'line_number' => $element> getLineNumber(), 4204 'descvar' => $this> getFormattedDescVars($element), 4205 'var_overrides' => $this> getFormattedOverrides($element), 4206 'id' => $this-> getId($element)), 4207 $additions)); 4208 } 4209 4210 /** 4211 * Converts class constants for template output. 4212 * 4213 * This function must be called by a child converter with any extra 4214 * template variables needed in the parameter $addition 4215 * @param parserConst 4216 */ 4217 function convertConst(& $element, $additions = array()) 4218 { 4219 $docblock = $this-> prepareDocBlock($element); 4220 4221 if ($element-> docblock-> hasaccess) 4222 $acc = $element-> docblock-> tags['access'][0]-> value; 4223 else 4224 $acc = 'public'; 4225 4226 if ($this-> hasSourceCode($element-> getPath())) 4227 $additions["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4228 $this-> class_data-> append('consts',array_merge( 4229 array('sdesc' => $docblock['sdesc'], 4230 'desc' => $docblock['desc'], 4231 'access' => $docblock['access'], 4232 'abstract' => $docblock['abstract'], 4233 'utags' => $docblock['utags'], 4234 'tags' => $docblock['tags'], 4235 'api_tags' => $docblock['api_tags'], 4236 'info_tags' => $docblock['info_tags'], 4237 'const_name' => $element-> getName(),

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1016 of 1382

4238 'const_value' => $this> postProcess($element-> getValue()), 4239 'access' => $acc, 4240 'line_number' => $element> getLineNumber(), 4241 'id' => $this-> getId($element)), 4242 $additions)); 4243 } 4244 4245 /** 4246 * Default Page Handler 4247 * 4248 * {@internal In addition to setting up the smarty template with {@link newSmarty()}, 4249 * this class uses {@link getSourceLocation()} and {@link getClassesOnPage()} 4250 * to set template variables. Also used is {@link getPageName()}, to get 4251 * a Converter-specific name for the page.}}} 4252 * @param parserPage 4253 */ 4254 function convertPage(& $element) 4255 { 4256 $this-> page_data = & $this-> newSmarty(true); 4257 $this-> page = $this-> getPageName($element-> parent); 4258 $this-> path = $element-> parent-> getPath(); 4259 $this-> curpage = & $element-> parent; 4260 $this-> page_data-> assign("source_location" ,$element-> parent> getSourceLocation($this)); 4261 $this-> page_data-> assign("functions" ,array()); 4262 $this-> page_data-> assign("includes" ,array()); 4263 $this-> page_data-> assign("defines" ,array()); 4264 $this-> page_data-> assign("globals" ,array()); 4265 $this-> page_data-> assign("classes" ,$this> getClassesOnPage($element)); 4266 $this-> page_data-> assign("hasclasses" ,$element-> hasClasses()); 4267 $this-> page_data-> assign("hasinterfaces" ,$element-> hasInterfaces()); 4268 $this-> page_data-> assign("name" , $element-> parent-> getFile()); 4269 if ($t = $element-> getTutorial()) 4270 { 4271 $this-> page_data-> assign("tutorial" ,$this-> returnSee($t)); 4272 } else 4273 { 4274 $this-> page_data-> assign("tutorial" ,false); 4275 } 4276 if ($element-> docblock) 4277 { 4278 $docblock = $this-> prepareDocBlock($element, false); 4279 $this-> page_data-> assign("sdesc" ,$docblock['sdesc']); 4280 $this-> page_data-> assign("desc" ,$docblock['desc']); 4281 $this-> page_data-> assign("tags" ,$docblock['tags']); 4282 $this-> page_data-> assign("api_tags" ,$docblock['api_tags']); 4283 $this-> page_data-> assign("info_tags" ,$docblock['info_tags']); 4284 $this-> page_data-> assign("utags" ,$docblock['utags']); 4285 } 4286 } 4287 4288 /** 4289 * Converts global variables for template output 4290 * 4291 * This function must be called by a child converter with any extra 4292 * template variables needed in the parameter $addition 4293 * {@internal 4294 * In addition to using {@link prepareDocBlock()}, this method also 4295 * uses utility functions {@link getGlobalValue(), getFormattedConflicts()}}}} 4296 * @param parserGlobal 4297 * @uses postProcess() on global_value template value, makes it displayable 4298 * @param array any additional template variables should be in this array 4299 */ 4300 function convertGlobal(& $element, $addition = array()) 4301 { 4302 $docblock = $this-> prepareDocBlock($element); 4303 $value = $this-> getGlobalValue($element-> getValue()); 4304 if ($this-> hasSourceCode($element-> getPath())) 4305 $addition["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4306 $this-> page_data-> append('globals',array_merge( 4307 array('sdesc' => $docblock['sdesc'], 4308 'desc' => $docblock['desc'], 4309 'tags' => $docblock['tags'], 4310 'api_tags' => $docblock['api_tags'], 4311 'info_tags' => $docblock['info_tags'], 4312 'utags' => $docblock['utags'],

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1017 of 1382

4313 'global_name' => $element> getName(), 4314 'global_type' => $element> getDataType($this), 4315 'global_value' => $value, 4316 'line_number' => $element> getLineNumber(), 4317 'global_conflicts' => $this> getFormattedConflicts($element,"global variables" ), 4318 'id' => $this-> getId($element)), 4319 $addition)); 4320 } 4321 4322 /** 4323 * Converts defines for template output 4324 * 4325 * This function must be called by a child converter with any extra 4326 * template variables needed in the parameter $addition 4327 * {@internal 4328 * In addition to using {@link prepareDocBlock()}, this method also 4329 * uses utility functions {@link getGlobalValue(), getFormattedConflicts()}}}} 4330 * @param parserDefine 4331 * @uses postProcess() on define_value template value, makes it displayable 4332 * @param array any additional template variables should be in this array 4333 */ 4334 function convertDefine(& $element, $addition = array()) 4335 { 4336 $docblock = $this-> prepareDocBlock($element); 4337 if ($this-> hasSourceCode($element-> getPath())) 4338 $addition["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4339 $this-> page_data-> append('defines',array_merge( 4340 array('sdesc' => $docblock['sdesc'], 4341 'desc' => $docblock['desc'], 4342 'tags' => $docblock['tags'], 4343 'api_tags' => $docblock['api_tags'], 4344 'info_tags' => $docblock['info_tags'], 4345 'utags' => $docblock['utags'], 4346 'define_name' => $element> getName(), 4347 'line_number' => $element> getLineNumber(), 4348 'define_value' => $this> postProcess($element-> getValue()), 4349 'define_conflicts' => $this> getFormattedConflicts($element,"defines" ), 4350 'id' => $this-> getId($element)), 4351 $addition)); 4352 } 4353 4354 4355 /** 4356 * Converts includes for template output 4357 * 4358 * This function must be called by a child converter with any extra 4359 * template variables needed in the parameter $addition 4360 * @see prepareDocBlock() 4361 * @param parserInclude 4362 */ 4363 function convertInclude(& $element, $addition = array()) 4364 { 4365 $docblock = $this-> prepareDocBlock($element); 4366 $per = $this-> getIncludeValue($element-> getValue(), $element-> getPath()); 4367 4368 if ($this-> hasSourceCode($element-> getPath())) 4369 $addition["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4370 $this-> page_data-> append('includes',array_merge( 4371 array('sdesc' => $docblock['sdesc'], 4372 'desc' => $docblock['desc'], 4373 'tags' => $docblock['tags'], 4374 'api_tags' => $docblock['api_tags'], 4375 'info_tags' => $docblock['info_tags'], 4376 'utags' => $docblock['utags'], 4377 'include_name' => $element> getName(), 4378 'line_number' => $element> getLineNumber(), 4379 'include_value' => $per), 4380 $addition));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1018 of 1382

4381 } 4382 4383 /** 4384 * Converts function for template output 4385 * 4386 * This function must be called by a child converter with any extra 4387 * template variables needed in the parameter $addition 4388 * @see prepareDocBlock() 4389 * @param parserFunction 4390 */ 4391 function convertFunction(& $element, $addition = array()) 4392 { 4393 $docblock = $this-> prepareDocBlock($element); 4394 $fname = $element-> getName(); 4395 $params = $param_i = array(); 4396 if (count($element-> docblock-> params)) 4397 foreach($element-> docblock-> params as $param => $val) 4398 { 4399 $a = $val-> Convert($this); 4400 $params[] = $param_i[$param] = array("var" => $param,"datatype" => $val-> converted_returnType,"data" => $a); 4401 } 4402 $returntype = 'void'; 4403 if ($element-> docblock-> return) 4404 { 4405 $a = $element-> docblock-> return-> Convert($this); 4406 $returntype = $element-> docblock-> return-> converted_returnType; 4407 } 4408 4409 if ($this-> hasSourceCode($element-> getPath())) 4410 $addition["slink" ] = $this-> getSourceAnchor($element> getPath(),$element-> getLineNumber(),$element-> getLineNumber(),true); 4411 $this-> page_data-> append('functions',array_merge( 4412 array('sdesc' => $docblock['sdesc'], 4413 'desc' => $docblock['desc'], 4414 'tags' => $docblock['tags'], 4415 'api_tags' => $docblock['api_tags'], 4416 'info_tags' => $docblock['info_tags'], 4417 'utags' => $docblock['utags'], 4418 'function_name' => $fname, 4419 'function_return' => $returntype, 4420 'function_conflicts' => $this> getFormattedConflicts($element,"functions" ), 4421 'ifunction_call' => $element> getIntricateFunctionCall($this, $param_i), 4422 'function_call' => $element> getFunctionCall(), 4423 'line_number' => $element> getLineNumber(), 4424 'id' => $this-> getId($element), 4425 'params' => $params), 4426 $addition)); 4427 } 4428 /**#@-*/ 4429 4430 /** 4431 * convert the element's DocBlock for output 4432 * 4433 * This function converts all tags and descriptions for output 4434 * @param mixed any descendant of {@link parserElement}, or {@link parserData} 4435 * @param array used to translate tagnames into other tags 4436 * @param boolean set to false for pages and classes, the only elements allowed to specify @package 4437 * @return array 4438 * 4439 * Format: 4440 * <pre> 4441 * array('sdesc' => DocBlock summary 4442 * 'desc' => DocBlock detailed description 4443 * 'tags' => array('keyword' => tagname, 'data' => tag description) 4444 * known tags 4445 * 'api_tags' => array('keyword' => tagname, 'data' => tag description) 4446 * known api documentation tags 4447 * 'info_tags' => array('keyword' => tagname, 'data' => tag description) 4448 * known informational tags 4449 * [ 'utags' => array('keyword' => tagname, 'data' => tag description 4450 * unknown tags ] 4451 * [ 'vartype' => type from @var/@return tag ] 4452 * [ 'var_descrip' => description from @var/@return tag ] 4453 * )

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1019 of 1382

4454 * </pre> 4455 */ 4456 function prepareDocBlock(& $element, $names = array(),$nopackage = true) 4457 { 4458 $tagses = $element-> docblock-> listTags(); 4459 $tags = $ret = $api_tags = $info_tags = array(); 4460 $api_tags_arr = array("abstract" , "access" , "deprecated" , "example" , "filesource" , 4461 "global" , "internal" , "name" , "return" , "see" , 4462 "property" , "property-read" , "propertywrite" , "method" , 4463 "staticvar" , "usedby" , "uses" , "var" ); 4464 if (!$nopackage) 4465 { 4466 $tags[] = array('keyword' => 'package','data' => $element-> docblock> package); 4467 if (!empty($element-> docblock-> subpackage)) $tags[] = array('keyword' => 'subpackage','data' => $element-> docblock-> subpackage); 4468 } 4469 if ($element-> docblock-> var) 4470 { 4471 $a = $element-> docblock-> var-> Convert($this); 4472 $ret['vartype'] = $element-> docblock-> var-> converted_returnType; 4473 if (!empty($a)) 4474 { 4475 $tags[] = array('keyword' => 'var', 'data' => $a); 4476 $ret["var_descrip" ] = $a; 4477 } 4478 } 4479 if ($element-> docblock-> return) 4480 { 4481 $a = $element-> docblock-> return-> Convert($this); 4482 $ret['vartype'] = $element-> docblock-> return-> converted_returnType; 4483 if (!empty($a)) 4484 { 4485 $tags[] = $api_tags[] = array('keyword' => 'return', 'data' => $a); 4486 $ret["var_descrip" ] = $a; 4487 } 4488 } 4489 if ($element-> docblock-> funcglobals) 4490 foreach($element-> docblock-> funcglobals as $global => $val) 4491 { 4492 if ($a = $this-> getGlobalLink($global,$element-> docblock-> package)) 4493 { 4494 $global = $a; 4495 } 4496 $b = Converter::getLink($val[0]); 4497 if (is_object($b) && phpDocumentor_get_class($b) == 'classlink') 4498 { 4499 $val[0] = $this-> returnSee($b); 4500 } 4501 $tags[] = $api_tags[] = array('keyword' => 'global','data' => $val[0].' '.$global.': '.$val[1]-> Convert($this)); 4502 } 4503 if ($element-> docblock-> statics) 4504 foreach($element-> docblock-> statics as $static => $val) 4505 { 4506 $a = $val-> Convert($this); 4507 $tags[] = $api_tags[] = array('keyword' => 'staticvar','data' => $val> converted_returnType.' '.$static.': '.$a); 4508 } 4509 $property_tags = array(); 4510 foreach ( $element-> docblock-> properties as $prop_name => $val ) 4511 { 4512 $a = $val-> Convert( $this ); 4513 if ( !empty( $a ) ) 4514 { 4515 $tags[] = $api_tags[] = array( 'keyword' => $val-> keyword , 4516 'data' => $val-> converted_returnType . ' ' . $prop_name . ': ' . $a ); 4517 $prop['prop_name'] = $prop_name; 4518 $prop['access'] = $val-> keyword == 'property-read' ? 'read' : 4519 ( $val-> keyword == 'property-write' ? 'write' : 'read/write' ); 4520 $prop['prop_type'] = $val-> converted_returnType; 4521 $prop['sdesc'] = $a; 4522 $property_tags[ $prop_name ] = $prop; 4523 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1020 of 1382

4524 } 4525 ksort( $property_tags, SORT_STRING ); 4526 $property_tags = array_values( $property_tags ); 4527 $info_tags_sorted = array(); 4528 $ret['static'] = false; 4529 foreach($tagses as $tag) 4530 { 4531 if (isset($names[$tag-> keyword])) $tag-> keyword = $names[$tag-> keyword]; 4532 if ($tag-> keyword == 'static') { 4533 $ret['static'] = true; 4534 continue; 4535 } 4536 if ($tag-> keyword) 4537 $tags[] = array("keyword" => $tag-> keyword,"data" => $tag-> Convert($this)); 4538 if (in_array($tag-> keyword, $api_tags_arr)) { 4539 $api_tags[] = array("keyword" => $tag-> keyword,"data" => $tag-> Convert($this)); 4540 } else { 4541 $info_tags[] = array("keyword" => $tag> keyword,"data" => $tag-> Convert($this)); 4542 @list( $className, $desc ) = explode( " " , $tag-> Convert($this), 2 ); 4543 $info_tags_sorted[ $tag-> keyword ][] = array( 'keyword' => $className, 'data' => $desc ); 4544 } 4545 } 4546 $utags = array(); 4547 foreach($element-> docblock-> unknown_tags as $keyword => $tag) 4548 { 4549 foreach($tag as $t) 4550 $utags[] = array('keyword' => $keyword, 'data' => $t-> Convert($this)); 4551 } 4552 $ret['abstract'] = false; 4553 $ret['access'] = 'public'; 4554 $see_tags = array(); 4555 foreach($tags as $tag) 4556 { 4557 if ($tag['keyword'] == 'access') { 4558 $ret['access'] = $tag['data']; 4559 } 4560 if ($tag['keyword'] == 'abstract') { 4561 $ret['abstract'] = true; 4562 } 4563 if ($tag['keyword'] == 'see' || $tag['keyword'] == 'uses' || 4564 $tag['keyword'] == 'usedby') { 4565 $see_tags[] = $tag['data']; 4566 } 4567 } 4568 $ret['sdesc'] = $element-> docblock-> getSDesc($this); 4569 $ret['desc'] = $element-> docblock-> getDesc($this); 4570 $ret['tags'] = $tags; 4571 $ret['see_tags'] = $see_tags; 4572 $ret['info_tags_sorted'] = $info_tags_sorted; 4573 $ret['api_tags'] = $api_tags; 4574 $ret['info_tags'] = $info_tags; 4575 $ret['utags'] = $utags; 4576 $ret['property_tags'] = $property_tags; 4577 return $ret; 4578 } 4579 4580 /** 4581 * gets a list of all classes declared on a procedural page represented by 4582 * $element, a {@link parserData} class 4583 * @param parserData &$element 4584 * @return array links to each classes documentation 4585 * 4586 * Format: 4587 * <pre> 4588 * array('name' => class name, 4589 * 'sdesc' => summary of the class 4590 * 'link' => link to the class's documentation) 4591 * </pre> 4592 */ 4593 function getClassesOnPage(& $element) 4594 { 4595 global $_phpDocumentor_setting; 4596 $a = $element-> getClasses($this); 4597 $classes = array(); 4598 foreach($a as $package => $clas)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1021 of 1382

4599 { 4600 if (!empty($_phpDocumentor_setting['packageoutput'])) 4601 { 4602 $packages = explode(',',$_phpDocumentor_setting['packageoutput']); 4603 if (!in_array($package, $packages)) continue; 4604 } 4605 for($i=0; $i< count($clas); $i++) 4606 { 4607 if ($this-> parseprivate || ! ($clas[$i]-> docblock && $clas[$i]> docblock-> hasaccess && $clas[$i]-> docblock-> tags['access'][0]-> value == 'private')) 4608 { 4609 $sdesc = ''; 4610 $r = array(); 4611 $sdesc = $clas[$i]-> docblock-> getSDesc($this); 4612 if ($clas[$i]-> docblock-> hasaccess) 4613 $r['access'] = $clas[$i]-> docblock> tags['access'][0]-> value; 4614 else 4615 $r['access'] = 'public'; 4616 if (isset ($clas[$i]-> docblock-> tags['abstract'])) 4617 $r['abstract'] = TRUE; 4618 else 4619 $r['abstract'] = FALSE; 4620 $r['name'] = $clas[$i]-> getName(); 4621 $r['sdesc'] = $sdesc; 4622 $r['link'] = $this-> getClassLink($clas[$i]> getName(),$package,$clas[$i]-> getPath()); 4623 $classes[] = $r; 4624 } 4625 } 4626 } 4627 return $classes; 4628 } 4629 4630 /** 4631 * returns an array containing the class inheritance tree from the root 4632 * object to the class. 4633 * 4634 * This method must be overridden, or phpDocumentor will halt with a fatal 4635 * error 4636 * @return string Converter-specific class tree for an individual class 4637 * @param parserClass class variable 4638 * @abstract 4639 */ 4640 4641 function generateFormattedClassTree($class) 4642 { 4643 addErrorDie(PDERROR_CONVERTER_OVR_GFCT,phpDocumentor_get_class($this)); 4644 } 4645 4646 /** 4647 * returns an array containing the class inheritance tree from the root 4648 * object to the class. 4649 * 4650 * This method must be overridden, or phpDocumentor will halt with a fatal 4651 * error 4652 * @return string Converter-specific class tree for an individual class 4653 * @param parserClass class variable 4654 * @abstract 4655 */ 4656 4657 function getFormattedImplements($el) 4658 { 4659 $ret = array(); 4660 foreach ($el-> getImplements() as $interface) 4661 { 4662 $link = $this-> getLink($interface); 4663 if ($link && is_object($link)) { 4664 $ret[] = $this-> returnSee($link); 4665 } else { 4666 if (class_exists('ReflectionClass')) { 4667 if (interface_exists($interface)) { 4668 $inter = new ReflectionClass($interface); 4669 if ($inter-> isInternal()) { 4670 $ret[] = $interface . ' (internal interface)'; 4671 } else { 4672 $ret[] = $interface; 4673 } 4674 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1022 of 1382

4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754

} else { $ret[] = $interface; } } } return $ret; } /** * @param mixed {@link parserClass, parserFunction, parserDefine} or * {@link parserGlobal} * @param string type to display. either 'class','function','define' * or 'global variable' * @return array links to conflicting elements, or empty array * @uses parserClass::getConflicts() * @uses parserFunction::getConflicts() * @uses parserDefine::getConflicts() * @uses parserGlobal::getConflicts() */ function getFormattedConflicts(& $element,$type) { $conflicts = $element-> getConflicts($this); $r = array(); if (!$conflicts) return false; foreach($conflicts as $package => $class) { $r[] = $class-> getLink($this,$class-> docblock-> package); } if (!empty($r)) $r = array('conflicttype' => $type, 'conflicts' => return $r; } /** * Get a list of methods in child classes that override this method * @return array empty array or array(array('link'=>link to method, * 'sdesc'=>short description of the method),...) * @uses parserMethod::getOverridingMethods() * @param parserMethod */ function getFormattedDescMethods(& $element) { $meths = $element-> getOverridingMethods($this); $r = array(); for($i=0; $i< count($meths); $i++) { $ms = array(); $ms['link'] = $meths[$i]-> getLink($this); $ms['sdesc'] = $meths[$i]-> docblock-> getSDesc($this); $r[] = $ms; } return $r; } /** * Get a list of vars in child classes that override this var * @return array empty array or array('link'=>link to var, * 'sdesc'=>short description of the method * @uses parserVar::getOverridingVars() * @param parserVar */ function getFormattedDescVars(& $element) { $vars = $element-> getOverridingVars($this); $r = array(); for($i=0; $i< count($vars); $i++) { $vs = array(); $vs['link'] = $vars[$i]-> getLink($this); $vs['sdesc'] = $vars[$i]-> docblock-> getSDesc($this); $r[] = $vs; } return $r; } /** * Get the method this method overrides, if any * @return array|falsearray('link'=>link to overridden method, * 'sdesc'=>short description * @see parserMethod::getOverrides() * @param parserMethod

$r);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1023 of 1382

4755 */ 4756 function getFormattedOverrides(& $element) 4757 { 4758 $ovr = $element-> getOverrides($this); 4759 if (!$ovr) return false; 4760 $sdesc = $ovr-> docblock-> getSDesc($this); 4761 $name = method_exists($ovr, 'getFunctionCall') ? $ovr-> getFunctionCall() : $ovr> getName(); 4762 $link = ($link = $ovr-> getLink($this)) ? $link : $ovr-> getClass() . '::' . $name; 4763 return array('link' => $link,'sdesc' => $sdesc); 4764 } 4765 4766 /** 4767 * Get the method this method(s) implemented from an interface, if any 4768 * @return array|falsearray('link'=>link to implemented method, 4769 * 'sdesc'=>short description 4770 * @uses parserMethod::getImplements() 4771 * @param parserMethod 4772 */ 4773 function getFormattedMethodImplements(& $element) 4774 { 4775 $ovr = $element-> getImplements($this); 4776 if (!$ovr) return false; 4777 $ret = array(); 4778 foreach ($ovr as $impl) { 4779 $sdesc = $impl-> docblock-> getSDesc($this); 4780 $name = $impl-> getName(); 4781 $link = ($link = $impl-> getLink($this)) ? $link : $impl-> getClass() . '::' . $name; 4782 $ret[] = array('link' => $link,'sdesc' => $sdesc); 4783 } 4784 return $ret; 4785 } 4786 4787 /** 4788 * returns a list of child classes 4789 * 4790 * @param parserClass class variable 4791 * @uses parserClass::getChildClassList() 4792 */ 4793 4794 function generateChildClassList($class) 4795 { 4796 $kids = $class-> getChildClassList($this); 4797 $list = array(); 4798 if (count($kids)) 4799 { 4800 for($i=0; $i< count($kids); $i++) 4801 { 4802 $lt['link'] = $kids[$i]-> getLink($this); 4803 $lt['sdesc'] = $kids[$i]-> docblock-> getSDesc($this); 4804 4805 if ($kids[$i]-> docblock-> hasaccess) 4806 $lt['access'] = $kids[$i]-> docblock> tags['access'][0]-> value; 4807 else 4808 $lt['access'] = 'public'; 4809 4810 $lt['abstract'] = isset ($kids[$i]-> docblock> tags['abstract'][0]); 4811 4812 $list[] = $lt; 4813 } 4814 } else return false; 4815 return $list; 4816 } 4817 4818 /** 4819 * Return template-enabled list of inherited variables 4820 * 4821 * uses parserVar helper function getInheritedVars and generates a 4822 * template-enabled list using getClassLink() 4823 * @param parserVar $child class var 4824 * @see getClassLink(), parserVar::getInheritedVars() 4825 * @return array Format: 4826 * <pre> 4827 * array( 4828 * array('parent_class' => link to parent class's documentation, 4829 * 'ivars' => 4830 * array(

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1024 of 1382

4831 * array('name' => inherited variable name, 4832 * 'link' => link to inherited variable's documentation, 4833 * 'default' => default value of inherited variable, 4834 * 'sdesc' => summary of inherited variable), 4835 * ...), 4836 * ...) 4837 * </pre> 4838 */ 4839 4840 function getFormattedInheritedVars($child) 4841 { 4842 $package = $child-> docblock-> package; 4843 $subpackage = $child-> docblock-> subpackage; 4844 $ivars = $child-> getInheritedVars($this); 4845 $results = array(); 4846 if (!count($ivars)) return $results; 4847 foreach($ivars as $parent => $vars) 4848 { 4849 $file = $vars['file']; 4850 $vars = $vars['vars']; 4851 $par = $this-> classes-> getClass($parent,$file); 4852 if ($par) { 4853 $package = $par-> docblock-> package; 4854 } 4855 usort($vars,array($this,"sortVar" )); 4856 $result['parent_class'] = $this-> getClassLink($parent, $package); 4857 if (!$result['parent_class']) { 4858 $result['parent_class'] = $parent . ' (Internal Class)'; 4859 } 4860 foreach($vars as $var) 4861 { 4862 $info = array(); 4863 4864 if ($var-> docblock-> hasaccess) { 4865 $info['access'] = $var-> docblock-> tags['access'][0]-> value; 4866 } else { 4867 $info['access'] = 'public'; 4868 } 4869 4870 $info['abstract'] = isset ($var-> docblock-> tags['abstract'][0]); 4871 4872 $info['name'] = $var-> getName(); 4873 $info['link'] = $var-> getLink($this); 4874 if (!$info['link']) { 4875 $info['link'] = $info['name']; 4876 } 4877 $info['default'] = $this-> postProcess($var-> getValue()); 4878 if ($var-> docblock) 4879 $info['sdesc'] = $var-> docblock-> getSDesc($this); 4880 $result["ivars" ][] = $info; 4881 } 4882 $results[] = $result; 4883 $result = array(); 4884 } 4885 return $results; 4886 } 4887 4888 /** 4889 * Return template-enabled list of inherited methods 4890 * 4891 * uses parserMethod helper function getInheritedMethods and generates a 4892 * template-enabled list using getClassLink() 4893 * @param parserMethod $child class method 4894 * @see getClassLink(), parserMethod::getInheritedMethods() 4895 * @return array Format: 4896 * <pre> 4897 * array( 4898 * array('parent_class' => link to parent class's documentation, 4899 * 'ivars' => 4900 * array( 4901 * array('name' => inherited variable name, 4902 * 'link' => link to inherited variable's documentation, 4903 * 'function_call' => {@link parserMethod::getIntricateFunctionCall()} 4904 * returned array, 4905 * 'sdesc' => summary of inherited variable), 4906 * ...), 4907 * ...) 4908 * </pre> 4909 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1025 of 1382

4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 => 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988

function getFormattedInheritedMethods($child) { $package = $child-> docblock-> package; $subpackage = $child-> docblock-> subpackage; $imethods = $child-> getInheritedMethods($this); $results = array(); if (!count($imethods)) return $results; foreach($imethods as $parent => $methods) { $file = $methods['file']; $methods = $methods['methods']; $par = $this-> classes-> getClass($parent,$file); if ($par) { $package = $par-> docblock-> package; } usort($methods,array($this,"sortMethod" )); $result['parent_class'] = $this-> getClassLink($parent,$package); if (!$result['parent_class']) { $result['parent_class'] = $parent . ' (Internal Class)'; } foreach($methods as $method) { $info = array(); if ($method-> docblock-> hasaccess) { $info['access'] = $method-> docblock-> tags['access'][0]-> value; } else { $info['access'] = 'public'; } $info['abstract'] = isset ($method-> docblock-> tags['abstract'][0]); if ($method-> isConstructor) $info['constructor'] = 1; $returntype = 'void'; if ($method-> isConstructor) { $returntype = $method-> getClass(); } if ($method-> docblock-> return) { $a = $method-> docblock-> return-> Convert($this); $returntype = $method-> docblock-> return-> converted_returnType; } $info['function_return'] = $returntype; $info['static'] = isset ($method-> docblock-> tags['static'][0]); $info['link'] = $method-> getLink($this); if (!$info['link']) { $info['link'] = $method-> getFunctionCall(); } $info['name'] = $method-> getName(); if ($method-> docblock) $info['sdesc'] = $method-> docblock-> getSDesc($this); $params = array(); if (count($method-> docblock-> params)) foreach($method-> docblock-> params as $param => $val) { $a = $val-> Convert($this); $params[$param] = array("var" => $param,"datatype" converted_returnType,"data" => $a); } $info['function_call'] = $method-> getIntricateFunctionCall($this,$params); $result["imethods" ][] = $info; } $results[] = $result; $result = array(); } return $results; } /** * Return template-enabled list of inherited class constants * * uses parserConst helper function getInheritedConsts and generates a * template-enabled list using getClassLink() * @param parserConst $child class constant * @see getClassLink(), parserMethod::getInheritedConsts() * @return array Format: * <pre> * array( * array('parent_class' => link to parent class's documentation, * 'ivars' =>

$val->

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1026 of 1382

4989 * array( 4990 * array('name' => inherited constant name, 4991 * 'link' => link to inherited constant's documentation, 4992 * 'value' => constant value, 4993 * 'sdesc' => summary of inherited constant), 4994 * ...), 4995 * ...) 4996 * </pre> 4997 */ 4998 4999 function getFormattedInheritedConsts($child) 5000 { 5001 $package = $child-> docblock-> package; 5002 $subpackage = $child-> docblock-> subpackage; 5003 $ivars = $child-> getInheritedConsts($this); 5004 $results = array(); 5005 if (!count($ivars)) return $results; 5006 foreach($ivars as $parent => $vars) 5007 { 5008 $file = $vars['file']; 5009 $vars = $vars['consts']; 5010 $par = $this-> classes-> getClass($parent,$file); 5011 if ($par) { 5012 $package = $par-> docblock-> package; 5013 } 5014 usort($vars,array($this,"sortVar" )); 5015 $result['parent_class'] = $this-> getClassLink($parent,$package); 5016 if (!$result['parent_class']) { 5017 $result['parent_class'] = $parent . ' (Internal Class)'; 5018 } 5019 foreach($vars as $var) 5020 { 5021 $info = array(); 5022 5023 if ($var-> docblock-> hasaccess) { 5024 $info['access'] = $var-> docblock-> tags['access'][0]-> value; 5025 } else { 5026 $info['access'] = 'public'; 5027 } 5028 $info['name'] = $var-> getName(); 5029 $info['link'] = $var-> getLink($this); 5030 if (!$info['link']) { 5031 $info['link'] = $info['name'] . ' = ' . $var-> getValue(); 5032 } 5033 $info['value'] = $this-> postProcess($var-> getValue()); 5034 if ($var-> docblock) 5035 $info['sdesc'] = $var-> docblock-> getSDesc($this); 5036 $result["iconsts" ][] = $info; 5037 } 5038 $results[] = $result; 5039 $result = array(); 5040 } 5041 return $results; 5042 } 5043 5044 /** 5045 * Return a Smarty template object to operate with 5046 * 5047 * This returns a Smarty template with pre-initialized variables for use. 5048 * If the method "SmartyInit()" exists, it is called. 5049 * @return Smarty 5050 */ 5051 function & newSmarty() 5052 { 5053 $templ = new Smarty; 5054 $templ-> use_sub_dirs = false; 5055 $templ-> template_dir = realpath($this-> smarty_dir . PATH_DELIMITER . 'templates'); 5056 $templatename = get_class($this) . $this-> templateName; 5057 if (!file_exists($this-> targetDir . DIRECTORY_SEPARATOR . md5($templatename))) { 5058 // we'll delete this on finishing conversion 5059 $this-> _compiledDir[$this-> targetDir . DIRECTORY_SEPARATOR . md5($templatename)] = 1; 5060 mkdir($this-> targetDir . DIRECTORY_SEPARATOR . md5($templatename),0775); 5061 } 5062 $templ-> compile_dir = realpath($this-> targetDir . PATH_DELIMITER . md5($templatename)); 5063 $templ-> config_dir = realpath($this-> smarty_dir . PATH_DELIMITER . 'configs'); 5064 $templ-> assign("date" ,date("r" ,time())); 5065 $templ-> assign("maintitle" ,$this-> title); 5066 $templ-> assign("package" ,$this-> package);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1027 of 1382

5067 $templ-> assign("phpdocversion" ,PHPDOCUMENTOR_VER); 5068 $templ-> assign("phpdocwebsite" ,PHPDOCUMENTOR_WEBSITE); 5069 $templ-> assign("subpackage" ,$this-> subpackage); 5070 if (method_exists($this,'SmartyInit')) return $this-> SmartyInit($templ); 5071 return $templ; 5072 } 5073 5074 /** 5075 * Finish up parsing/cleanup directories 5076 */ 5077 function cleanup() 5078 { 5079 foreach ($this-> _compiledDir as $dir => $one) { 5080 $this-> _rmdir($dir); 5081 } 5082 } 5083 5084 /** 5085 * Completely remove a directory and its contents 5086 * 5087 * @param string $directory 5088 */ 5089 function _rmdir($directory) 5090 { 5091 $handle = @opendir($directory); 5092 if ($handle) { 5093 while (false !== ($file = readdir($handle))) { 5094 if ($file == '.' || $file == '..') { 5095 continue; 5096 } 5097 if (is_dir($directory . DIRECTORY_SEPARATOR . $file)) { 5098 $this-> _rmdir($directory . DIRECTORY_SEPARATOR . $file); 5099 } 5100 @unlink($directory . DIRECTORY_SEPARATOR . $file); 5101 } 5102 closedir($handle); 5103 @rmdir($directory); 5104 } 5105 } 5106 5107 /** 5108 * do all necessary output 5109 * @see Converter 5110 * @abstract 5111 */ 5112 function Output($title) 5113 { 5114 phpDocumentor_out("WARNING: Generic Converter::Output was used, no output will be generated" ); 5115 } 5116 5117 /** 5118 * Set the template directory with a different template base directory 5119 * @tutorial phpDocumentor.howto.pkg#using.command-line.templatebase 5120 * @param string template base directory 5121 * @param string template name 5122 */ 5123 function setTemplateBase($base, $dir) 5124 { 5125 // remove trailing /'s from the base path, if any 5126 $base = str_replace('\\','/',$base); 5127 while ($base{strlen($base) - 1} == '/') $base = substr($base,0,strlen($base) - 1); 5128 $this-> templateName = substr($dir,0,strlen($dir) - 1); 5129 $this-> templateDir = $base . "/Converters/" . $this-> outputformat . "/" . $this-> name . "/templates/" . $dir; 5130 if (!is_dir($this-> templateDir)) 5131 { 5132 addErrorDie(PDERROR_TEMPLATEDIR_DOESNT_EXIST, $this-> templateDir); 5133 } 5134 5135 $this-> smarty_dir = $this-> templateDir; 5136 if (file_exists($this-> templateDir . PATH_DELIMITER . 'options.ini')) 5137 { 5138 // retrieve template options, allow array creation 5139 $this-> template_options = phpDocumentor_parse_ini_file($this-> templateDir . PATH_DELIMITER . 'options.ini',true); 5140 } 5141 } 5142 5143 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1028 of 1382

5144 * sets the template directory based on the {@link $outputformat} and {@link $name} 5145 * Also sets {@link $templateName} to the $dir parameter 5146 * @param string subdirectory 5147 */ 5148 function setTemplateDir($dir) 5149 { 5150 if ('@DATA-DIR@' != '@'.'DATA-DIR@') { 5151 $templateBase = str_replace('\\', '/', '@DATA-DIR@/PhpDocumentor/phpDocumentor'); 5152 } else { 5153 $templateBase = str_replace('\\','/',$GLOBALS['_phpDocumentor_install_dir']) . '/phpDocumentor'; 5154 } 5155 $this-> setTemplateBase($templateBase, $dir); 5156 } 5157 5158 /** 5159 * Get the absolute path to the converter's base directory 5160 * @return string 5161 */ 5162 function getConverterDir() 5163 { 5164 if ('@DATA-DIR@' != '@' . 'DATA-DIR@') { 5165 return str_replace('\\', '/', "@DATADIR@/PhpDocumentor/phpDocumentor/Converters/" ) . $this-> outputformat . "/" . $this> name; 5166 } else { 5167 return str_replace('\\','/',$GLOBALS['_phpDocumentor_install_dir']) ."/phpDocumentor/Converters/" . $this-> outputformat . "/" . $this-> name; 5168 } 5169 } 5170 5171 /** 5172 * Parse a global variable's default value for class initialization. 5173 * 5174 * If a global variable's default value is "new class" as in: 5175 * <code> 5176 * $globalvar = new Parser 5177 * </code> 5178 * This method will document it not as "new Parser" but instead as 5179 * "new {@link Parser}". For examples, see {@link phpdoc.inc}. 5180 * Many global variables are classes, and phpDocumentor links to their 5181 * documentation 5182 * @return string default global variable value with link to class if 5183 * it's "new Class" 5184 * @param string default value of a global variable. 5185 */ 5186 function getGlobalValue($value) 5187 { 5188 if (strpos($value,'new') === 0) 5189 { 5190 preg_match('/new([^(]*)((?:.|\r|\n)*)/',$value,$newval); 5191 if (isset($newval[1])) 5192 { 5193 $a = Converter::getLink(trim($newval[1])); 5194 if (!isset($newval[2])) $newval[2] = ''; 5195 if ($a && phpDocumentor_get_class($a) == 'classlink') $value = 'new '.$this-> returnSee($a) . 5196 $this-> postProcess($newval[2]); 5197 } 5198 return $value; 5199 } 5200 return $this-> postProcess($value); 5201 } 5202 5203 /** 5204 * Parse an include's file to see if it is a file documented in this project 5205 * 5206 * Although not very smart yet, this method will try to look for the 5207 * included file file.ext: 5208 * 5209 * <code> 5210 * include ("file.ext"); 5211 * </code> 5212 * 5213 * If it finds it, it will return a link to the file's documentation. As of 5214 * 1.2.0rc1, phpDocumentor is smarty enough to find these cases: 5215 * <ul> 5216 * <li>absolute path to file</li> 5217 * <li>./file.ext or ../file.ext</li> 5218 * <li>relpath/to/file.ext if relpath is a subdirectory of the base parse

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1029 of 1382

5219 * directory</li> 5220 * </ul> 5221 * For examples, see {@link Setup.inc.php} includes. 5222 * Every include auto-links to the documentation for the file that is included 5223 * @return string included file with link to docs for file, if found 5224 * @param string file included by include statement. 5225 * @param string path of file that has the include statement 5226 */ 5227 function getIncludeValue($value, $ipath) 5228 { 5229 preg_match('/"([^"\']*\.[^"\']*)"/' ,$value,$match); 5230 if (!isset($match[1])) 5231 preg_match('/\'([^"\']*\.[^"\']*)\'/' ,$value,$match); 5232 if (isset($match[1])) 5233 { 5234 $fancy_per = $this-> proceduralpages-> pathMatchesParsedFile($match[1],$ipath); 5235 if ($fancy_per) 5236 { 5237 $link = $this-> addLink($fancy_per); 5238 if (is_object($link) && phpDocumentor_get_class($link) == 'pagelink' && 5239 isset($this-> all_packages[$link-> package])) 5240 { 5241 $value = $this-> returnSee($link,$value); 5242 } 5243 } else 5244 { 5245 $per = Converter::getLink($match[1]); 5246 if (is_object($per) && phpDocumentor_get_class($per) == 'pagelink') 5247 $value = $this-> returnSee($per); 5248 } 5249 } 5250 return $value; 5251 } 5252 5253 /** 5254 * Recursively creates all subdirectories that don't exist in the $dir path 5255 * @param string $dir 5256 */ 5257 function createParentDir($dir) 5258 { 5259 if (empty($dir)) return; 5260 $tmp = explode(SMART_PATH_DELIMITER,$dir); 5261 array_pop($tmp); 5262 $parent = implode(SMART_PATH_DELIMITER,$tmp); 5263 if ($parent != '' && ! file_exists($parent)) 5264 { 5265 $test = @mkdir($parent,0775); 5266 if (!$test) 5267 { 5268 $this-> createParentDir($parent); 5269 $test = @mkdir($parent,0775); 5270 phpDocumentor_out(" Creating Parent Directory $parent\n" ); 5271 } else 5272 { 5273 phpDocumentor_out(" Creating Parent Directory $parent\n" ); 5274 } 5275 } 5276 } 5277 5278 /** 5279 * Sets the output directory for generated documentation 5280 * 5281 * As of 1.3.0RC6, this also sets the compiled templates directory inside 5282 * the target directory 5283 * @param string $dir the output directory 5284 */ 5285 function setTargetDir($dir) 5286 { 5287 if (strlen($dir) > 0) 5288 { 5289 $this-> targetDir = $dir; 5290 // if directory does exist create it, this should have more error checking in the future 5291 if (!file_exists($dir)) 5292 { 5293 $tmp = str_replace(array("/" ,"\\" ),SMART_PATH_DELIMITER,$dir); 5294 if (substr($tmp,-1) == SMART_PATH_DELIMITER) 5295 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1030 of 1382

5296 $tmp = substr($tmp,0,(strlen($tmp)-1)); 5297 } 5298 $this-> createParentDir($tmp); 5299 phpDocumentor_out(" Creating Directory $dir\n" ); 5300 mkdir($dir,0775); 5301 } elseif (!is_dir($dir)) 5302 { 5303 echo " Output path: '$dir' is not a directory\n" ; 5304 die(); 5305 } 5306 } else { 5307 echo "a target directory must be specified\n try phpdoc -h\n" ; 5308 die(); 5309 } 5310 } 5311 5312 /** 5313 * Writes a file to target dir 5314 * @param string 5315 * @param string 5316 * @param boolean true if the data is binary and not text 5317 */ 5318 function writeFile($file,$data,$binary = false) 5319 { 5320 if (!file_exists($this-> targetDir)) 5321 { 5322 mkdir($this-> targetDir,0775); 5323 } 5324 $string = ''; 5325 if ($binary) $string = 'binary file '; 5326 phpDocumentor_out(" Writing $string" .$this-> targetDir . PATH_DELIMITER . $file . "\n" ); 5327 flush(); 5328 $write = 'w'; 5329 if ($binary) $write = 'wb'; 5330 $fp = fopen($this-> targetDir . PATH_DELIMITER . $file,$write); 5331 set_file_buffer( $fp, 0 ); 5332 fwrite($fp,$data,strlen($data)); 5333 fclose($fp); 5334 } 5335 5336 /** 5337 * Copies a file from the template directory to the target directory 5338 * thanks to Robert Hoffmann for this fix 5339 * @param string 5340 */ 5341 function copyFile($file, $subdir = '') 5342 { 5343 if (!file_exists($this-> targetDir)) 5344 { 5345 mkdir($this-> targetDir,0775); 5346 } 5347 copy($this-> templateDir . $subdir . PATH_DELIMITER . $file, $this-> targetDir . PATH_DELIMITER . $file); 5348 } 5349 5350 /** 5351 * Return parserStringWithInlineTags::Convert() cache state 5352 * @see parserStringWithInlineTags::Convert() 5353 * @abstract 5354 */ 5355 function getState() 5356 { 5357 return true; 5358 } 5359 5360 /** 5361 * Compare parserStringWithInlineTags::Convert() cache state to $state 5362 * @param mixed 5363 * @see parserStringWithInlineTags::Convert() 5364 * @abstract 5365 */ 5366 function checkState($state) 5367 { 5368 return true; 5369 } 5370 5371 } 5372 5373 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1031 of 1382

5374 * @access private 5375 * @see Converter::getSortedClassTreeFromClass() 5376 */ 5377 function rootcmp($a, $b) 5378 { 5379 return strnatcasecmp($a['class'],$b['class']); 5380 } 5381 5382 /** 5383 * @access private 5384 * @global string used to make the first tutorials converted the default package tutorials 5385 */ 5386 function tutorialcmp($a, $b) 5387 { 5388 global $phpDocumentor_DefaultPackageName; 5389 if ($a == $phpDocumentor_DefaultPackageName) return -1; 5390 if ($b == $phpDocumentor_DefaultPackageName) return 1; 5391 return strnatcasecmp($a, $b); 5392 } 5393 5394 /** 5395 * smart htmlentities, doesn't entity the allowed tags list 5396 * Since version 1.1, this function uses htmlspecialchars instead of 5397 * htmlentities, for international support 5398 * This function has been replaced by functionality in {@link ParserDescCleanup.inc} 5399 * @param string $s 5400 * @return string browser-displayable page 5401 * @deprecated As of v1.2, No longer needed, as valid tags are parsed out of the source, 5402 * and everything else is {@link Converter::postProcess()} handled 5403 */ 5404 function adv_htmlentities($s) 5405 { 5406 return; 5407 global $phpDocumentor___html,$_phpDocumentor_html_allowed; 5408 $result = htmlspecialchars($s); 5409 $entities = array_flip(get_html_translation_table(HTML_SPECIALCHARS)); 5410 $result = strtr($result,$phpDocumentor___html); 5411 $matches = array(); 5412 preg_match_all('/(&lt;img.*&gt;)/U' ,$result,$matches); 5413 for($i=0;$i< count($matches[1]);$i++) 5414 { 5415 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5416 } 5417 preg_match_all('/(&lt;font.*&gt;)/U' ,$result,$matches); 5418 for($i=0;$i< count($matches[1]);$i++) 5419 { 5420 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5421 } 5422 preg_match_all('/(&lt;ol.*&gt;)/U' ,$result,$matches); 5423 for($i=0;$i< count($matches[1]);$i++) 5424 { 5425 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5426 } 5427 preg_match_all('/(&lt;ul.*&gt;)/U' ,$result,$matches); 5428 for($i=0;$i< count($matches[1]);$i++) 5429 { 5430 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5431 } 5432 preg_match_all('/(&lt;li.*&gt;)/U' ,$result,$matches); 5433 for($i=0;$i< count($matches[1]);$i++) 5434 { 5435 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5436 } 5437 preg_match_all('/(&lt;a .*&gt;)/U' ,$result,$matches); 5438 for($i=0;$i< count($matches[1]);$i++) 5439 { 5440 $result = str_replace($matches[1][$i],strtr($matches[1][$i],array_flip(get_html_translation_table(HTML_SPECIALCH ARS))),$result); 5441 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1032 of 1382

5442 return $result; 5443 } 5444 5445 /** 5446 * Used solely for setting up the @uses list 5447 * @package ignore 5448 * @ignore 5449 */ 5450 class __dummyConverter extends Converter 5451 { 5452 function setTemplateDir(){} 5453 function setTargetDir(){} 5454 function getPageName(& $element) 5455 { 5456 if (phpDocumentor_get_class($element) == 'parserpage') return '_'.$element> getName(); 5457 return '_'.$element-> parent-> getName(); 5458 } 5459 } 5460 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1033 of 1382

File Source for CHMdefaultConverter.inc


Documentation for this file is available at CHMdefaultConverter.inc
1 <?php 2 /** 3 * CHM (Compiled Help Manual) output converter for Smarty Template. 4 * 5 * phpDocumentor :: automatic documentation generator 6 * 7 * PHP versions 4 and 5 8 * 9 * Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver 10 * 11 * LICENSE: 12 * 13 * This library is free software; you can redistribute it 14 * and/or modify it under the terms of the GNU Lesser General 15 * Public License as published by the Free Software Foundation; 16 * either version 2.1 of the License, or (at your option) any 17 * later version. 18 * 19 * This library is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 * 28 * @package Converters 29 * @subpackage CHMdefault 30 * @author Joshua Eichorn <[email protected]> 31 * @author Greg Beaver <[email protected]> 32 * @copyright 2000-2006 Joshua Eichorn, Gregory Beaver 33 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 34 * @version CVS: $Id: CHMdefaultConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ 35 * @filesource 36 * @link http://www.phpdoc.org 37 * @link http://pear.php.net/PhpDocumentor 38 * @since 1.0rc1 39 */ 40 /** 41 * Generates files that MS HTML Help Worshop can use to create a MS Windows 42 * compiled help file (CHM) 43 * 44 * The free MS HTML Help compiler takes the project file (phpdoc.hhp) and reads 45 * the table of contents file specified in the project (which is always contents.hhc 46 * in phpDocumentor). When the converter reaches stable state, it will also 47 * output an index file index.hhk. The free download for MS HTML Help Workshop 48 * is available below 49 * @link http://www.microsoft.com/downloads/release.asp?releaseid=33071 MS HTML Help Workshop download 50 * @package Converters 51 * @subpackage CHMdefault 52 * @author Greg Beaver <[email protected]> 53 * @since 1.0rc1 54 * @version $Revision: 234145 $ 55 */ 56 class CHMdefaultConverter extends Converter 57 { 58 /** 59 * CHMdefaultConverter wants elements sorted by type as well as alphabetically 60 * @see Converter::$sort_page_contents_by_type 61 * @var boolean 62 */ 63 var $sort_page_contents_by_type = true; 64 /** @var string */ 65 var $outputformat = 'CHM'; 66 /** @var string */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1034 of 1382

67 var $name = 'default'; 68 /** 69 * indexes of elements by package that need to be generated 70 * @var array 71 */ 72 var $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false); 73 74 /** 75 * output directory for the current procedural page being processed 76 * @var string 77 */ 78 var $page_dir; 79 80 /** 81 * target directory passed on the command-line. 82 * {@link $targetDir} is malleable, always adding package/ and package/subpackage/ subdirectories onto it. 83 * @var string 84 */ 85 var $base_dir; 86 87 /** 88 * output directory for the current class being processed 89 * @var string 90 */ 91 var $class_dir; 92 93 /** 94 * array of converted package page names. 95 * Used to link to the package page in the left index 96 * @var array Format: array(package => 1) 97 */ 98 var $package_pages = array(); 99 100 /** 101 * controls formatting of parser informative output 102 * 103 * Converter prints: 104 * "Converting /path/to/file.php... Procedural Page Elements... Classes..." 105 * Since CHMdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there 106 * is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that 107 * and is purely cosmetic 108 * @var boolean 109 */ 110 var $juststarted = false; 111 112 /** 113 * contains all of the template procedural page element loop data needed for the current template 114 * @var array 115 */ 116 var $current; 117 118 /** 119 * contains all of the template class element loop data needed for the current template 120 * @var array 121 */ 122 var $currentclass; 123 var $wrote = false; 124 var $ric_set = array(); 125 /** 126 * Table of Contents entry for index.hhk 127 * @var array 128 */ 129 var $KLinks = array(); 130 131 /** 132 * sets {@link $base_dir} to $targetDir 133 * @see Converter() 134 */ 135 function CHMdefaultConverter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) 136 { 137 Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title); 138 $this-> base_dir = $targetDir; 139 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1035 of 1382

140 141 /** 142 * @deprecated in favor of PHP 4.3.0+ tokenizer-based source highlighting 143 */ 144 function unmangle($sourcecode) 145 { 146 $sourcecode = str_replace('<code>' ,'<pre>' ,$sourcecode); 147 $sourcecode = str_replace('</code>' ,'</pre>' ,$sourcecode); 148 $sourcecode = str_replace('<br />' ,"\n" ,$sourcecode); 149 $sourcecode = str_replace('&nbsp;' ,' ',$sourcecode); 150 $sourcecode = str_replace('&lt;' ,'<' ,$sourcecode); 151 $sourcecode = str_replace('&gt;' ,'>' ,$sourcecode); 152 $sourcecode = str_replace('&amp;' ,'&' ,$sourcecode); 153 return $sourcecode; 154 } 155 156 /** 157 * @param string full path to the source file 158 * @param string fully highlighted source code 159 */ 160 function writeSource($path, $value) 161 { 162 $templ = & $this-> newSmarty(); 163 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this); 164 $templ-> assign('source',$value); 165 $templ-> assign('package',$pathinfo['package']); 166 $templ-> assign('subpackage',$pathinfo['subpackage']); 167 $templ-> assign('name',$pathinfo['name']); 168 $templ-> assign('source_loc',$pathinfo['source_loc']); 169 $templ-> assign('docs',$pathinfo['docs']); 170 $templ-> assign("subdir" ,'../'); 171 $templ-> register_outputfilter('CHMdefault_outputfilter'); 172 $this-> setTargetDir($this-> getFileSourcePath($this-> base_dir)); 173 $this-> addSourceTOC($pathinfo['name'],$this> getFileSourceName($path),$pathinfo['package'],$pathinfo['subpackage'], true); 174 phpDocumentor_out("\n" ); 175 $this-> setSourcePaths($path); 176 $this-> writefile($this-> getFileSourceName($path).'.html',$templ> fetch('filesource.tpl')); 177 } 178 179 function writeExample($title, $path, $source) 180 { 181 $templ = & $this-> newSmarty(); 182 $templ-> assign('source',$source); 183 if (empty($title)) 184 { 185 $title = 'example'; 186 addWarning(PDERROR_EMPTY_EXAMPLE_TITLE, $path, $title); 187 } 188 $templ-> assign('title',$title); 189 $templ-> assign('file',$path); 190 $templ-> assign("subdir" ,'../'); 191 $templ-> register_outputfilter('CHMdefault_outputfilter'); 192 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this); 193 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . '__examplesource'); 194 $this> addSourceTOC($title,'exsource_'.$path,$pathinfo['package'],$pathinfo['subpackage'], false); 195 phpDocumentor_out("\n" ); 196 $this-> writefile('exsource_'.$path.'.html',$templ-> fetch('examplesource.tpl')); 197 } 198 199 function getExampleLink($path, $title) 200 { 201 return $this-> returnLink('{$subdir}__examplesource' . PATH_DELIMITER . 'exsource_'.$path.'.html',$title); 202 } 203 204 function getSourceLink($path) 205 { 206 return $this-> returnLink('{$subdir}__filesource/' . 207 $this-> getFileSourceName($path).'.html','Source Code for this file'); 208 } 209 210 /** 211 * Retrieve a Converter-specific anchor to a segment of a source code file 212 * parsed via a {@tutorial tags.filesource.pkg} tag. 213 * @param string full path to source file 214 * @param string name of anchor 215 * @param string link text, if this is a link

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1036 of 1382

216 * @param boolean returns either a link or a destination based on this 217 * parameter 218 * @return string link to an anchor, or the anchor 219 */ 220 function getSourceAnchor($sourcefile,$anchor,$text = '',$link = false) 221 { 222 if ($link) { 223 return $this-> returnLink('{$subdir}__filesource/' . 224 $this-> getFileSourceName($sourcefile) . '.html#a' . $anchor, $text); 225 } else { 226 return '<a name="a' .$anchor.'"></a>' ; 227 } 228 } 229 230 231 /** 232 * Return a line of highlighted source code with formatted line number 233 * 234 * If the $path is a full path, then an anchor to the line number will be 235 * added as well 236 * @param integer line number 237 * @param string highlighted source code line 238 * @param false|stringfull path to @filesource file this line is a part of, 239 * if this is a single line from a complete file. 240 * @return string formatted source code line with line number 241 */ 242 function sourceLine($linenumber, $line, $path = false) 243 { 244 $extra = ''; 245 if (strlen(str_replace("\n" , '', $line)) == 0) { 246 $extra = '&nbsp;' ; 247 } 248 if ($path) 249 { 250 return '<li><div class="src-line">' . $this> getSourceAnchor($path, $linenumber) . 251 str_replace("\n" ,'',$line) . $extra . 252 "</div></li>\n" ; 253 } else 254 { 255 return '<li><div class="src-line">' . str_replace("\n" ,'',$line) . 256 " $extra</div></li>\n " ; 257 } 258 } 259 260 /** 261 * Used to convert the <<code>> tag in a docblock 262 * @param string 263 * @param boolean 264 * @return string 265 */ 266 function ProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 267 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 268 { 269 return $this-> PreserveWhiteSpace(parent::ProgramExample($example, $tutorial, $inlinesourceparse, $class, $linenum, $filesourcepath)); 270 } 271 272 /** 273 * @param string 274 */ 275 function TutorialExample($example) 276 { 277 $trans = $this-> template_options['desctranslate']; 278 $this-> template_options['desctranslate'] = array(); 279 $example = '<ol>' . parent::TutorialExample($example) 280 .'</ol>' ; 281 $this-> template_options['desctranslate'] = $trans; 282 if (!isset($this-> template_options['desctranslate'])) return $example; 283 if (!isset($this-> template_options['desctranslate']['code'])) return $example; 284 $example = $this-> template_options['desctranslate']['code'] . $example; 285 if (!isset($this-> template_options['desctranslate']['/code'])) return $example; 286 return $example . $this-> template_options['desctranslate']['/code']; 287 } 288 289 function getCurrentPageLink() 290 { 291 return $this-> curname . '.html';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1037 of 1382

292 } 293 294 /** 295 * Uses htmlspecialchars() on the input 296 */ 297 function postProcess($text) 298 { 299 if ($this-> highlightingSource) { 300 return str_replace(array(' ',"\t" ), array('&nbsp;' , '&nbsp;&nbsp;&nbsp;' ), 301 htmlspecialchars($text)); 302 } 303 return htmlspecialchars($text); 304 } 305 306 /** 307 * Use the template tutorial_toc.tpl to generate a table of contents for HTML 308 * @return string table of contents formatted for use in the current output format 309 * @param array format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...) 310 */ 311 function formatTutorialTOC($toc) 312 { 313 $template = & $this-> newSmarty(); 314 $template-> assign('toc',$toc); 315 return $template-> fetch('tutorial_toc.tpl'); 316 } 317 318 function & SmartyInit(& $templ) 319 { 320 if (!isset($this-> package_index)) 321 foreach($this-> all_packages as $key => $val) 322 { 323 if (isset($this-> pkg_elements[$key])) 324 { 325 if (!isset($start)) $start = $key; 326 $this-> package_index[] = array('link' => " li_$key.html" , 'title' => $key); 327 } 328 } 329 $templ-> assign("packageindex" ,$this-> package_index); 330 $templ-> assign("subdir" ,''); 331 return $templ; 332 } 333 334 335 /** 336 * Writes out the template file of {@link $class_data} and unsets the template to save memory 337 * @see registerCurrentClass() 338 * @see parent::endClass() 339 */ 340 function endClass() 341 { 342 $a = '../'; 343 if (!empty($this-> subpackage)) $a .= '../'; 344 if ($this-> juststarted) 345 { 346 $this-> juststarted = false; 347 phpDocumentor_out("\n" ); 348 flush(); 349 } 350 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 351 $this-> class_data-> assign("subdir" ,$a); 352 $this-> class_data-> register_outputfilter('CHMdefault_outputfilter'); 353 $this-> addTOC($this-> class,$this-> class,$this-> package,$this> subpackage, true); 354 $this-> writefile($this-> class . '.html',$this-> class_data> fetch('class.tpl')); 355 unset($this-> class_data); 356 } 357 358 /** 359 * Writes out the template file of {@link $page_data} and unsets the template to save memory 360 * @see registerCurrent() 361 * @see parent::endPage() 362 */ 363 function endPage() 364 { 365 $this-> package = $this-> curpage-> package;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1038 of 1382

366 $this-> subpackage = $this-> curpage-> subpackage; 367 $a = '../'; 368 if (!empty($this-> subpackage)) $a .= '../'; 369 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 370 $this-> page_data-> assign("package" ,$this-> package); 371 $this-> page_data-> assign("subdir" ,$a); 372 $this-> page_data-> register_outputfilter('CHMdefault_outputfilter'); 373 $this-> addTOC($this-> curpage-> file,$this-> page,$this-> package,$this> subpackage); 374 $this-> writefile($this-> page . '.html',$this-> page_data-> fetch('page.tpl')); 375 unset($this-> page_data); 376 } 377 378 /** 379 * @param string 380 * @param string 381 * @return string &lt;a href="'.$link.'">'.$text.'</a&gt; 382 */ 383 function returnLink($link,$text) 384 { 385 return '<a href="' .$link.'">' .$text.'</a>' ; 386 } 387 388 /** 389 * CHMdefaultConverter chooses to format both package indexes and the complete index here 390 * 391 * This function formats output for the elementindex.html and pkgelementindex.html template files. It then 392 * writes them to the target directory 393 * @see generateElementIndex(), generatePkgElementIndex() 394 */ 395 function formatPkgIndex() 396 { 397 list($package_indexes,$packages,$mletters) = $this-> generatePkgElementIndexes(); 398 for($i=0;$i< count($package_indexes);$i++) 399 { 400 $template = & $this-> newSmarty(); 401 $this-> package = $package_indexes[$i]['package']; 402 $this-> subpackage = ''; 403 $template-> assign("index" ,$package_indexes[$i]['pindex']); 404 $template-> assign("package" ,$package_indexes[$i]['package']); 405 $template> assign("letters" ,$mletters[$package_indexes[$i]['package']]); 406 $template-> assign("title" ,"Package " .$package_indexes[$i]['package']." Element Index" ); 407 $template-> assign("subdir" ,'../'); 408 $template-> register_outputfilter('CHMdefault_outputfilter'); 409 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $package_indexes[$i]['package']); 410 $this-> addTOC($package_indexes[$i]['package']." Alphabetical Index" ,'elementindex_'.$package_indexes[$i]['package'],$package_indexes[$i]['package'],''); 411 $this> writefile('elementindex_'.$package_indexes[$i]['package'].'.html',$template> fetch('pkgelementindex.tpl')); 412 } 413 phpDocumentor_out("\n" ); 414 flush(); 415 } 416 417 /** 418 * CHMdefaultConverter uses this function to format template index.html and packages.html 419 * 420 * This function generates the package list from {@link $all_packages}, eliminating any 421 * packages that don't have any entries in their package index (no files at all, due to @ignore 422 * or other factors). Then it uses the default package name as the first package index to display. 423 * It sets the right pane to be either a blank file with instructions on making packagelevel docs, 424 * or the package-level docs for the default package. 425 * @global string Used to set the starting package to display 426 */ 427 function formatIndex() 428 { 429 global $phpDocumentor_DefaultPackageName; 430 list($elindex,$mletters) = $this-> generateElementIndex(); 431 $template = & $this-> newSmarty(); 432 $template-> assign("index" ,$elindex); 433 $template-> assign("letters" ,$mletters); 434 $template-> assign("title" ,"Element Index" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1039 of 1382

435 $template-> assign("date" ,date("r" ,time())); 436 $template-> register_outputfilter('CHMdefault_outputfilter'); 437 phpDocumentor_out("\n" ); 438 flush(); 439 $this-> setTargetDir($this-> base_dir); 440 $this-> addTOC("Alphabetical Index Of All Elements" ,'elementindex',"Index" ,''); 441 $this-> writefile('elementindex.html',$template-> fetch('elementindex.tpl')); 442 usort($this-> package_index,"CHMdefault_pindexcmp" ); 443 $index = & $this-> newSmarty(); 444 foreach($this-> all_packages as $key => $val) 445 { 446 if (isset($this-> pkg_elements[$key])) 447 { 448 if (!isset($start)) $start = $key; 449 if (!isset($this-> package_pages[$key])) $this-> writeNewPPage($key); 450 } 451 } 452 $this-> setTargetDir($this-> base_dir); 453 // Created index.html 454 if (isset($this-> pkg_elements[$phpDocumentor_DefaultPackageName])) $start = $phpDocumentor_DefaultPackageName; 455 $this-> package = $start; 456 $this-> subpackage = ''; 457 $setalready = false; 458 if (isset($this-> tutorials[$start]['']['pkg'])) 459 { 460 foreach($this-> tutorials[$start]['']['pkg'] as $tute) 461 { 462 if ($tute-> name == $start . '.pkg') 463 { 464 $setalready = true; 465 $this-> addTOC("Start page" ,$start.'/tutorial_'.$tute> name,"Index" ,''); 466 } 467 } 468 } 469 if (!$setalready) 470 { 471 if (isset($this-> package_pages[$start])) 472 { 473 $this-> addTOC("Start page" ,'package_'.$start,"Index" ,''); 474 } 475 else 476 { 477 $index-> assign("blank" ,"blank" ); 478 $blank = & $this-> newSmarty(); 479 $blank-> assign('package',$phpDocumentor_DefaultPackageName); 480 $this-> addTOC("Start page" ,'blank',"Index" ,''); 481 $this-> writefile("blank.html" ,$blank-> fetch('blank.tpl')); 482 Converter::writefile('index.html',$blank-> fetch('tutorial.tpl')); 483 } 484 } 485 phpDocumentor_out("\n" ); 486 flush(); 487 488 unset($index); 489 } 490 491 function writeNewPPage($key) 492 { 493 return; 494 $template = & $this-> newSmarty(); 495 $this-> package = $key; 496 $this-> subpackage = ''; 497 $template-> assign("date" ,date("r" ,time())); 498 $template-> assign("title" ,$this-> title); 499 $template-> assign("package" ,$key); 500 $template-> register_outputfilter('CHMdefault_outputfilter'); 501 phpDocumentor_out("\n" ); 502 flush(); 503 $this-> setTargetDir($this-> base_dir); 504 505 $this-> addTOC(" $key Index" ," li_$key" ,$key,''); 506 $this-> writefile(" li_$key.html" ,$template-> fetch('index.tpl')); 507 unset($template); 508 } 509 510 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1040 of 1382

511 * Generate indexes for li_package.html and classtree output files 512 * 513 * This function generates the li_package.html files from the template file left.html. It does this by 514 * iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve 515 * the pre-sorted {@link abstractLink} descendants needed for index generation. Conversion of these links to 516 * text is done by {@link returnSee()}. The {@link $local} parameter is set to false to ensure that paths are correct. 517 * 518 * Then it uses {@link generateFormattedClassTrees()} to create class trees from the template file classtrees.html. Output 519 * filename is classtrees_packagename.html. This function also unsets {@link $elements} and {@link $pkg_elements} to free 520 * up the considerable memory these two class vars use 521 * @see $page_elements, $class_elements, $function_elements 522 */ 523 function formatLeftIndex() 524 { 525 phpDocumentor_out("\n" ); 526 flush(); 527 $this-> setTargetDir($this-> base_dir); 528 if (0)//!isset($this->left)) 529 { 530 debug("Nothing parsed, check the command-line" ); 531 die(); 532 } 533 foreach($this-> all_packages as $package => $rest) 534 { 535 if (!isset($this-> pkg_elements[$package])) continue; 536 537 // Create class tree page 538 $template = & $this-> newSmarty(); 539 $template-> assign("classtrees" ,$this> generateFormattedClassTrees($package)); 540 $template-> assign("package" ,$package); 541 $template-> assign("date" ,date("r" ,time())); 542 $template-> register_outputfilter('CHMdefault_outputfilter'); 543 $this-> addTOC(" $package Class Trees" ," classtrees_$package" ,$package,''); 544 $this-> writefile(" classtrees_$package.html" ,$template> fetch('classtrees.tpl')); 545 phpDocumentor_out("\n" ); 546 flush(); 547 } 548 // free up considerable memory 549 unset($this-> elements); 550 unset($this-> pkg_elements); 551 } 552 553 /** 554 * This function takes an {@link abstractLink} descendant and returns an html link 555 * 556 * @param abstractLink a descendant of abstractlink should be passed, and never text 557 * @param string text to display in the link 558 * @param boolean this parameter is not used, and is deprecated 559 * @param boolean determines whether the returned text is enclosed in an <a> tag 560 */ 561 function returnSee(& $element, $eltext = false, $with_a = true) 562 { 563 if (!$element) return false; 564 if (!$with_a) return $this-> getId($element, false); 565 if (!$eltext) 566 { 567 $eltext = ''; 568 switch($element-> type) 569 { 570 case 'tutorial' : 571 $eltext = strip_tags($element-> title); 572 break; 573 case 'method' : 574 case 'var' : 575 case 'const' : 576 $eltext .= $element-> class.'::'; 577 case 'page' : 578 case 'define' : 579 case 'class' : 580 case 'function' : 581 case 'global' :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1041 of 1382

582 default : 583 $eltext .= $element-> name; 584 if ($element-> type == 'function' || $element-> type == 'method') $eltext .= '()'; 585 break; 586 } 587 } 588 return '<a href="' .$this-> getId($element).'">' .$eltext.'</a>' ; 589 } 590 591 function getId($element, $fullpath = true) 592 { 593 if (phpDocumentor_get_class($element) == 'parserdata') 594 { 595 $element = $this-> addLink($element-> parent); 596 $elp = $element-> parent; 597 } elseif (is_a($element, 'parserbase')) 598 { 599 $elp = $element; 600 $element = $this-> addLink($element); 601 } 602 $c = ''; 603 if (!empty($element-> subpackage)) 604 { 605 $c = '/'.$element-> subpackage; 606 } 607 $b = '{$subdir}'; 608 switch ($element-> type) 609 { 610 case 'page' : 611 if ($fullpath) 612 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html'; 613 return 'top'; 614 break; 615 case 'define' : 616 case 'global' : 617 case 'function' : 618 if ($fullpath) 619 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html#'.$element> type.$element-> name; 620 return $element-> type.$element-> name; 621 break; 622 case 'class' : 623 if ($fullpath) 624 return $b.$element-> package.$c.'/'.$element-> name.'.html'; 625 return 'top'; 626 break; 627 case 'method' : 628 case 'var' : 629 case 'const' : 630 if ($fullpath) 631 return $b.$element-> package.$c.'/'.$element-> class.'.html#'.$element> type.$element-> name; 632 return $element-> type.$element-> name; 633 break; 634 case 'tutorial' : 635 $d = ''; 636 if ($element-> section) 637 { 638 $d = '#'.$element-> section; 639 } 640 return $b.$element-> package.$c.'/tutorial_'.$element-> name.'.html'.$d; 641 } 642 } 643 644 function ConvertTodoList() 645 { 646 $todolist = array(); 647 foreach($this-> todoList as $package => $alltodos) 648 { 649 foreach($alltodos as $todos) 650 { 651 $converted = array(); 652 $converted['link'] = $this-> returnSee($todos[0]); 653 if (!is_array($todos[1])) 654 { 655 $converted['todos'][] = $todos[1]-> Convert($this); 656 } else 657 { 658 foreach($todos[1] as $todo)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1042 of 1382

659 { 660 $converted['todos'][] = $todo-> Convert($this); 661 } 662 } 663 $todolist[$package][] = $converted; 664 } 665 } 666 $templ = & $this-> newSmarty(); 667 $templ-> assign('todos',$todolist); 668 $templ-> register_outputfilter('CHMdefault_outputfilter'); 669 $this-> setTargetDir($this-> base_dir); 670 $this-> addTOC('Todo List','todolist','Index','',false,true); 671 $this-> addKLink('Todo List', 'todolist', '', 'Development'); 672 $this-> writefile('todolist.html',$templ-> fetch('todolist.tpl')); 673 } 674 675 /** 676 * Convert README/INSTALL/CHANGELOG file contents to output format 677 * @param README|INSTALL|CHANGELOG 678 * @param string contents of the file 679 */ 680 function Convert_RIC($name, $contents) 681 { 682 $template = & $this-> newSmarty(); 683 $template-> assign('contents',$contents); 684 $template-> assign('name',$name); 685 $this-> setTargetDir($this-> base_dir); 686 $this-> addTOC($name,'ric_'.$name,'Index','',false,true); 687 $this-> addKLink($name, 'ric_'.$name, '', 'Development'); 688 $this-> writefile('ric_'.$name . '.html',$template-> fetch('ric.tpl')); 689 $this-> ric_set[$name] = true; 690 } 691 692 /** 693 * Create errors.html template file output 694 * 695 * This method takes all parsing errors and warnings and spits them out ordered by file and line number. 696 * @global ErrorTracker We'll be using it's output facility 697 */ 698 function ConvertErrorLog() 699 { 700 global $phpDocumentor_errors; 701 $allfiles = array(); 702 $files = array(); 703 $warnings = $phpDocumentor_errors-> returnWarnings(); 704 $errors = $phpDocumentor_errors-> returnErrors(); 705 $template = & $this-> newSmarty(); 706 foreach($warnings as $warning) 707 { 708 $file = '##none'; 709 $linenum = 'Warning'; 710 if ($warning-> file) 711 { 712 $file = $warning-> file; 713 $allfiles[$file] = 1; 714 $linenum .= ' on line '.$warning-> linenum; 715 } 716 $files[$file]['warnings'][] = array('name' => $linenum, 'listing' => $warning> data); 717 } 718 foreach($errors as $error) 719 { 720 $file = '##none'; 721 $linenum = 'Error'; 722 if ($error-> file) 723 { 724 $file = $error-> file; 725 $allfiles[$file] = 1; 726 $linenum .= ' on line '.$error-> linenum; 727 } 728 $files[$file]['errors'][] = array('name' => $linenum, 'listing' => $error> data); 729 } 730 $i=1; 731 $af = array(); 732 foreach($allfiles as $file => $num) 733 { 734 $af[$i++] = $file; 735 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1043 of 1382

736 $allfiles = $af; 737 usort($allfiles,'strnatcasecmp'); 738 $allfiles[0] = "Post-parsing" ; 739 foreach($allfiles as $i => $a) 740 { 741 $allfiles[$i] = array('file' => $a); 742 } 743 $out = array(); 744 foreach($files as $file => $data) 745 { 746 if ($file == '##none') $file = 'Post-parsing'; 747 $out[$file] = $data; 748 } 749 $template-> assign("files" ,$allfiles); 750 $template-> assign("all" ,$out); 751 $template-> assign("title" ,"phpDocumentor Parser Errors and Warnings" ); 752 $this-> setTargetDir($this-> base_dir); 753 $this-> writefile("errors.html" ,$template-> fetch('errors.tpl')); 754 unset($template); 755 phpDocumentor_out("\n\nTo view errors and warnings, look at " .$this> base_dir. PATH_DELIMITER . "errors.html\n" ); 756 flush(); 757 } 758 759 function getCData($value) 760 { 761 return '<pre>' .htmlentities($value).'</pre>' ; 762 } 763 764 function getTutorialId($package,$subpackage,$tutorial,$id) 765 { 766 return $id; 767 } 768 769 /** 770 * Converts package page and sets its package as used in {@link $package_pages} 771 * @param parserPackagePage 772 */ 773 function convertPackagepage(& $element) 774 { 775 phpDocumentor_out("\n" ); 776 flush(); 777 $this-> package = $element-> package; 778 $this-> subpackage = ''; 779 $contents = $element-> Convert($this); 780 $this-> package_pages[$element-> package] = str_replace('{$subdir}','../',$contents); 781 phpDocumentor_out("\n" ); 782 flush(); 783 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $element-> package); 784 $this-> addTOC($element-> package." Tutorial" ,'package_'.$element> package,$element-> package,''); 785 $this-> writeFile('package_'.$element> package.'.html',str_replace('{$subdir}','../',$contents)); 786 $this-> setTargetDir($this-> base_dir); 787 Converter::writefile('index.html',str_replace('{$subdir}','',$contents)); 788 $this-> addKLink($element-> package." Tutorial" , 'package_'.$element> package, '', 'Tutorials'); 789 } 790 791 /** 792 * @param parserTutorial 793 */ 794 function convertTutorial(& $element) 795 { 796 phpDocumentor_out("\n" ); 797 flush(); 798 $template = & parent::convertTutorial($element); 799 $a = '../'; 800 if ($element-> subpackage) $a .= '../'; 801 $template-> assign('subdir',$a); 802 $template-> register_outputfilter('CHMdefault_outputfilter'); 803 $contents = $template-> fetch('tutorial.tpl'); 804 if ($element-> package == $GLOBALS['phpDocumentor_DefaultPackageName'] && empty($element-> subpackage) && ( $element-> name == $element-> package . '.pkg')) 805 { 806 $template-> assign('subdir',''); 807 $this-> setTargetDir($this-> base_dir); 808 Converter::writefile('index.html',$template-> fetch('tutorial.tpl'));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1044 of 1382

809 } 810 $a = ''; 811 if ($element-> subpackage) $a = PATH_DELIMITER . $element-> subpackage; 812 phpDocumentor_out("\n" ); 813 flush(); 814 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $element-> package . $a); 815 $this-> addTOC($a = strip_tags($element-> getTitle($this)), 'tutorial_'.$element> name, 816 $element-> package, $element-> subpackage, false, true); 817 $this-> writeFile('tutorial_'.$element-> name.'.html',$contents); 818 $this-> addKLink($element-> getTitle($this), $element-> package . $a . PATH_DELIMITER . 'tutorial_'.$element-> name, 819 '', 'Tutorials'); 820 } 821 822 /** 823 * Converts class for template output 824 * @see prepareDocBlock(), generateChildClassList(), generateFormattedClassTree(), getFormattedConflicts() 825 * @see getFormattedInheritedMethods(), getFormattedInheritedVars() 826 * @param parserClass 827 */ 828 function convertClass(& $element) 829 { 830 parent::convertClass($element); 831 $this-> class_dir = $element-> docblock-> package; 832 if (!empty($element-> docblock-> subpackage)) $this-> class_dir .= PATH_DELIMITER . $element-> docblock-> subpackage; 833 $a = '../'; 834 if ($element-> docblock-> subpackage != '') $a = " ../$a" ; 835 836 $this-> class_data-> assign('subdir',$a); 837 $this-> class_data-> assign("title" ,"Docs For Class " . $element-> getName()); 838 $this-> class_data-> assign("page" ,$element-> getName() . '.html'); 839 $this-> addKLink($element-> name, $this-> class_dir . PATH_DELIMITER . $this> class, '', 'Classes'); 840 } 841 842 843 /** 844 * Converts class variables for template output 845 * @see prepareDocBlock(), getFormattedConflicts() 846 * @param parserDefine 847 */ 848 function convertVar(& $element) 849 { 850 parent::convertVar($element, array('var_dest' => $this-> getId($element,false))); 851 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 852 $this-> addKLink($element-> name, $this-> class_dir . PATH_DELIMITER .$this> class, $this-> getId($element,false), $element-> class.' Properties'); 853 } 854 855 /** 856 * Converts class constants for template output 857 * @see prepareDocBlock(), getFormattedConflicts() 858 * @param parserDefine 859 */ 860 function convertConst(& $element) 861 { 862 parent::convertConst($element, array('const_dest' => $this> getId($element,false))); 863 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 864 $this-> addKLink($element-> name, $this-> class_dir . PATH_DELIMITER .$this> class, $this-> getId($element,false), $element-> class.' Constants'); 865 } 866 867 /** 868 * Converts class methods for template output 869 * @see prepareDocBlock(), getFormattedConflicts() 870 * @param parserDefine 871 */ 872 function convertMethod(& $element) 873 { 874 parent::convertMethod($element, array('method_dest' => $this> getId($element,false))); 875 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 876 $this-> addKLink($element-> name, $this-> class_dir . PATH_DELIMITER .$this> class, $this-> getId($element,false), $element-> class.' Methods'); 877 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1045 of 1382

878 879 /** 880 * Converts function for template output 881 * @see prepareDocBlock(), parserFunction::getFunctionCall(), getFormattedConflicts() 882 * @param parserFunction 883 */ 884 function convertFunction(& $element) 885 { 886 $funcloc = $this-> getId($this-> addLink($element)); 887 parent::convertFunction($element,array('function_dest' => $this> getId($element,false))); 888 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 889 $this-> addKLink($element-> name, $this-> page_dir . PATH_DELIMITER . $this> page, $this-> getId($element,false), 'Functions'); 890 } 891 892 /** 893 * Converts include elements for template output 894 * @see prepareDocBlock() 895 * @param parserInclude 896 */ 897 function convertInclude(& $element) 898 { 899 parent::convertInclude($element, array('include_file' => '_'.strtr($element> getValue(),array('"' => '', "'" => '','.' => '_')))); 900 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 901 $this-> addKLink(str_replace('"' , '', $element-> getValue()), $this> page_dir . PATH_DELIMITER . $this-> page, '', ucfirst($element-> name)); 902 } 903 904 /** 905 * Converts defines for template output 906 * @see prepareDocBlock(), getFormattedConflicts() 907 * @param parserDefine 908 */ 909 function convertDefine(& $element) 910 { 911 parent::convertDefine($element, array('define_link' => $this> getId($element,false))); 912 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 913 $this-> addKLink($element-> name, $this-> page_dir . PATH_DELIMITER . $this> page, $this-> getId($element,false), 'Constants'); 914 } 915 916 /** 917 * Converts global variables for template output 918 * @param parserGlobal 919 */ 920 function convertGlobal(& $element) 921 { 922 parent::convertGlobal($element, array('global_link' => $this> getId($element,false))); 923 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 924 $this-> addKLink($element-> name, $this-> page_dir . PATH_DELIMITER . $this> page, $this-> getId($element,false), 'Global Variables'); 925 } 926 927 /** 928 * converts procedural pages for template output 929 * @see prepareDocBlock(), getClassesOnPage() 930 * @param parserData 931 */ 932 function convertPage(& $element) 933 { 934 parent::convertPage($element); 935 $this-> juststarted = true; 936 $this-> page_dir = $element-> parent-> package; 937 if (!empty($element-> parent-> subpackage)) $this-> page_dir .= PATH_DELIMITER . $element-> parent-> subpackage; 938 // registering stuff on the template 939 $this-> page_data-> assign("page" ,$this-> getPageName($element) . '.html'); 940 $this-> page_data-> assign("title" ,"Docs for page " .$element> parent-> getFile()); 941 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 942 $this-> addKLink($element-> parent-> file, $this-> page_dir . PATH_DELIMITER . $this-> page, '', 'Files'); 943 } 944 945 function getPageName(& $element)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1046 of 1382

946 { 947 if (phpDocumentor_get_class($element) == 'parserpage') return '_'.$element> getName(); 948 return '_'.$element-> parent-> getName(); 949 } 950 951 /** 952 * returns an array containing the class inheritance tree from the root object to the class 953 * 954 * @param parserClass class variable 955 * @return array Format: array(root,child,child,child,...,$class) 956 * @uses parserClass::getParentClassTree() 957 */ 958 959 function generateFormattedClassTree($class) 960 { 961 $tree = $class-> getParentClassTree($this); 962 $out = ''; 963 if (count($tree) - 1) 964 { 965 $result = array($class-> getName()); 966 $parent = $tree[$class-> getName()]; 967 $distance[] = ''; 968 while ($parent) 969 { 970 $x = $parent; 971 if (is_object($parent)) 972 { 973 $subpackage = $parent-> docblock-> subpackage; 974 $package = $parent-> docblock-> package; 975 $x = $parent; 976 $x = $parent-> getLink($this); 977 if (!$x) $x = $parent-> getName(); 978 } 979 $result[] = 980 $x; 981 $distance[] = 982 "\n%s|\n" . 983 "%s--" ; 984 if (is_object($parent)) 985 $parent = $tree[$parent-> getName()]; 986 elseif (isset($tree[$parent])) 987 $parent = $tree[$parent]; 988 } 989 $nbsp = ' '; 990 for($i=count($result) - 1;$i>= 0;$i--) 991 { 992 $my_nbsp = ''; 993 for($j=0;$j< count($result) - $i;$j++) $my_nbsp .= $nbsp; 994 $distance[$i] = sprintf($distance[$i],$my_nbsp,$my_nbsp); 995 } 996 return array('classes'=> array_reverse($result),'distance'=> array_reverse($distance)); 997 } else 998 { 999 return array('classes'=> $class-> getName(),'distance'=>array( '')); 1000 } 1001 } 1002 1003 /** @access private */ 1004 function sortVar($a, $b) 1005 { 1006 return strnatcasecmp($a-> getName(),$b-> getName()); 1007 } 1008 1009 /** @access private */ 1010 function sortMethod($a, $b) 1011 { 1012 if ($a-> isConstructor) return -1; 1013 if ($b-> isConstructor) return 1; 1014 return strnatcasecmp($a-> getName(),$b-> getName()); 1015 } 1016 1017 /** 1018 * returns a template-enabled array of class trees 1019 * 1020 * @param string $package package to generate a class tree for 1021 * @see $roots, HTMLConverter::getRootTree() 1022 */ 1023 function generateFormattedClassTrees($package)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1047 of 1382

1024 { 1025 if (!isset($this-> roots['normal'][$package]) && 1026 !isset($this-> roots['special'][$package])) { 1027 return array(); 1028 } 1029 $trees = array(); 1030 if (isset($this-> roots['normal'][$package])) { 1031 $roots = $this-> roots['normal'][$package]; 1032 for($i=0;$i< count($roots);$i++) 1033 { 1034 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1035 if ($root && $root-> isInterface()) { 1036 continue; 1037 } 1038 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1039 } 1040 } 1041 if (isset($this-> roots['special'][$package])) { 1042 $roots = $this-> roots['special'][$package]; 1043 foreach ($roots as $parent => $classes) { 1044 $thistree = ''; 1045 foreach ($classes as $classinfo) { 1046 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1047 if ($root && $root-> isInterface()) { 1048 continue; 1049 } 1050 $thistree .= 1051 $this-> getRootTree( 1052 $this-> getSortedClassTreeFromClass( 1053 $classinfo, 1054 $package, 1055 ''), 1056 $package, 1057 true); 1058 } 1059 if (!$thistree) { 1060 continue; 1061 } 1062 $trees[] = array( 1063 'class' => $parent, 1064 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1065 ); 1066 } 1067 } 1068 return $trees; 1069 } 1070 1071 /** 1072 * returns a template-enabled array of interface inheritance trees 1073 * 1074 * @param string $package package to generate a class tree for 1075 * @see $roots, HTMLConverter::getRootTree() 1076 */ 1077 function generateFormattedInterfaceTrees($package) 1078 { 1079 if (!isset($this-> roots['normal'][$package]) && 1080 !isset($this-> roots['special'][$package])) { 1081 return array(); 1082 } 1083 $trees = array(); 1084 if (isset($this-> roots['normal'][$package])) { 1085 $roots = $this-> roots['normal'][$package]; 1086 for($i=0;$i< count($roots);$i++) 1087 { 1088 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1089 if ($root && ! $root-> isInterface()) { 1090 continue; 1091 } 1092 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1093 } 1094 } 1095 if (isset($this-> roots['special'][$package])) { 1096 $roots = $this-> roots['special'][$package]; 1097 foreach ($roots as $parent => $classes) { 1098 $thistree = '';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1048 of 1382

1099 foreach ($classes as $classinfo) { 1100 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1101 if ($root && ! $root-> isInterface()) { 1102 continue; 1103 } 1104 $thistree .= 1105 $this-> getRootTree( 1106 $this-> getSortedClassTreeFromClass( 1107 $classinfo, 1108 $package, 1109 ''), 1110 $package, 1111 true); 1112 } 1113 if (!$thistree) { 1114 continue; 1115 } 1116 $trees[] = array( 1117 'class' => $parent, 1118 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1119 ); 1120 } 1121 } 1122 return $trees; 1123 } 1124 1125 /** 1126 * return formatted class tree for the Class Trees page 1127 * 1128 * @param array $tree output from {@link getSortedClassTreeFromClass()} 1129 * @param string $package package 1130 * @param boolean $nounknownparent if true, an object's parent will not be checked 1131 * @see Classes::$definitechild, generateFormattedClassTrees() 1132 * @return string 1133 */ 1134 function getRootTree($tree, $package, $noparent = false) 1135 { 1136 if (!$tree) return ''; 1137 $my_tree = ''; 1138 $cur = '#root'; 1139 $lastcur = array(false); 1140 $kids = array(); 1141 $dopar = false; 1142 if (!$noparent && $tree[$cur]['parent']) 1143 { 1144 $dopar = true; 1145 if (!is_object($tree[$cur]['parent'])) 1146 { 1147 // debug("parent ".$tree[$cur]['parent']." not found"); 1148 $my_tree .= '<li>' . $tree[$cur]['parent'] .'<ul>' ; 1149 } 1150 else 1151 { 1152 // debug("parent ".$this>returnSee($tree[$cur]['parent'])." in other package"); 1153 $my_tree .= '<li>' . $this-> returnSee($tree[$cur]['parent']); 1154 if ($tree[$cur]['parent']-> package != $package) $my_tree .= ' <b>(Different package)</b><ul>' ; 1155 } 1156 } 1157 do 1158 { 1159 // fancy_debug($cur,$lastcur,$kids); 1160 if (count($tree[$cur]['children'])) 1161 { 1162 // debug("$cur has children"); 1163 if (!isset($kids[$cur])) 1164 { 1165 // debug("set $cur kids"); 1166 $kids[$cur] = 1; 1167 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link']); 1168 $my_tree .= '<ul>' ."\n" ; 1169 } 1170 array_push($lastcur,$cur); 1171 list(,$cur) = each($tree[$cur]['children']); 1172 // var_dump('listed',$cur); 1173 if ($cur) 1174 { 1175 $cur = $cur['package'] . '#' . $cur['class'];

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1049 of 1382

1176 // debug("set cur to child $cur"); 1177 // $my_tree .= '<li>'.$this->returnSee($tree[$cur]['link']); 1178 continue; 1179 } else 1180 { 1181 // debug("end of children for $cur"); 1182 $cur = array_pop($lastcur); 1183 $cur = array_pop($lastcur); 1184 $my_tree .= '</ul></li>' ."\n" ; 1185 if ($dopar && ( $cur == '#root' || !$cur)) $my_tree .= '</ul></li>' ; 1186 } 1187 } else 1188 { 1189 // debug("$cur has no children"); 1190 $my_tree .= '<li>' .$this> returnSee($tree[$cur]['link'])."</li>" ; 1191 if ($dopar && $cur == '#root') $my_tree .= '</ul></li>' ; 1192 $cur = array_pop($lastcur); 1193 } 1194 } while ($cur); 1195 return $my_tree; 1196 } 1197 /** 1198 * Generate indexing information for given element 1199 * 1200 * @param parserElement descendant of parserElement 1201 * @see generateElementIndex() 1202 * @return array 1203 */ 1204 function getIndexInformation($elt) 1205 { 1206 $Result['type'] = $elt-> type; 1207 $Result['file_name'] = $elt-> file; 1208 $Result['path'] = $elt-> getPath(); 1209 1210 if (isset($elt-> docblock)) 1211 { 1212 $Result['description'] = $elt-> docblock-> getSDesc($this); 1213 1214 if ($elt-> docblock-> hasaccess) 1215 $Result['access'] = $elt-> docblock-> tags['access'][0]> value; 1216 else 1217 $Result['access'] = 'public'; 1218 1219 $Result['abstract'] = isset ($elt-> docblock> tags['abstract'][0]); 1220 } 1221 else 1222 $Result['description'] = ''; 1223 1224 $aa = $Result['description']; 1225 if (!empty($aa)) $aa = " <br>&nbsp;&nbsp;&nbsp;&nbsp; $aa" ; 1226 1227 switch($elt-> type) 1228 { 1229 case 'class': 1230 $Result['name'] = $elt-> getName(); 1231 $Result['title'] = 'Class'; 1232 $Result['link'] = $this-> getClassLink($elt-> getName(), 1233 $elt-> docblock-> package, 1234 $elt-> getPath(), 1235 $elt-> getName()); 1236 $Result['listing'] = 'in file '.$elt-> file.', class '.$Result['link']." $aa" ; 1237 break; 1238 case 'define': 1239 $Result['name'] = $elt-> getName(); 1240 $Result['title'] = 'Constant'; 1241 $Result['link'] = $this-> getDefineLink($elt-> getName(), 1242 $elt-> docblock> package, 1243 $elt-> getPath(), 1244 $elt-> getName()); 1245 $Result['listing'] = 'in file '.$elt-> file.', constant '.$Result['link']." $aa" ; 1246 break; 1247 case 'global':

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1050 of 1382

1248 $Result['name'] = $elt-> getName(); 1249 $Result['title'] = 'Global'; 1250 $Result['link'] = $this-> getGlobalLink($elt-> getName(), 1251 $elt-> docblock> package, 1252 $elt-> getPath(), 1253 $elt-> getName()); 1254 $Result['listing'] = 'in file '.$elt-> file.', global variable '.$Result['link']." $aa" ; 1255 break; 1256 case 'function': 1257 $Result['name'] = $elt-> getName(); 1258 $Result['title'] = 'Function'; 1259 $Result['link'] = $this-> getFunctionLink($elt-> getName(), 1260 $elt-> docblock> package, 1261 $elt-> getPath(), 1262 $elt-> getName().'()'); 1263 $Result['listing'] = 'in file '.$elt-> file.', function '.$Result['link']." $aa" ; 1264 break; 1265 case 'method': 1266 $Result['name'] = $elt-> getName(); 1267 $Result['title'] = 'Method'; 1268 $Result['link'] = $this-> getMethodLink($elt-> getName(), 1269 $elt-> class, 1270 $elt-> docblock> package, 1271 $elt-> getPath(), 1272 $elt-> class.'::'.$elt> getName().'()' 1273 ); 1274 if ($elt-> isConstructor) $Result['constructor'] = 1; 1275 $Result['listing'] = 'in file '.$elt-> file.', method '.$Result['link']." $aa" ; 1276 break; 1277 case 'var': 1278 $Result['name'] = $elt-> getName(); 1279 $Result['title'] = 'Variable'; 1280 $Result['link'] = $this-> getVarLink($elt-> getName(), 1281 $elt-> class, 1282 $elt-> docblock-> package, 1283 $elt-> getPath(), 1284 $elt-> class.'::'.$elt> getName()); 1285 $Result['listing'] = 'in file '.$elt-> file.', variable '.$Result['link']." $aa" ; 1286 break; 1287 case 'const': 1288 $Result['name'] = $elt-> getName(); 1289 $Result['title'] = 'Variable'; 1290 $Result['link'] = $this-> getConstLink($elt-> getName(), 1291 $elt-> class, 1292 $elt-> docblock-> package, 1293 $elt-> getPath(), 1294 $elt-> class.'::'.$elt> getName()); 1295 $Result['listing'] = 'in file '.$elt-> file.', class constant '.$Result['link']." $aa" ; 1296 break; 1297 case 'page': 1298 $Result['name'] = $elt-> getFile(); 1299 $Result['title'] = 'Page'; 1300 $Result['link'] = $this-> getPageLink($elt-> getFile(), 1301 $elt-> package, 1302 $elt-> getPath(), 1303 $elt-> getFile()); 1304 $Result['listing'] = 'procedural page '.$Result['link']; 1305 break; 1306 case 'include': 1307 $Result['name'] = $elt-> getName(); 1308 $Result['title'] = 'Include'; 1309 $Result['link'] = $elt-> getValue(); 1310 $Result['listing'] = 'include '.$Result['name']; 1311 break; 1312 } 1313 1314 return $Result; 1315 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1051 of 1382

1316 /** 1317 * Generate alphabetical index of all elements 1318 * 1319 * @see $elements, walk() 1320 */ 1321 function generateElementIndex() 1322 { 1323 $elementindex = array(); 1324 $letters = array(); 1325 $used = array(); 1326 foreach($this-> elements as $letter => $nutoh) 1327 { 1328 foreach($this-> elements[$letter] as $i => $yuh) 1329 { 1330 if ($this-> elements[$letter][$i]-> type != 'include') 1331 { 1332 if (!isset($used[$letter])) 1333 { 1334 $letters[]['letter'] = $letter; 1335 $elindex['letter'] = $letter; 1336 $used[$letter] = 1; 1337 } 1338 1339 $elindex['index'][] = $this-> getIndexInformation($this> elements[$letter][$i]); 1340 } 1341 } 1342 if (isset($elindex['index'])) 1343 { 1344 $elementindex[] = $elindex; 1345 } else 1346 { 1347 unset($letters[count($letters) - 1]); 1348 } 1349 $elindex = array(); 1350 } 1351 return array($elementindex,$letters); 1352 } 1353 1354 function setTemplateDir($dir) 1355 { 1356 Converter::setTemplateDir($dir); 1357 $this-> smarty_dir = $this-> templateDir; 1358 } 1359 1360 function copyMediaRecursively($media,$targetdir,$subdir = '') 1361 { 1362 $versionControlDirectories = array ('CVS', 'media/CVS', 'media\\CVS', '.svn', 'media/.svn', 'media\\.svn'); 1363 if (!is_array($media)) { 1364 return; 1365 } 1366 foreach($media as $dir => $files) 1367 { 1368 if ($dir === '/') 1369 { 1370 $this-> copyMediaRecursively($files,$targetdir); 1371 } else 1372 { 1373 if (!is_numeric($dir)) 1374 { 1375 if (in_array($dir, $versionControlDirectories)) 1376 { 1377 // skip it entirely 1378 } 1379 else 1380 { 1381 // create the subdir 1382 phpDocumentor_out(" creating $targetdir" . PATH_DELIMITER . " $dir\n" ); 1383 Converter::setTargetDir($targetdir . PATH_DELIMITER . $dir); 1384 if (!empty($subdir)) 1385 { 1386 $subdir .= PATH_DELIMITER; 1387 } 1388 $this> copyMediaRecursively($files," $targetdir/$dir" ,$subdir . $dir); 1389 } 1390 } 1391 else

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1052 of 1382

1392 { 1393 // copy the file 1394 phpDocumentor_out(" copying $targetdir" . PATH_DELIMITER . $files['file']."\n" ); 1395 $this-> copyFile($files['file'],$subdir); 1396 } 1397 } 1398 } 1399 } 1400 1401 /** 1402 * calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied 1403 * @see Converter::setTargetDir() 1404 */ 1405 function setTargetDir($dir) 1406 { 1407 Converter::setTargetDir($dir); 1408 if ($this-> wrote) return; 1409 $this-> wrote = true; 1410 $template_images = array(); 1411 $stylesheets = array(); 1412 $tdir = $dir; 1413 $dir = $this-> templateDir; 1414 $this-> templateDir = $this-> templateDir.'templates/'; 1415 $info = new Io; 1416 $this-> copyMediaRecursively($info-> getDirTree($this-> templateDir.'media',$this> templateDir),$tdir); 1417 } 1418 1419 /** 1420 * Generate alphabetical index of all elements by package and subpackage 1421 * 1422 * @param string $package name of a package 1423 * @see $pkg_elements, walk(), generatePkgElementIndexes() 1424 */ 1425 function generatePkgElementIndex($package) 1426 { 1427 // var_dump($this->pkg_elements[$package]); 1428 $elementindex = array(); 1429 $letters = array(); 1430 $letterind = array(); 1431 $used = array(); 1432 $subp = ''; 1433 foreach($this-> pkg_elements[$package] as $subpackage => $els) 1434 { 1435 if (empty($els)) continue; 1436 if (!empty($subpackage)) $subp = " (<b>subpackage:</b> $subpackage)" ; else $subp = ''; 1437 foreach($els as $letter => $yuh) 1438 { 1439 foreach($els[$letter] as $i => $yuh) 1440 { 1441 if ($els[$letter][$i]-> type != 'include') 1442 { 1443 if (!isset($used[$letter])) 1444 { 1445 $letters[]['letter'] = $letter; 1446 $letterind[$letter] = count($letters) - 1; 1447 $used[$letter] = 1; 1448 } 1449 $elindex[$letter]['letter'] = $letter; 1450 1451 $elindex[$letter]['index'][] = $this> getIndexInformation($els[$letter][$i]); 1452 } 1453 } 1454 } 1455 } 1456 ksort($elindex); 1457 usort($letters,'CHMdefault_lettersort'); 1458 if (isset($elindex)) 1459 { 1460 while(list($letter,$tempel) = each($elindex)) 1461 { 1462 if (!isset($tempel)) 1463 { 1464 unset($letters[$letterind[$tempel['letter']]]); 1465 } else 1466 $elementindex[] = $tempel;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1053 of 1382

1467 } 1468 } else $letters = array(); 1469 return array($elementindex,$letters); 1470 } 1471 1472 /** 1473 * 1474 * @see generatePkgElementIndex() 1475 */ 1476 function generatePkgElementIndexes() 1477 { 1478 $packages = array(); 1479 $package_names = array(); 1480 $pkg = array(); 1481 $letters = array(); 1482 foreach($this-> pkg_elements as $package => $trash) 1483 { 1484 $pkgs['package'] = $package; 1485 $pkg['package'] = $package; 1486 list($pkg['pindex'],$letters[$package]) = $this> generatePkgElementIndex($package); 1487 if (count($pkg['pindex'])) 1488 { 1489 $packages[] = $pkg; 1490 $package_names[] = $pkgs; 1491 } 1492 unset($pkgs); 1493 unset($pkg); 1494 } 1495 foreach($packages as $i => $package) 1496 { 1497 $pnames = array(); 1498 for($j=0;$j< count($package_names);$j++) 1499 { 1500 if ($package_names[$j]['package'] != $package['package']) $pnames[] = $package_names[$j]; 1501 } 1502 $packages[$i]['packageindexes'] = $pnames; 1503 } 1504 return array($packages,$package_names,$letters); 1505 } 1506 1507 /** 1508 * @param string name of class 1509 * @param string package name 1510 * @param string full path to look in (used in index generation) 1511 * @param boolean deprecated 1512 * @param boolean return just the URL, or enclose it in an html a tag 1513 * @return mixed false if not found, or an html a link to the class's documentation 1514 * @see parent::getClassLink() 1515 */ 1516 function getClassLink($expr,$package, $file = false,$text = false, $with_a = true) 1517 { 1518 $a = Converter::getClassLink($expr,$package,$file); 1519 if (!$a) return false; 1520 return $this-> returnSee($a, $text, $with_a); 1521 } 1522 1523 /** 1524 * @param string name of function 1525 * @param string package name 1526 * @param string full path to look in (used in index generation) 1527 * @param boolean deprecated 1528 * @param boolean return just the URL, or enclose it in an html a tag 1529 * @return mixed false if not found, or an html a link to the function's documentation 1530 * @see parent::getFunctionLink() 1531 */ 1532 function getFunctionLink($expr,$package, $file = false,$text = false) 1533 { 1534 $a = Converter::getFunctionLink($expr,$package,$file); 1535 if (!$a) return false; 1536 return $this-> returnSee($a, $text); 1537 } 1538 1539 /** 1540 * @param string name of define 1541 * @param string package name 1542 * @param string full path to look in (used in index generation) 1543 * @param boolean deprecated 1544 * @param boolean return just the URL, or enclose it in an html a tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1054 of 1382

1545 * @return mixed false if not found, or an html a link to the define's documentation 1546 * @see parent::getDefineLink() 1547 */ 1548 function getDefineLink($expr,$package, $file = false,$text = false) 1549 { 1550 $a = Converter::getDefineLink($expr,$package,$file); 1551 if (!$a) return false; 1552 return $this-> returnSee($a, $text); 1553 } 1554 1555 /** 1556 * @param string name of global variable 1557 * @param string package name 1558 * @param string full path to look in (used in index generation) 1559 * @param boolean deprecated 1560 * @param boolean return just the URL, or enclose it in an html a tag 1561 * @return mixed false if not found, or an html a link to the global variable's documentation 1562 * @see parent::getGlobalLink() 1563 */ 1564 function getGlobalLink($expr,$package, $file = false,$text = false) 1565 { 1566 $a = Converter::getGlobalLink($expr,$package,$file); 1567 if (!$a) return false; 1568 return $this-> returnSee($a, $text); 1569 } 1570 1571 /** 1572 * @param string name of procedural page 1573 * @param string package name 1574 * @param string full path to look in (used in index generation) 1575 * @param boolean deprecated 1576 * @param boolean return just the URL, or enclose it in an html a tag 1577 * @return mixed false if not found, or an html a link to the procedural page's documentation 1578 * @see parent::getPageLink() 1579 */ 1580 function getPageLink($expr,$package, $path = false,$text = false) 1581 { 1582 $a = Converter::getPageLink($expr,$package,$path); 1583 if (!$a) return false; 1584 return $this-> returnSee($a, $text); 1585 } 1586 1587 /** 1588 * @param string name of method 1589 * @param string class containing method 1590 * @param string package name 1591 * @param string full path to look in (used in index generation) 1592 * @param boolean deprecated 1593 * @param boolean return just the URL, or enclose it in an html a tag 1594 * @return mixed false if not found, or an html a link to the method's documentation 1595 * @see parent::getMethodLink() 1596 */ 1597 function getMethodLink($expr,$class,$package, $file = false,$text = false) 1598 { 1599 $a = Converter::getMethodLink($expr,$class,$package,$file); 1600 if (!$a) return false; 1601 return $this-> returnSee($a, $text); 1602 } 1603 1604 /** 1605 * @param string name of var 1606 * @param string class containing var 1607 * @param string package name 1608 * @param string full path to look in (used in index generation) 1609 * @param boolean deprecated 1610 * @param boolean return just the URL, or enclose it in an html a tag 1611 * @return mixed false if not found, or an html a link to the var's documentation 1612 * @see parent::getVarLink() 1613 */ 1614 function getVarLink($expr,$class,$package, $file = false,$text = false) 1615 { 1616 $a = Converter::getVarLink($expr,$class,$package,$file); 1617 if (!$a) return false; 1618 return $this-> returnSee($a, $text); 1619 } 1620 1621 /** 1622 * @param string name of class constant

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1055 of 1382

1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702

* @param string class containing class constant * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @param boolean return just the URL, or enclose it in an html a tag * @return mixed false if not found, or an html a link to the var's documentation * @see parent::getVarLink() */ function getConstLink($expr,$class,$package, $file = false,$text = false) { $a = Converter::getConstLink($expr,$class,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * does a nat case sort on the specified second level value of the array * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); return strnatcasecmp($aa, $bb); } /** * does a nat case sort on the specified second level value of the array. * this one puts constructors first * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp1 ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); if (strpos($aa,'CONSTRUCTOR') === 0) { return -1; } if (strpos($bb,'CONSTRUCTOR') === 0) { return 1; } if (strpos($aa,strtoupper($this-> class)) === 0) { return -1; } if (strpos($bb,strtoupper($this-> class)) === 0) { return -1; } return strnatcasecmp($aa, $bb); } /** * Write a file to disk, and add it to the {@link $hhp_files} list of files * to include in the generated CHM * * {@source } */ function writefile($file,$contents) { $this-> addHHP($this-> targetDir . PATH_DELIMITER . $file); Converter::writefile($file,$contents); } /** * @uses $hhp_files creates the array by adding parameter $file */ function addHHP($file) { $file = str_replace($this-> base_dir . PATH_DELIMITER, '', $file);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1056 of 1382

1703 $file = str_replace('\\',PATH_DELIMITER,$file); 1704 $file = str_replace('//',PATH_DELIMITER,$file); 1705 $file = str_replace(PATH_DELIMITER,'\\',$file); 1706 $this-> hhp_files[]['name'] = $file; 1707 } 1708 1709 function generateTOC() 1710 { 1711 $comppack = ''; 1712 $templ = & $this-> newSmarty(); 1713 foreach($this-> TOC as $package => $TOC1) 1714 { 1715 $comp_subs = ''; 1716 $comp_subs1 = false; 1717 foreach($TOC1 as $subpackage => $types) 1718 { 1719 $comp_types = ''; 1720 foreach($types as $type => $files) 1721 { 1722 $comp = ''; 1723 $templ1 = & $this-> newSmarty(); 1724 $templ1-> assign('entry', array()); 1725 foreach($files as $file) 1726 { 1727 // use book icon for classes 1728 if ($type == 'Classes') { 1729 $templ1-> append('entry', array('paramname' => $file[0],'outputfile' => $file[1],'isclass' => 1)); 1730 } else { 1731 $templ1-> append('entry', array('paramname' => $file[0],'outputfile' => $file[1])); 1732 } 1733 } 1734 $templ = & $this-> newSmarty(); 1735 $templ-> assign('tocsubentries',$templ1-> fetch('tocentry.tpl')); 1736 $templ-> assign('entry', array(array('paramname' => $type))); 1737 $comp_types .= $templ-> fetch('tocentry.tpl'); 1738 } 1739 if (!empty($subpackage)) 1740 { 1741 $templ = & $this-> newSmarty(); 1742 $templ-> assign('tocsubentries',$comp_types); 1743 $templ-> assign('entry', array(array('paramname' => $subpackage))); 1744 $comp_subs .= $templ-> fetch('tocentry.tpl'); 1745 } else 1746 { 1747 $comp_subs1 = $comp_types; 1748 } 1749 } 1750 if ($comp_subs1) 1751 $templ-> assign('tocsubentries',$comp_subs1); 1752 if (!empty($comp_subs)) 1753 $templ-> assign('entry', array(array('paramname' => $package, 'tocsubentries' => $comp_subs))); 1754 else 1755 $templ-> assign('entry', array(array('paramname' => $package))); 1756 $comppack .= $templ-> fetch('tocentry.tpl'); 1757 } 1758 return $comppack; 1759 } 1760 1761 function addSourceTOC($name, $file, $package, $subpackage, $source = false) 1762 { 1763 $file = str_replace($this-> base_dir . PATH_DELIMITER, '', $this-> targetDir) 1764 . PATH_DELIMITER . $file . '.html'; 1765 $file = str_replace('\\',PATH_DELIMITER,$file); 1766 $file = str_replace('//',PATH_DELIMITER,$file); 1767 $file = str_replace(PATH_DELIMITER,'\\',$file); 1768 $sub = $source ? 'Source Code' : 'Examples'; 1769 $this-> TOC[$package][$subpackage][$sub][] = array($name, $file); 1770 } 1771 1772 function addTOC($name,$file,$package,$subpackage,$class = false,$tutorial = false) 1773 { 1774 $file = str_replace($this-> base_dir . PATH_DELIMITER, '', $this-> targetDir . PATH_DELIMITER) 1775 . $file . '.html'; 1776 $file = str_replace('\\',PATH_DELIMITER,$file); 1777 $file = str_replace('//',PATH_DELIMITER,$file); 1778 $file = str_replace(PATH_DELIMITER,'\\',$file);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1057 of 1382

1779 $file = str_replace($this-> base_dir . '\\', '', $file); 1780 $sub = $class ? 'Classes' : 'Files'; 1781 if ($tutorial) $sub = 'Manual'; 1782 $this-> TOC[$package][$subpackage][$sub][] = array($name,$file); 1783 } 1784 1785 /** 1786 * Add an item to the index.hhk file 1787 * @param string $name index entry name 1788 * @param string $file filename containing index 1789 * @param string $bookmark html anchor of location in file, if any 1790 * @param string $group group this entry with a string 1791 * @uses $KLinks tracks the index 1792 * @author Andrew Eddie <[email protected]> 1793 */ 1794 function addKLink($name, $file, $bookmark='', $group='') 1795 { 1796 $file = $file . '.html'; 1797 $file = str_replace('\\',PATH_DELIMITER,$file); 1798 $file = str_replace('//',PATH_DELIMITER,$file); 1799 $file = str_replace(PATH_DELIMITER,'\\',$file); 1800 // debug("added $name, $file, $bookmark, $group "); 1801 $link = $file; 1802 $link .= $bookmark ? " #$bookmark" :''; 1803 if ($group) { 1804 $this-> KLinks[$group]['grouplink'] = $file; 1805 $this-> KLinks[$group][] = array($name,$link); 1806 } 1807 $this-> KLinks[] = array($name,$link); 1808 } 1809 1810 /** 1811 * Get the table of contents for index.hhk 1812 * @return string contents of tocentry.tpl generated from $KLinks 1813 * @author Andrew Eddie <[email protected]> 1814 */ 1815 function generateKLinks() 1816 { 1817 $templ = & $this-> newSmarty(); 1818 $templ-> assign('entry', array()); 1819 foreach($this-> KLinks as $group=> $link) 1820 { 1821 if (isset($link['grouplink'])) { 1822 $templg = & $this-> newSmarty(); 1823 $templg-> assign('entry', array()); 1824 foreach($link as $k=> $sublink) 1825 { 1826 if ($k != 'grouplink') { 1827 $templg-> append('entry', array('paramname' => $sublink[0],'outputfile' => $sublink[1])); 1828 } 1829 } 1830 $templ-> append('entry', array('paramname' => $group, 'outputfile' => $link['grouplink'], 'tocsubentries' => $templg-> fetch('tocentry.tpl') )); 1831 } else { 1832 $templ-> append('entry', array('paramname' => $link[0],'outputfile' => $link[1])); 1833 } 1834 } 1835 return $templ-> fetch('tocentry.tpl'); 1836 } 1837 1838 /** 1839 * Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler 1840 * to create a CHM file 1841 * 1842 * The output function generates the table of contents (contents.hhc) 1843 * and file list (phpdoc.hhp) files used to create a .CHM by the 1844 * free MS HTML Help compiler. 1845 * {@internal 1846 * Using {@link $hhp_files}, a list of all separate .html files 1847 * is created in CHM format, and written to phpdoc.hhp. This list was 1848 * generated by {@link writefile}. 1849 * 1850 * Next, a call to the table of contents: 1851 * 1852 * {@source 12 2} 1853 * 1854 * finishes things off}}} 1855 * @todo use to directly call html help compiler hhc.exe

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1058 of 1382

1856 * @link http://www.microsoft.com/downloads/release.asp?releaseid=33071 1857 * @uses generateTOC() assigns to the toc template variable 1858 */ 1859 function Output() 1860 { 1861 $templ = & $this-> newSmarty(); 1862 $templ-> assign('files',$this-> hhp_files); 1863 $this-> setTargetDir($this-> base_dir); 1864 Converter::writefile('phpdoc.hhp',$templ-> fetch('hhp.tpl')); 1865 $templ = & $this-> newSmarty(); 1866 $templ-> assign('toc',$this-> generateTOC()); 1867 Converter::writefile('contents.hhc',$templ-> fetch('contents.hhc.tpl')); 1868 $templ-> assign('klinks',$this-> generateKLinks()); 1869 Converter::writefile('index.hhk',$templ-> fetch('index.hhk.tpl')); 1870 phpDocumentor_out("NOTE: to create the documentation.chm file, you must now run Microsoft Help Workshop on phpdoc.hhp\n" ); 1871 phpDocumentor_out("To get the free Microsoft Help Workshop, browse to: http://go.microsoft.com/fwlink/?LinkId=14188\n" ); 1872 flush(); 1873 } 1874 } 1875 1876 /** 1877 * @access private 1878 * @global string name of the package to set as the first package 1879 */ 1880 function CHMdefault_pindexcmp($a, $b) 1881 { 1882 global $phpDocumentor_DefaultPackageName; 1883 if ($a['title'] == $phpDocumentor_DefaultPackageName) return -1; 1884 if ($b['title'] == $phpDocumentor_DefaultPackageName) return 1; 1885 return strnatcasecmp($a['title'],$b['title']); 1886 } 1887 1888 /** @access private */ 1889 function CHMdefault_lettersort($a, $b) 1890 { 1891 return strnatcasecmp($a['letter'],$b['letter']); 1892 } 1893 1894 /** @access private */ 1895 function CHMdefault_outputfilter($src, & $smarty) 1896 { 1897 return str_replace('{$subdir}',$smarty-> _tpl_vars['subdir'],$src); 1898 } 1899 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1059 of 1382

File Source for HTMLframesConverter.inc


Documentation for this file is available at HTMLframesConverter.inc
1 <?php 2 /** 3 * HTML original framed output converter, modified to use Smarty Template. 4 * This Converter takes output from the {@link Parser} and converts it to HTML-ready output for use with {@link Smarty}. 5 * 6 * phpDocumentor :: automatic documentation generator 7 * 8 * PHP versions 4 and 5 9 * 10 * Copyright (c) 2002-2006 Gregory Beaver 11 * 12 * LICENSE: 13 * 14 * This library is free software; you can redistribute it 15 * and/or modify it under the terms of the GNU Lesser General 16 * Public License as published by the Free Software Foundation; 17 * either version 2.1 of the License, or (at your option) any 18 * later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free Software 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 * 29 * @package Converters 30 * @subpackage HTMLframes 31 * @author Gregory Beaver <[email protected]> 32 * @copyright 2002-2006 Gregory Beaver 33 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 34 * @version CVS: $Id: HTMLframesConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ 35 * @filesource 36 * @link http://www.phpdoc.org 37 * @link http://pear.php.net/PhpDocumentor 38 * @see parserDocBlock, parserInclude, parserPage, parserClass 39 * @see parserDefine, parserFunction, parserMethod, parserVar 40 * @since 1.2 41 */ 42 /** 43 * HTML output converter. 44 * This Converter takes output from the {@link Parser} and converts it to HTML-ready output for use with {@link Smarty}. 45 * 46 * @package Converters 47 * @subpackage HTMLframes 48 * @see parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar 49 * @author Greg Beaver <[email protected]> 50 * @since 1.2 51 * @version $Id: HTMLframesConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ 52 */ 53 class HTMLframesConverter extends Converter 54 { 55 /** 56 * This converter knows about the new root tree processing 57 * In order to fix PEAR Bug #6389 58 * @var boolean 59 */ 60 var $processSpecialRoots = true; 61 /** 62 * Smarty Converter wants elements sorted by type as well as alphabetically 63 * @see Converter::$sort_page_contents_by_type 64 * @var boolean

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1060 of 1382

65 */ 66 var $sort_page_contents_by_type = true; 67 /** @var string */ 68 var $outputformat = 'HTML'; 69 /** @var string */ 70 var $name = 'frames'; 71 /** 72 * indexes of elements by package that need to be generated 73 * @var array 74 */ 75 var $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false); 76 77 /** 78 * output directory for the current procedural page being processed 79 * @var string 80 */ 81 var $page_dir; 82 83 /** 84 * target directory passed on the command-line. 85 * {@link $targetDir} is malleable, always adding package/ and package/subpackage/ subdirectories onto it. 86 * @var string 87 */ 88 var $base_dir; 89 90 /** 91 * output directory for the current class being processed 92 * @var string 93 */ 94 var $class_dir; 95 96 /** 97 * array of converted package page names. 98 * Used to link to the package page in the left index 99 * @var array Format: array(package => 1) 100 */ 101 var $package_pages = array(); 102 103 /** 104 * controls formatting of parser informative output 105 * 106 * Converter prints: 107 * "Converting /path/to/file.php... Procedural Page Elements... Classes..." 108 * Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there 109 * is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that 110 * and is purely cosmetic 111 * @var boolean 112 */ 113 var $juststarted = false; 114 115 /** 116 * contains all of the template procedural page element loop data needed for the current template 117 * @var array 118 */ 119 var $current; 120 121 /** 122 * contains all of the template class element loop data needed for the current template 123 * @var array 124 */ 125 var $currentclass; 126 var $wrote = false; 127 var $ric_set = array(); 128 129 /** 130 * sets {@link $base_dir} to $targetDir 131 * @see Converter() 132 */ 133 function HTMLframesConverter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) 134 { 135 Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title); 136 $this-> base_dir = $targetDir; 137 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1061 of 1382

138 139 /** 140 * @deprecated in favor of PHP 4.3.0+ tokenizer-based source highlighting 141 */ 142 function unmangle($sourcecode) 143 { 144 $sourcecode = str_replace('<code>' ,'<pre>' ,$sourcecode); 145 $sourcecode = str_replace('</code>' ,'</pre>' ,$sourcecode); 146 $sourcecode = str_replace('<br />' ,"\n" ,$sourcecode); 147 $sourcecode = str_replace('&nbsp;' ,' ',$sourcecode); 148 $sourcecode = str_replace('&lt;' ,'<' ,$sourcecode); 149 $sourcecode = str_replace('&gt;' ,'>' ,$sourcecode); 150 $sourcecode = str_replace('&amp;' ,'&' ,$sourcecode); 151 return $sourcecode; 152 } 153 154 /** 155 * @param string full path to the source file 156 * @param string fully highlighted source code 157 */ 158 function writeSource($path, $value) 159 { 160 $templ = & $this-> newSmarty(); 161 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this); 162 $templ-> assign('source',$value); 163 $templ-> assign('package',$pathinfo['package']); 164 $templ-> assign('subpackage',$pathinfo['subpackage']); 165 $templ-> assign('name',$pathinfo['name']); 166 $templ-> assign('source_loc',$pathinfo['source_loc']); 167 $templ-> assign('docs',$pathinfo['docs']); 168 $templ-> assign("subdir" ,'../'); 169 $templ-> register_outputfilter('HTMLframes_outputfilter'); 170 $this-> setTargetDir($this-> getFileSourcePath($this-> base_dir)); 171 phpDocumentor_out("\n" ); 172 $this-> setSourcePaths($path); 173 $this-> writefile($this-> getFileSourceName($path).'.html',$templ> fetch('filesource.tpl')); 174 } 175 176 function writeExample($title, $path, $source) 177 { 178 $templ = & $this-> newSmarty(); 179 $templ-> assign('source',$source); 180 if (empty($title)) 181 { 182 $title = 'example'; 183 addWarning(PDERROR_EMPTY_EXAMPLE_TITLE, $path, $title); 184 } 185 $templ-> assign('title',$title); 186 $templ-> assign('file',$path); 187 $templ-> assign("subdir" ,'../'); 188 $templ-> register_outputfilter('HTMLframes_outputfilter'); 189 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . '__examplesource'); 190 phpDocumentor_out("\n" ); 191 $this-> writefile('exsource_'.$path.'.html',$templ-> fetch('examplesource.tpl')); 192 } 193 194 function getExampleLink($path, $title) 195 { 196 return $this-> returnLink('{$subdir}__examplesource' . PATH_DELIMITER . 'exsource_'.$path.'.html',$title); 197 } 198 199 function getSourceLink($path) 200 { 201 return $this-> returnLink('{$subdir}__filesource/' . 202 $this-> getFileSourceName($path).'.html','Source Code for this file'); 203 } 204 205 /** 206 * Retrieve a Converter-specific anchor to a segment of a source code file 207 * parsed via a {@tutorial tags.filesource.pkg} tag. 208 * @param string full path to source file 209 * @param string name of anchor 210 * @param string link text, if this is a link 211 * @param boolean returns either a link or a destination based on this 212 * parameter 213 * @return string link to an anchor, or the anchor 214 */ 215 function getSourceAnchor($sourcefile,$anchor,$text = '',$link = false)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1062 of 1382

216 { 217 if ($link) { 218 return $this-> returnLink('{$subdir}__filesource/' . 219 $this-> getFileSourceName($sourcefile) . '.html#a' . $anchor, $text); 220 } else { 221 return '<a name="a' .$anchor.'"></a>' ; 222 } 223 } 224 225 /** 226 * Return a line of highlighted source code with formatted line number 227 * 228 * If the $path is a full path, then an anchor to the line number will be 229 * added as well 230 * @param integer line number 231 * @param string highlighted source code line 232 * @param false|stringfull path to @filesource file this line is a part of, 233 * if this is a single line from a complete file. 234 * @return string formatted source code line with line number 235 */ 236 function sourceLine($linenumber, $line, $path = false) 237 { 238 $extra = ''; 239 if (strlen(str_replace("\n" , '', $line)) == 0) { 240 $extra = '&nbsp;' ; 241 } 242 if ($path) 243 { 244 return '<li><div class="src-line">' . $this> getSourceAnchor($path, $linenumber) . 245 str_replace("\n" ,'',$line) . $extra . 246 "</div></li>\n" ; 247 } else 248 { 249 return '<li><div class="src-line">' . str_replace("\n" ,'',$line) . 250 " $extra</div></li>\n " ; 251 } 252 } 253 254 /** 255 * Used to convert the <<code>> tag in a docblock 256 * @param string 257 * @param boolean 258 * @return string 259 */ 260 function ProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 261 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 262 { 263 return '<div class="src-code"><ol>' . parent::ProgramExample($example, $tutorial, $inlinesourceparse, $class, $linenum, $filesourcepath) 264 .'</ol></div>' ; 265 } 266 267 /** 268 * @param string 269 */ 270 function TutorialExample($example) 271 { 272 $trans = $this-> template_options['desctranslate']; 273 $this-> template_options['desctranslate'] = array(); 274 $example = '<ol>' . parent::TutorialExample($example) 275 .'</ol>' ; 276 $this-> template_options['desctranslate'] = $trans; 277 if (!isset($this-> template_options['desctranslate'])) return $example; 278 if (!isset($this-> template_options['desctranslate']['code'])) return $example; 279 $example = $this-> template_options['desctranslate']['code'] . $example; 280 if (!isset($this-> template_options['desctranslate']['/code'])) return $example; 281 return $example . $this-> template_options['desctranslate']['/code']; 282 } 283 284 function getCurrentPageLink() 285 { 286 return $this-> curname . '.html'; 287 } 288 289 /** 290 * Uses htmlspecialchars() on the input 291 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1063 of 1382

292 function postProcess($text) 293 { 294 if ($this-> highlightingSource) { 295 return str_replace(array(' ',"\t" ), array('&nbsp;' , '&nbsp;&nbsp;&nbsp;' ), 296 htmlspecialchars($text)); 297 } 298 return htmlspecialchars($text); 299 } 300 301 /** 302 * Use the template tutorial_toc.tpl to generate a table of contents for HTML 303 * @return string table of contents formatted for use in the current output format 304 * @param array format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...) 305 */ 306 function formatTutorialTOC($toc) 307 { 308 $template = & $this-> newSmarty(); 309 $template-> assign('toc',$toc); 310 return $template-> fetch('tutorial_toc.tpl'); 311 } 312 313 function & SmartyInit(& $templ) 314 { 315 if (!isset($this-> package_index)) 316 foreach($this-> all_packages as $key => $val) 317 { 318 if (isset($this-> pkg_elements[$key])) 319 { 320 if (!isset($start)) $start = $key; 321 $this-> package_index[] = array('link' => " li_$key.html" , 'title' => $key); 322 } 323 } 324 $templ-> assign("packageindex" ,$this-> package_index); 325 $templ-> assign("subdir" ,''); 326 return $templ; 327 } 328 329 /** 330 * Writes out the template file of {@link $class_data} and unsets the template to save memory 331 * @see registerCurrentClass() 332 * @see parent::endClass() 333 */ 334 function endClass() 335 { 336 $a = '../'; 337 if (!empty($this-> subpackage)) $a .= '../'; 338 if ($this-> juststarted) 339 { 340 $this-> juststarted = false; 341 phpDocumentor_out("\n" ); 342 flush(); 343 } 344 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 345 $this-> class_data-> assign("subdir" ,$a); 346 $this-> class_data-> register_outputfilter('HTMLframes_outputfilter'); 347 $this-> writefile($this-> class . '.html',$this-> class_data> fetch('class.tpl')); 348 unset($this-> class_data); 349 } 350 351 /** 352 * Writes out the template file of {@link $page_data} and unsets the template to save memory 353 * @see registerCurrent() 354 * @see parent::endPage() 355 */ 356 function endPage() 357 { 358 $this-> package = $this-> curpage-> package; 359 $this-> subpackage = $this-> curpage-> subpackage; 360 $a = '../'; 361 if (!empty($this-> subpackage)) $a .= '../'; 362 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 363 $this-> page_data-> assign("package" ,$this-> package); 364 $this-> page_data-> assign("subdir" ,$a); 365 $this-> page_data-> register_outputfilter('HTMLframes_outputfilter'); 366 $this-> writefile($this-> page . '.html',$this-> page_data-> fetch('page.tpl'));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1064 of 1382

367 unset($this-> page_data); 368 } 369 370 /** 371 * @param string 372 * @param string 373 * @return string &lt;a href="'.$link.'">'.$text.'</a&gt; 374 */ 375 function returnLink($link,$text) 376 { 377 return '<a href="' .$link.'">' .$text.'</a>' ; 378 } 379 380 function makeLeft() 381 { 382 foreach($this-> page_elements as $package => $o1) 383 { 384 foreach($o1 as $subpackage => $links) 385 { 386 for($i=0;$i< count($links);$i++) 387 { 388 $left[$package][$subpackage]['files'][] = 389 array("link" => $this-> getId($links[$i]), "title" => $links[$i]-> name); 390 } 391 } 392 } 393 $interfaces = $classes = false; 394 foreach($this-> class_elements as $package => $o1) 395 { 396 foreach($o1 as $subpackage => $links) 397 { 398 for($i=0;$i< count($links);$i++) 399 { 400 $class = $this-> classes-> getClassByPackage($links[$i]-> name, $links[$i]-> package); 401 $isinterface = $isclass = false; 402 if ($class-> isInterface()) { 403 $isinterface = true; 404 $interfaces = true; 405 } else { 406 $isclass = true; 407 $classes = true; 408 } 409 if ($class && isset( $class-> docblock) && $class> docblock-> hasaccess) { 410 $left[$package][$subpackage]['classes'][] = 411 array("link" => $this-> getId($links[$i]), 412 "title" => $links[$i]-> name, 413 'is_interface' => $isinterface, 414 'is_class' => $isclass, 415 "access" => $class-> docblock> tags['access'][0]-> value, 416 "abstract" => isset ( $class-> docblock> tags['abstract'][0])); 417 } else { 418 $left[$package][$subpackage]['classes'][] = 419 array("link" => $this-> getId($links[$i]), 420 "title" => $links[$i]-> name, 421 'is_interface' => $isinterface, 422 'is_class' => $isclass, 423 "access" => 'public', 424 "abstract" => isset ( $class-> docblock> tags['abstract'][0])); 425 } 426 } 427 } 428 } 429 foreach($this-> function_elements as $package => $o1) 430 { 431 foreach($o1 as $subpackage => $links) 432 { 433 for($i=0;$i< count($links);$i++) 434 { 435 $left[$package][$subpackage]['functions'][] = 436 array("link" => $this-> getId($links[$i]), "title" => $links[$i]-> name); 437 } 438 } 439 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1065 of 1382

440 $ret = array(); 441 foreach($left as $package => $r) 442 { 443 $pd = 'blank'; 444 if (isset($this-> package_pages[$package])) $pd = $package.'/package_'.$package.'.html'; 445 if (!isset($r[''])) 446 { 447 $pt = false; 448 $ptnoa = false; 449 $ptt = $package; 450 if ($t = $this-> hasTutorial('pkg',$package,$package,'')) 451 { 452 $pt = $t-> getLink($this); 453 $ptnoa = $this-> getId($t-> getLink($this,true)); 454 $ptt = $t-> getTitle($this); 455 } 456 $tutes = array(); 457 foreach($this-> tutorial_tree as $root => $tr) 458 { 459 if ($tr['tutorial']-> package == $package && $tr['tutorial']> subpackage == '') { 460 $tutes[$tr['tutorial']-> tutorial_type][] = 461 $this-> getTutorialTree($tr['tutorial']); 462 } 463 } 464 if (isset($this-> childless_tutorials[$package][$subpackage])) 465 { 466 foreach($this-> childless_tutorials[$package][$subpackage] as $ext => $other) 467 { 468 foreach($other as $tutorial) 469 { 470 $tutes[$tutorial-> tutorial_type][] = $this> getTutorialTree($tutorial); 471 } 472 } 473 } 474 $ret[$package][] = 475 array( 476 'package' => $package, 477 'subpackage' => '', 478 'packagedoc' => $pd, 479 'packagetutorial' => $pt, 480 'packagetutorialnoa' => $ptnoa, 481 'packagetutorialtitle' => $ptt, 482 'files' => array(), 483 'functions' => array(), 484 'classes' => array(), 485 'tutorials' => $tutes, 486 ); 487 } 488 foreach($r as $subpackage => $info) 489 { 490 $my = array(); 491 $my['package'] = $package; 492 if (isset($this-> package_pages[$package])) 493 $my['packagedoc'] = $pd; 494 else 495 $my['packagedoc'] = 'blank'; 496 $my['subpackage'] = $subpackage; 497 if (empty($subpackage)) 498 { 499 if ($t = $this-> hasTutorial('pkg',$package,$package,$subpackage)) 500 { 501 $my['packagetutorial'] = $t-> getLink($this); 502 $my['packagetutorialnoa'] = $this-> getId($t-> getLink($this,true)); 503 $my['packagetutorialtitle'] = $t-> getTitle($this); 504 } else 505 { 506 $my['packagetutorial'] = '<a href="blank.html">No Package-Level Tutorial</a>' ; 507 $my['packagetutorialnoa'] = 'blank.html'; 508 $my['packagetutorialtitle'] = $package; 509 } 510 } else 511 { 512 if ($t = $this-> hasTutorial('pkg',$subpackage,$package,$subpackage)) 513 { 514 $my['subpackagetutorial'] = $this-> returnSee($this-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1066 of 1382

> getTutorialLink($t)); 515 $my['subpackagetutorialnoa'] = $this-> getId($t> getLink($this,true)); 516 $my['subpackagetutorialtitle'] = $t-> getTitle($this); 517 } else 518 { 519 $my['subpackagetutorial'] = false; 520 $my['subpackagetutorialnoa'] = false; 521 $my['subpackagetutorialtitle'] = $subpackage; 522 } 523 } 524 $tutes = array(); 525 foreach($this-> tutorial_tree as $root => $tr) 526 { 527 if ($tr['tutorial']-> package == $package && $tr['tutorial']> subpackage == $subpackage) 528 { 529 $tutes[$tr['tutorial']-> tutorial_type][] = $this> getTutorialTree($tr['tutorial']); 530 } 531 } 532 $my['tutorials'] = $tutes; 533 $my['files'] = $my['classes'] = $my['functions'] = array(); 534 if (isset($info['files'])) 535 $my['files'] = $info['files']; 536 if (isset($info['classes'])) 537 $my['classes'] = $info['classes']; 538 $my['hasclasses'] = $classes; 539 $my['hasinterfaces'] = $interfaces; 540 if (isset($info['functions'])) 541 $my['functions'] = $info['functions']; 542 $ret[$package][] = $my; 543 } 544 } 545 return $ret; 546 } 547 548 function getTutorialTree($tutorial,$k = false) 549 { 550 $ret = ''; 551 if (is_object($tutorial)) $tree = parent::getTutorialTree($tutorial); else $tree = $tutorial; 552 // debug($this->vardump_tree($tree));exit; 553 if (!$tree) 554 { 555 $template = & $this-> newSmarty(); 556 $template-> assign('subtree',false); 557 $template-> assign('name',str_replace('.','',$tutorial-> name)); 558 $template-> assign('parent',false); 559 $template-> assign('haskids',false); 560 $template-> assign('kids',''); 561 $link = new tutorialLink; 562 $t = $tutorial; 563 $link-> addLink('',$t-> path,$t-> name,$t-> package,$t-> subpackage,$t> getTitle($this)); 564 $main = array('link' => $this-> getId($link), 'title' => $link-> title); 565 $template-> assign('main',$main); 566 return $template-> fetch('tutorial_tree.tpl'); 567 } 568 if (isset($tree['kids'])) 569 { 570 foreach($tree['kids'] as $subtree) 571 { 572 $ret .= $this-> getTutorialTree($subtree, true); 573 } 574 } 575 $template = & $this-> newSmarty(); 576 $template-> assign('subtree',$k); 577 $template-> assign('name',str_replace('.','',$tree['tutorial']-> name)); 578 $template-> assign('parent',($k ? str_replace('.','',$tree['tutorial']-> parent> name) : false)); 579 $template-> assign('haskids',strlen($ret)); 580 $template-> assign('kids',$ret); 581 $link = new tutorialLink; 582 $t = $tree['tutorial']; 583 $link-> addLink('',$t-> path,$t-> name,$t-> package,$t-> subpackage,$t> getTitle($this)); 584 $main = array('link' => $this-> getId($link), 'title' => $link-> title); 585 $template-> assign('main',$main); 586 $ret = $template-> fetch('tutorial_tree.tpl');

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1067 of 1382

587 return $ret; 588 } 589 590 /** 591 * HTMLdefaultConverter chooses to format both package indexes and the complete index here 592 * 593 * This function formats output for the elementindex.html and pkgelementindex.html template files. It then 594 * writes them to the target directory 595 * @see generateElementIndex(), generatePkgElementIndex() 596 */ 597 function formatPkgIndex() 598 { 599 list($package_indexes,$packages,$mletters) = $this-> generatePkgElementIndexes(); 600 for($i=0;$i< count($package_indexes);$i++) 601 { 602 $template = & $this-> newSmarty(); 603 $this-> package = $package_indexes[$i]['package']; 604 $this-> subpackage = ''; 605 $template-> assign("index" ,$package_indexes[$i]['pindex']); 606 $template-> assign("package" ,$package_indexes[$i]['package']); 607 $template> assign("letters" ,$mletters[$package_indexes[$i]['package']]); 608 $template-> register_outputfilter('HTMLframes_outputfilter'); 609 $this-> setTargetDir($this-> base_dir); 610 $this> writefile('elementindex_'.$package_indexes[$i]['package'].'.html',$template> fetch('pkgelementindex.tpl')); 611 } 612 phpDocumentor_out("\n" ); 613 flush(); 614 } 615 616 /** 617 * HTMLdefaultConverter uses this function to format template index.html and packages.html 618 * 619 * This function generates the package list from {@link $all_packages}, eliminating any 620 * packages that don't have any entries in their package index (no files at all, due to @ignore 621 * or other factors). Then it uses the default package name as the first package index to display. 622 * It sets the right pane to be either a blank file with instructions on making packagelevel docs, 623 * or the package-level docs for the default package. 624 * @global string Used to set the starting package to display 625 */ 626 function formatIndex() 627 { 628 global $phpDocumentor_DefaultPackageName; 629 list($elindex,$mletters) = $this-> generateElementIndex(); 630 $template = & $this-> newSmarty(); 631 $template-> assign("index" ,$elindex); 632 $template-> assign("letters" ,$mletters); 633 $template-> register_outputfilter('HTMLframes_outputfilter'); 634 phpDocumentor_out("\n" ); 635 flush(); 636 $this-> setTargetDir($this-> base_dir); 637 $this-> writefile('elementindex.html',$template-> fetch('elementindex.tpl')); 638 usort($this-> package_index,"HTMLframes_pindexcmp" ); 639 $index = & $this-> newSmarty(); 640 foreach($this-> all_packages as $key => $val) 641 { 642 if (isset($this-> pkg_elements[$key])) 643 { 644 if (!isset($start)) $start = $key; 645 if (!isset($this-> package_pages[$key])) $this-> writeNewPPage($key); 646 } 647 } 648 // Created index.html 649 if (isset($this-> pkg_elements[$phpDocumentor_DefaultPackageName])) $start = $phpDocumentor_DefaultPackageName; 650 $this-> package = $start; 651 $this-> subpackage = ''; 652 $index-> assign("package_count" ,count($this-> pkg_elements)); 653 if (count($this-> ric_set)) 654 $index-> assign("package_count" ,2); 655 $index-> assign("date" ,date("r" ,time())); 656 $index-> assign("title" ,$this-> title); 657 $index-> assign("start" ," li_$start.html" ); 658 $index-> register_outputfilter('HTMLframes_outputfilter');

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1068 of 1382

659 if (isset($this-> tutorials[$start]['']['pkg'][$start . '.pkg'])) 660 { 661 $index-> assign("blank" ,$start.'/tutorial_'.$start.'.pkg'); 662 } elseif (isset($this-> package_pages[$start])) 663 { 664 $index-> assign("blank" ,$start.'/package_'.$start); 665 } 666 else 667 { 668 $index-> assign("blank" ,"blank" ); 669 $blank = & $this-> newSmarty(); 670 $blank-> assign('package',$this-> package); 671 $this-> setTargetDir($this-> base_dir); 672 $this-> writefile("blank.html" ,$blank-> fetch('blank.tpl')); 673 } 674 phpDocumentor_out("\n" ); 675 flush(); 676 $this-> setTargetDir($this-> base_dir); 677 $this-> writefile("index.html" ,$index-> fetch('index.tpl')); 678 679 // Create package index 680 $package = & $this-> newSmarty(); 681 $package-> assign('ric',array()); 682 if (isset($this-> ric_set)) 683 { 684 foreach($this-> ric_set as $name => $u) 685 { 686 $package-> append('ric',array('file' => 'ric_'.$name.'.html','name' => $name)); 687 } 688 } 689 $package-> assign("packages" ,$this-> package_index); 690 $package-> register_outputfilter('HTMLframes_outputfilter'); 691 $this-> writefile("packages.html" ,$package-> fetch('top_frame.tpl')); 692 unset($index); 693 } 694 695 function writeNewPPage($key) 696 { 697 return; 698 $template = & $this-> newSmarty(); 699 $this-> package = $key; 700 $this-> subpackage = ''; 701 $template-> assign("date" ,date("r" ,time())); 702 $template-> assign("title" ,$this-> title); 703 $template-> assign("package" ,$key); 704 $template-> register_outputfilter('HTMLframes_outputfilter'); 705 phpDocumentor_out("\n" ); 706 flush(); 707 $this-> setTargetDir($this-> base_dir); 708 709 $this-> writefile(" li_$key.html" ,$template-> fetch('index.tpl')); 710 unset($template); 711 } 712 713 /** 714 * Generate indexes for li_package.html and classtree output files 715 * 716 * This function generates the li_package.html files from the template file left.html. It does this by 717 * iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve 718 * the pre-sorted {@link abstractLink} descendants needed for index generation. Conversion of these links to 719 * text is done by {@link returnSee()}. The {@link $local} parameter is set to false to ensure that paths are correct. 720 * 721 * Then it uses {@link generateFormattedClassTrees()} to create class trees from the template file classtrees.html. Output 722 * filename is classtrees_packagename.html. This function also unsets {@link $elements} and {@link $pkg_elements} to free 723 * up the considerable memory these two class vars use 724 * @see $page_elements, $class_elements, $function_elements 725 */ 726 function formatLeftIndex() 727 { 728 phpDocumentor_out("\n" ); 729 flush(); 730 $this-> setTargetDir($this-> base_dir); 731 if (0)//!isset($this->left))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1069 of 1382

732 { 733 debug("Nothing parsed, check the command-line" ); 734 die(); 735 } 736 $x = $this-> makeLeft(); 737 foreach($this-> all_packages as $package => $rest) 738 { 739 if (!isset($this-> pkg_elements[$package])) continue; 740 $template = & $this-> newSmarty(); 741 $template-> assign("info" ,$x[$package]); 742 $template-> assign('package',$package); 743 $template-> assign("hastutorials" ,isset($this-> tutorials[$package])); 744 $template-> assign('hastodos',count($this-> todoList)); 745 $template-> assign('todolink','todolist.html'); 746 $template-> assign("classtreepage" ," classtrees_$package" ); 747 $template-> assign("elementindex" ," elementindex_$package" ); 748 $template-> register_outputfilter('HTMLframes_outputfilter'); 749 if (isset($this-> package_pages[$package])) 750 { 751 $template-> assign("packagedoc" ,$package.'/package_' . $package . '.html'); 752 } else 753 { 754 $template-> assign("packagedoc" ,false); 755 } 756 $this-> writefile(" li_$package.html" ,$template> fetch('left_frame.tpl')); 757 758 // Create class tree page 759 $template = & $this-> newSmarty(); 760 $template-> assign("classtrees" ,$this> generateFormattedClassTrees($package)); 761 $template-> assign("interfaces" ,$this> generateFormattedInterfaceTrees($package)); 762 $template-> assign("package" ,$package); 763 $template-> register_outputfilter('HTMLframes_outputfilter'); 764 $this-> writefile(" classtrees_$package.html" ,$template> fetch('classtrees.tpl')); 765 phpDocumentor_out("\n" ); 766 flush(); 767 } 768 // free up considerable memory 769 unset($this-> elements); 770 unset($this-> pkg_elements); 771 } 772 773 /** 774 * This function takes an {@link abstractLink} descendant and returns an html link 775 * 776 * @param abstractLink a descendant of abstractlink should be passed, and never text 777 * @param string text to display in the link 778 * @param boolean this parameter is not used, and is deprecated 779 * @param boolean determines whether the returned text is enclosed in an <a> tag 780 */ 781 function returnSee(& $element, $eltext = false, $with_a = true) 782 { 783 if (!is_object($element) || !$element) return false; 784 if (!$with_a) return $this-> getId($element, false); 785 if (!$eltext) 786 { 787 $eltext = ''; 788 switch($element-> type) 789 { 790 case 'tutorial' : 791 $eltext = strip_tags($element-> title); 792 break; 793 case 'method' : 794 case 'var' : 795 case 'const' : 796 $eltext .= $element-> class.'::'; 797 case 'page' : 798 case 'define' : 799 case 'class' : 800 case 'function' : 801 case 'global' : 802 default : 803 $eltext .= $element-> name; 804 if ($element-> type == 'function' || $element-> type == 'method') $eltext .= '()'; 805 break;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1070 of 1382

806 } 807 } 808 return '<a href="' .$this-> getId($element).'">' .$eltext.'</a>' 809 } 810 811 function getId($element, $fullpath = true) 812 { 813 if (phpDocumentor_get_class($element) == 'parserdata') 814 { 815 $element = $this-> addLink($element-> parent); 816 $elp = $element-> parent; 817 } elseif (is_a($element, 'parserbase')) 818 { 819 $elp = $element; 820 $element = $this-> addLink($element); 821 } 822 $c = ''; 823 if (!empty($element-> subpackage)) 824 { 825 $c = '/'.$element-> subpackage; 826 } 827 $b = '{$subdir}'; 828 switch ($element-> type) 829 { 830 case 'page' : 831 if ($fullpath) 832 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html'; 833 return 'top'; 834 break; 835 case 'define' : 836 case 'global' : 837 case 'function' : 838 if ($fullpath) 839 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html#'.$element> type.$element-> name; 840 return $element-> type.$element-> name; 841 break; 842 case 'class' : 843 if ($fullpath) 844 return $b.$element-> package.$c.'/'.$element-> name.'.html'; 845 return 'top'; 846 break; 847 case 'method' : 848 case 'var' : 849 case 'const' : 850 if ($fullpath) 851 return $b.$element-> package.$c.'/'.$element-> class.'.html#'.$element> type.$element-> name; 852 return $element-> type.$element-> name; 853 break; 854 case 'tutorial' : 855 $d = ''; 856 if ($element-> section) 857 { 858 $d = '#'.$element-> section; 859 } 860 return $b.$element-> package.$c.'/tutorial_'.$element-> name.'.html'.$d; 861 } 862 } 863 864 /** 865 * Convert README/INSTALL/CHANGELOG file contents to output format 866 * @param README|INSTALL|CHANGELOG 867 * @param string contents of the file 868 */ 869 function Convert_RIC($name, $contents) 870 { 871 $template = & $this-> newSmarty(); 872 $template-> assign('contents',$contents); 873 $template-> assign('name',$name); 874 $this-> setTargetDir($this-> base_dir); 875 $this-> writefile('ric_'.$name . '.html',$template-> fetch('ric.tpl')); 876 $this-> ric_set[$name] = true; 877 } 878 879 function ConvertTodoList() 880 { 881 $todolist = array(); 882 foreach($this-> todoList as $package => $alltodos) 883 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1071 of 1382

884 foreach($alltodos as $todos) 885 { 886 $converted = array(); 887 $converted['link'] = $this-> returnSee($todos[0]); 888 if (!is_array($todos[1])) 889 { 890 $converted['todos'][] = $todos[1]-> Convert($this); 891 } else 892 { 893 foreach($todos[1] as $todo) 894 { 895 $converted['todos'][] = $todo-> Convert($this); 896 } 897 } 898 $todolist[$package][] = $converted; 899 } 900 } 901 $templ = & $this-> newSmarty(); 902 $templ-> assign('todos',$todolist); 903 $templ-> register_outputfilter('HTMLframes_outputfilter'); 904 $this-> setTargetDir($this-> base_dir); 905 $this-> writefile('todolist.html',$templ-> fetch('todolist.tpl')); 906 } 907 908 /** 909 * Create errors.html template file output 910 * 911 * This method takes all parsing errors and warnings and spits them out ordered by file and line number. 912 * @global ErrorTracker We'll be using it's output facility 913 */ 914 function ConvertErrorLog() 915 { 916 global $phpDocumentor_errors; 917 $allfiles = array(); 918 $files = array(); 919 $warnings = $phpDocumentor_errors-> returnWarnings(); 920 $errors = $phpDocumentor_errors-> returnErrors(); 921 $template = & $this-> newSmarty(); 922 foreach($warnings as $warning) 923 { 924 $file = '##none'; 925 $linenum = 'Warning'; 926 if ($warning-> file) 927 { 928 $file = $warning-> file; 929 $allfiles[$file] = 1; 930 $linenum .= ' on line '.$warning-> linenum; 931 } 932 $files[$file]['warnings'][] = array('name' => $linenum, 'listing' => $warning> data); 933 } 934 foreach($errors as $error) 935 { 936 $file = '##none'; 937 $linenum = 'Error'; 938 if ($error-> file) 939 { 940 $file = $error-> file; 941 $allfiles[$file] = 1; 942 $linenum .= ' on line '.$error-> linenum; 943 } 944 $files[$file]['errors'][] = array('name' => $linenum, 'listing' => $error> data); 945 } 946 $i=1; 947 $af = array(); 948 foreach($allfiles as $file => $num) 949 { 950 $af[$i++] = $file; 951 } 952 $allfiles = $af; 953 usort($allfiles,'strnatcasecmp'); 954 $allfiles[0] = "Post-parsing" ; 955 foreach($allfiles as $i => $a) 956 { 957 $allfiles[$i] = array('file' => $a); 958 } 959 $out = array(); 960 foreach($files as $file => $data)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1072 of 1382

961 { 962 if ($file == '##none') $file = 'Post-parsing'; 963 $out[$file] = $data; 964 } 965 $template-> assign("files" ,$allfiles); 966 $template-> assign("all" ,$out); 967 $template-> assign("title" ,"phpDocumentor Parser Errors and Warnings" ); 968 $this-> setTargetDir($this-> base_dir); 969 $this-> writefile("errors.html" ,$template-> fetch('errors.tpl')); 970 unset($template); 971 phpDocumentor_out("\n\nTo view errors and warnings, look at " .$this> base_dir. PATH_DELIMITER . "errors.html\n" ); 972 flush(); 973 } 974 975 function getTutorialId($package,$subpackage,$tutorial,$id) 976 { 977 return $id; 978 } 979 980 function getCData($value) 981 { 982 return '<pre>' .htmlentities($value).'</pre>' ; 983 } 984 985 /** 986 * Converts package page and sets its package as used in {@link $package_pages} 987 * @param parserPackagePage 988 */ 989 function convertPackagepage(& $element) 990 { 991 phpDocumentor_out("\n" ); 992 flush(); 993 $this-> package = $element-> package; 994 $this-> subpackage = ''; 995 $contents = $element-> Convert($this); 996 $this-> package_pages[$element-> package] = str_replace('{$subdir}','../',$contents); 997 phpDocumentor_out("\n" ); 998 flush(); 999 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $element-> package); 1000 $this-> writeFile('package_'.$element> package.'.html',str_replace('{$subdir}','../',$contents)); 1001 } 1002 1003 /** 1004 * @param parserTutorial 1005 */ 1006 function convertTutorial(& $element) 1007 { 1008 phpDocumentor_out("\n" ); 1009 flush(); 1010 $template = & parent::convertTutorial($element); 1011 $a = '../'; 1012 if ($element-> subpackage) $a .= '../'; 1013 $template-> assign('subdir',$a); 1014 $template-> register_outputfilter('HTMLframes_outputfilter'); 1015 $contents = $template-> fetch('tutorial.tpl'); 1016 $a = ''; 1017 if ($element-> subpackage) $a = PATH_DELIMITER . $element-> subpackage; 1018 phpDocumentor_out("\n" ); 1019 flush(); 1020 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $element-> package . $a); 1021 $this-> writeFile('tutorial_'.$element-> name.'.html',$contents); 1022 } 1023 1024 /** 1025 * Converts class for template output 1026 * @see prepareDocBlock(), generateChildClassList(), generateFormattedClassTree(), getFormattedConflicts() 1027 * @see getFormattedInheritedMethods(), getFormattedInheritedVars() 1028 * @param parserClass 1029 */ 1030 function convertClass(& $element) 1031 { 1032 parent::convertClass($element); 1033 $this-> class_dir = $element-> docblock-> package; 1034 if (!empty($element-> docblock-> subpackage)) $this-> class_dir .= PATH_DELIMITER . $element-> docblock-> subpackage;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1073 of 1382

1035 $a = '../'; 1036 if ($element-> docblock-> subpackage != '') $a = " ../$a" ; 1037 1038 $this-> class_data-> assign('subdir',$a); 1039 $this-> class_data-> assign("title" ,"Docs For Class " . $element-> getName()); 1040 $this-> class_data-> assign("page" ,$element-> getName() . '.html'); 1041 } 1042 1043 /** 1044 * Converts class variables for template output 1045 * @see prepareDocBlock(), getFormattedConflicts() 1046 * @param parserDefine 1047 */ 1048 function convertVar(& $element) 1049 { 1050 parent::convertVar($element, array('var_dest' => $this-> getId($element,false))); 1051 } 1052 1053 /** 1054 * Converts class variables for template output 1055 * @see prepareDocBlock(), getFormattedConflicts() 1056 * @param parserDefine 1057 */ 1058 function convertConst(& $element) 1059 { 1060 parent::convertConst($element, array('const_dest' => $this> getId($element,false))); 1061 } 1062 1063 /** 1064 * Converts class methods for template output 1065 * @see prepareDocBlock(), getFormattedConflicts() 1066 * @param parserDefine 1067 */ 1068 function convertMethod(& $element) 1069 { 1070 parent::convertMethod($element, array('method_dest' => $this> getId($element,false))); 1071 } 1072 1073 /** 1074 * Converts function for template output 1075 * @see prepareDocBlock(), parserFunction::getFunctionCall(), getFormattedConflicts() 1076 * @param parserFunction 1077 */ 1078 function convertFunction(& $element) 1079 { 1080 $funcloc = $this-> getId($this-> addLink($element)); 1081 parent::convertFunction($element,array('function_dest' => $this> getId($element,false))); 1082 } 1083 1084 /** 1085 * Converts include elements for template output 1086 * @see prepareDocBlock() 1087 * @param parserInclude 1088 */ 1089 function convertInclude(& $element) 1090 { 1091 parent::convertInclude($element, array('include_file' => '_'.strtr($element> getValue(),array('"' => '', "'" => '','.' => '_')))); 1092 } 1093 1094 /** 1095 * Converts defines for template output 1096 * @see prepareDocBlock(), getFormattedConflicts() 1097 * @param parserDefine 1098 */ 1099 function convertDefine(& $element) 1100 { 1101 parent::convertDefine($element, array('define_link' => $this> getId($element,false))); 1102 } 1103 1104 /** 1105 * Converts global variables for template output 1106 * @param parserGlobal 1107 */ 1108 function convertGlobal(& $element)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1074 of 1382

1109 { 1110 parent::convertGlobal($element, array('global_link' => $this> getId($element,false))); 1111 } 1112 1113 /** 1114 * converts procedural pages for template output 1115 * @see prepareDocBlock(), getClassesOnPage() 1116 * @param parserData 1117 */ 1118 function convertPage(& $element) 1119 { 1120 parent::convertPage($element); 1121 $this-> juststarted = true; 1122 $this-> page_dir = $element-> parent-> package; 1123 if (!empty($element-> parent-> subpackage)) $this-> page_dir .= PATH_DELIMITER . $element-> parent-> subpackage; 1124 // registering stuff on the template 1125 $this-> page_data-> assign("page" ,$this-> getPageName($element) . '.html'); 1126 $this-> page_data-> assign("title" ,"Docs for page " .$element> parent-> getFile()); 1127 } 1128 1129 function getPageName(& $element) 1130 { 1131 if (phpDocumentor_get_class($element) == 'parserpage') return '_'.$element> getName(); 1132 return '_'.$element-> parent-> getName(); 1133 } 1134 1135 /** 1136 * returns an array containing the class inheritance tree from the root object to the class 1137 * 1138 * @param parserClass class variable 1139 * @return array Format: array(root,child,child,child,...,$class) 1140 * @uses parserClass::getParentClassTree() 1141 */ 1142 1143 function generateFormattedClassTree($class) 1144 { 1145 $tree = $class-> getParentClassTree($this); 1146 $out = ''; 1147 if (count($tree) - 1) 1148 { 1149 $result = array($class-> getName()); 1150 $parent = $tree[$class-> getName()]; 1151 $distance[] = ''; 1152 while ($parent) 1153 { 1154 $x = $parent; 1155 if (is_object($parent)) 1156 { 1157 $subpackage = $parent-> docblock-> subpackage; 1158 $package = $parent-> docblock-> package; 1159 $x = $parent; 1160 $x = $parent-> getLink($this); 1161 if (!$x) $x = $parent-> getName(); 1162 } 1163 $result[] = 1164 $x; 1165 $distance[] = 1166 "\n%s|\n" . 1167 "%s--" ; 1168 if (is_object($parent)) 1169 $parent = $tree[$parent-> getName()]; 1170 elseif (isset($tree[$parent])) 1171 $parent = $tree[$parent]; 1172 } 1173 $nbsp = ' '; 1174 for($i=count($result) - 1;$i>= 0;$i--) 1175 { 1176 $my_nbsp = ''; 1177 for($j=0;$j< count($result) - $i;$j++) $my_nbsp .= $nbsp; 1178 $distance[$i] = sprintf($distance[$i],$my_nbsp,$my_nbsp); 1179 } 1180 return array('classes'=> array_reverse($result),'distance'=> array_reverse($distance)); 1181 } else 1182 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1075 of 1382

1183 return array('classes'=> $class-> getName(),'distance'=>array( '')); 1184 } 1185 } 1186 1187 /** @access private */ 1188 function sortVar($a, $b) 1189 { 1190 return strnatcasecmp($a-> getName(),$b-> getName()); 1191 } 1192 1193 /** @access private */ 1194 function sortMethod($a, $b) 1195 { 1196 if ($a-> isConstructor) return -1; 1197 if ($b-> isConstructor) return 1; 1198 return strnatcasecmp($a-> getName(),$b-> getName()); 1199 } 1200 1201 /** 1202 * returns a template-enabled array of class trees 1203 * 1204 * @param string $package package to generate a class tree for 1205 * @see $roots, HTMLConverter::getRootTree() 1206 */ 1207 function generateFormattedClassTrees($package) 1208 { 1209 if (!isset($this-> roots['normal'][$package]) && 1210 !isset($this-> roots['special'][$package])) { 1211 return array(); 1212 } 1213 $trees = array(); 1214 if (isset($this-> roots['normal'][$package])) { 1215 $roots = $this-> roots['normal'][$package]; 1216 for($i=0;$i< count($roots);$i++) 1217 { 1218 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1219 if ($root && $root-> isInterface()) { 1220 continue; 1221 } 1222 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1223 } 1224 } 1225 if (isset($this-> roots['special'][$package])) { 1226 $roots = $this-> roots['special'][$package]; 1227 foreach ($roots as $parent => $classes) { 1228 $thistree = ''; 1229 foreach ($classes as $classinfo) { 1230 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1231 if ($root && $root-> isInterface()) { 1232 continue; 1233 } 1234 $thistree .= 1235 $this-> getRootTree( 1236 $this-> getSortedClassTreeFromClass( 1237 $classinfo, 1238 $package, 1239 ''), 1240 $package, 1241 true); 1242 } 1243 if (!$thistree) { 1244 continue; 1245 } 1246 $trees[] = array( 1247 'class' => $parent, 1248 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1249 ); 1250 } 1251 } 1252 return $trees; 1253 } 1254 1255 /** 1256 * returns a template-enabled array of interface inheritance trees 1257 * 1258 * @param string $package package to generate a class tree for 1259 * @see $roots, HTMLConverter::getRootTree()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1076 of 1382

1260 */ 1261 function generateFormattedInterfaceTrees($package) 1262 { 1263 if (!isset($this-> roots['normal'][$package]) && 1264 !isset($this-> roots['special'][$package])) { 1265 return array(); 1266 } 1267 $trees = array(); 1268 if (isset($this-> roots['normal'][$package])) { 1269 $roots = $this-> roots['normal'][$package]; 1270 for($i=0;$i< count($roots);$i++) 1271 { 1272 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1273 if ($root && ! $root-> isInterface()) { 1274 continue; 1275 } 1276 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1277 } 1278 } 1279 if (isset($this-> roots['special'][$package])) { 1280 $roots = $this-> roots['special'][$package]; 1281 foreach ($roots as $parent => $classes) { 1282 $thistree = ''; 1283 foreach ($classes as $classinfo) { 1284 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1285 if ($root && ! $root-> isInterface()) { 1286 continue; 1287 } 1288 $thistree .= 1289 $this-> getRootTree( 1290 $this-> getSortedClassTreeFromClass( 1291 $classinfo, 1292 $package, 1293 ''), 1294 $package, 1295 true); 1296 } 1297 if (!$thistree) { 1298 continue; 1299 } 1300 $trees[] = array( 1301 'class' => $parent, 1302 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1303 ); 1304 } 1305 } 1306 return $trees; 1307 } 1308 1309 /** 1310 * return formatted class tree for the Class Trees page 1311 * 1312 * @param array $tree output from {@link getSortedClassTreeFromClass()} 1313 * @param string $package package 1314 * @param boolean $nounknownparent if true, an object's parent will not be checked 1315 * @see Classes::$definitechild, generateFormattedClassTrees() 1316 * @return string 1317 */ 1318 function getRootTree($tree, $package, $noparent = false) 1319 { 1320 if (!$tree) return ''; 1321 $my_tree = ''; 1322 $cur = '#root'; 1323 $lastcur = array(false); 1324 $kids = array(); 1325 $dopar = false; 1326 if (!$noparent && $tree[$cur]['parent']) 1327 { 1328 $dopar = true; 1329 if (!is_object($tree[$cur]['parent'])) 1330 { 1331 // debug("parent ".$tree[$cur]['parent']." not found"); 1332 $my_tree .= '<li>' . $tree[$cur]['parent'] .'<ul>' ; 1333 } 1334 else 1335 { 1336 // debug("parent ".$this-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1077 of 1382

>returnSee($tree[$cur]['parent'])." in other package"); 1337 $root = $this-> classes-> getClassByPackage($tree[$cur]['parent']-> name, 1338 $package); 1339 $my_tree .= '<li>' . $this-> returnSee($tree[$cur]['parent']); 1340 if ($tree[$cur]['parent']-> package != $package) $my_tree .= ' <b>(Different package)</b><ul>' ; 1341 } 1342 } 1343 do 1344 { 1345 // fancy_debug($cur,$lastcur,$kids); 1346 if (count($tree[$cur]['children'])) 1347 { 1348 // debug("$cur has children"); 1349 if (!isset($kids[$cur])) 1350 { 1351 // debug("set $cur kids"); 1352 $kids[$cur] = 1; 1353 $root = $this-> classes-> getClassByPackage( 1354 $tree[$cur]['link']-> name, 1355 $tree[$cur]['link']-> package); 1356 if ($implements = $root-> getImplements()) { 1357 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link']) . 1358 ' (implements '; 1359 foreach ($implements as $i => $interface) { 1360 if ($i && $i != count($implements) - 1) $my_tree .= ', '; 1361 if ($link = $this-> getLink('object ' . $interface)) { 1362 $my_tree .= $this-> returnSee($link); 1363 } else { 1364 $my_tree .= $interface; 1365 } 1366 } 1367 $my_tree .= ')'; 1368 } else { 1369 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link']); 1370 } 1371 $my_tree .= '<ul>' ."\n" ; 1372 } 1373 array_push($lastcur,$cur); 1374 list(,$cur) = each($tree[$cur]['children']); 1375 // var_dump('listed',$cur); 1376 if ($cur) 1377 { 1378 $cur = $cur['package'] . '#' . $cur['class']; 1379 // debug("set cur to child $cur"); 1380 // $my_tree .= '<li>'.$this->returnSee($tree[$cur]['link']); 1381 continue; 1382 } else 1383 { 1384 // debug("end of children for $cur"); 1385 $cur = array_pop($lastcur); 1386 $cur = array_pop($lastcur); 1387 $my_tree .= '</ul></li>' ."\n" ; 1388 if ($dopar && ( $cur == '#root' || !$cur)) $my_tree .= '</ul></li>' ; 1389 } 1390 } else 1391 { 1392 // debug("$cur has no children"); 1393 $my_tree .= '<li>' .$this> returnSee($tree[$cur]['link'])."</li>" ; 1394 if ($dopar && $cur == '#root') $my_tree .= '</ul></li>' ; 1395 $cur = array_pop($lastcur); 1396 } 1397 } while ($cur); 1398 return $my_tree; 1399 } 1400 1401 /** 1402 * Generate indexing information for given element 1403 * 1404 * @param parserElement descendant of parserElement 1405 * @see generateElementIndex() 1406 * @return array 1407 */ 1408 function getIndexInformation($elt) 1409 { 1410 $Result['type'] = $elt-> type; 1411 $Result['file_name'] = $elt-> file; 1412 $Result['path'] = $elt-> getPath();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1078 of 1382

1413 1414 if (isset($elt-> docblock)) 1415 { 1416 $Result['description'] = $elt-> docblock-> getSDesc($this); 1417 1418 if ($elt-> docblock-> hasaccess) 1419 $Result['access'] = $elt-> docblock-> tags['access'][0]> value; 1420 else 1421 $Result['access'] = 'public'; 1422 1423 $Result['abstract'] = isset ($elt-> docblock-> tags['abstract'][0]); 1424 } 1425 else 1426 $Result['description'] = ''; 1427 1428 $aa = $Result['description']; 1429 if (!empty($aa)) $aa = " <br>&nbsp;&nbsp;&nbsp;&nbsp; $aa" ; 1430 1431 switch($elt-> type) 1432 { 1433 case 'class': 1434 $Result['name'] = $elt-> getName(); 1435 $Result['title'] = 'Class'; 1436 $Result['link'] = $this-> getClassLink($elt-> getName(), 1437 $elt-> docblock-> package, 1438 $elt-> getPath(), 1439 $elt-> getName()); 1440 $Result['listing'] = 'in file '.$elt-> file.', class '.$Result['link']." $aa" ; 1441 break; 1442 case 'define': 1443 $Result['name'] = $elt-> getName(); 1444 $Result['title'] = 'Constant'; 1445 $Result['link'] = $this-> getDefineLink($elt-> getName(), 1446 $elt-> docblock-> package, 1447 $elt-> getPath(), 1448 $elt-> getName()); 1449 $Result['listing'] = 'in file '.$elt-> file.', constant '.$Result['link']." $aa" ; 1450 break; 1451 case 'global': 1452 $Result['name'] = $elt-> getName(); 1453 $Result['title'] = 'Global'; 1454 $Result['link'] = $this-> getGlobalLink($elt-> getName(), 1455 $elt-> docblock-> package, 1456 $elt-> getPath(), 1457 $elt-> getName()); 1458 $Result['listing'] = 'in file '.$elt-> file.', global variable '.$Result['link']." $aa" ; 1459 break; 1460 case 'function': 1461 $Result['name'] = $elt-> getName(); 1462 $Result['title'] = 'Function'; 1463 $Result['link'] = $this-> getFunctionLink($elt-> getName(), 1464 $elt-> docblock-> package, 1465 $elt-> getPath(), 1466 $elt-> getName().'()'); 1467 $Result['listing'] = 'in file '.$elt-> file.', function '.$Result['link']." $aa" ; 1468 break; 1469 case 'method': 1470 $Result['name'] = $elt-> getName(); 1471 $Result['title'] = 'Method'; 1472 $Result['link'] = $this-> getMethodLink($elt-> getName(), 1473 $elt-> class, 1474 $elt-> docblock-> package, 1475 $elt-> getPath(), 1476 $elt-> class.'::'.$elt> getName().'()' 1477 ); 1478 if ($elt-> isConstructor) $Result['constructor'] = 1; 1479 $Result['listing'] = 'in file '.$elt-> file.', method '.$Result['link']." $aa" ; 1480 break; 1481 case 'var': 1482 $Result['name'] = $elt-> getName(); 1483 $Result['title'] = 'Variable';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1079 of 1382

1484 $Result['link'] = $this-> getVarLink($elt-> getName(), 1485 $elt-> class, 1486 $elt-> docblock-> package, 1487 $elt-> getPath(), 1488 $elt-> class.'::'.$elt> getName()); 1489 $Result['listing'] = 'in file '.$elt-> file.', variable '.$Result['link']." $aa" ; 1490 break; 1491 case 'const': 1492 $Result['name'] = $elt-> getName(); 1493 $Result['title'] = 'Class Constant'; 1494 $Result['link'] = $this-> getConstLink($elt-> getName(), 1495 $elt-> class, 1496 $elt-> docblock-> package, 1497 $elt-> getPath(), 1498 $elt-> class.'::'.$elt> getName()); 1499 $Result['listing'] = 'in file '.$elt-> file.', class constant '.$Result['link']." $aa" ; 1500 break; 1501 case 'page': 1502 $Result['name'] = $elt-> getFile(); 1503 $Result['title'] = 'Page'; 1504 $Result['link'] = $this-> getPageLink($elt-> getFile(), 1505 $elt-> package, 1506 $elt-> getPath(), 1507 $elt-> getFile()); 1508 $Result['listing'] = 'procedural page '.$Result['link']; 1509 break; 1510 case 'include': 1511 $Result['name'] = $elt-> getName(); 1512 $Result['title'] = 'Include'; 1513 $Result['link'] = $elt-> getValue(); 1514 $Result['listing'] = 'include '.$Result['name']; 1515 break; 1516 } 1517 1518 return $Result; 1519 } 1520 /** 1521 * Generate alphabetical index of all elements 1522 * 1523 * @see $elements, walk() 1524 */ 1525 function generateElementIndex() 1526 { 1527 $elementindex = array(); 1528 $letters = array(); 1529 $used = array(); 1530 foreach($this-> elements as $letter => $nutoh) 1531 { 1532 foreach($this-> elements[$letter] as $i => $yuh) 1533 { 1534 if ($this-> elements[$letter][$i]-> type != 'include') 1535 { 1536 if (!isset($used[$letter])) 1537 { 1538 $letters[]['letter'] = $letter; 1539 $elindex['letter'] = $letter; 1540 $used[$letter] = 1; 1541 } 1542 1543 $elindex['index'][] = $this-> getIndexInformation($this> elements[$letter][$i]); 1544 } 1545 } 1546 if (isset($elindex['index'])) 1547 { 1548 $elementindex[] = $elindex; 1549 } else 1550 { 1551 unset($letters[count($letters) - 1]); 1552 } 1553 $elindex = array(); 1554 } 1555 return array($elementindex,$letters); 1556 } 1557 1558 function copyMediaRecursively($media,$targetdir,$subdir = '')

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1080 of 1382

1559 { 1560 $versionControlDirectories = array ('CVS', 'media/CVS', 'media\\CVS', '.svn', 'media/.svn', 'media\\.svn'); 1561 if (!is_array($media)) { 1562 return; 1563 } 1564 foreach($media as $dir => $files) 1565 { 1566 if ($dir === '/') 1567 { 1568 $this-> copyMediaRecursively($files,$targetdir); 1569 } else 1570 { 1571 if (!is_numeric($dir)) 1572 { 1573 if (in_array($dir, $versionControlDirectories)) 1574 { 1575 // skip it entirely 1576 } 1577 else 1578 { 1579 // create the subdir 1580 phpDocumentor_out(" creating $targetdir" . PATH_DELIMITER . " $dir\n" ); 1581 Converter::setTargetDir($targetdir . PATH_DELIMITER . $dir); 1582 if (!empty($subdir)) 1583 { 1584 $subdir .= PATH_DELIMITER; 1585 } 1586 $this> copyMediaRecursively($files," $targetdir/$dir" ,$subdir . $dir); 1587 } 1588 } 1589 else 1590 { 1591 // copy the file 1592 phpDocumentor_out(" copying $targetdir" . PATH_DELIMITER . $files['file']."\n" ); 1593 $this-> copyFile($files['file'],$subdir); 1594 } 1595 } 1596 } 1597 } 1598 1599 /** 1600 * calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied 1601 * @see Converter::setTargetDir() 1602 */ 1603 function setTargetDir($dir) 1604 { 1605 Converter::setTargetDir($dir); 1606 if ($this-> wrote) return; 1607 $this-> wrote = true; 1608 $template_images = array(); 1609 $stylesheets = array(); 1610 $tdir = $dir; 1611 $dir = $this-> templateDir; 1612 $this-> templateDir = $this-> templateDir.'templates/'; 1613 $info = new Io; 1614 $this-> copyMediaRecursively($info-> getDirTree($this-> templateDir.'media',$this> templateDir),$tdir); 1615 } 1616 1617 /** 1618 * Generate alphabetical index of all elements by package and subpackage 1619 * 1620 * @param string $package name of a package 1621 * @see $pkg_elements, walk(), generatePkgElementIndexes() 1622 */ 1623 function generatePkgElementIndex($package) 1624 { 1625 // var_dump($this->pkg_elements[$package]); 1626 $elementindex = array(); 1627 $letters = array(); 1628 $letterind = array(); 1629 $used = array(); 1630 $subp = ''; 1631 foreach($this-> pkg_elements[$package] as $subpackage => $els) 1632 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1081 of 1382

1633 if (empty($els)) continue; 1634 if (!empty($subpackage)) $subp = " (<b>subpackage:</b> $subpackage)" ; else $subp = ''; 1635 foreach($els as $letter => $yuh) 1636 { 1637 foreach($els[$letter] as $i => $yuh) 1638 { 1639 if ($els[$letter][$i]-> type != 'include') 1640 { 1641 if (!isset($used[$letter])) 1642 { 1643 $letters[]['letter'] = $letter; 1644 $letterind[$letter] = count($letters) - 1; 1645 $used[$letter] = 1; 1646 } 1647 $elindex[$letter]['letter'] = $letter; 1648 1649 $elindex[$letter]['index'][] = $this> getIndexInformation($els[$letter][$i]); 1650 } 1651 } 1652 } 1653 } 1654 ksort($elindex); 1655 usort($letters,'HTMLframes_lettersort'); 1656 if (isset($elindex)) 1657 { 1658 while(list($letter,$tempel) = each($elindex)) 1659 { 1660 if (!isset($tempel)) 1661 { 1662 unset($letters[$letterind[$tempel['letter']]]); 1663 } else 1664 $elementindex[] = $tempel; 1665 } 1666 } else $letters = array(); 1667 return array($elementindex,$letters); 1668 } 1669 1670 /** 1671 * 1672 * @see generatePkgElementIndex() 1673 */ 1674 function generatePkgElementIndexes() 1675 { 1676 $packages = array(); 1677 $package_names = array(); 1678 $pkg = array(); 1679 $letters = array(); 1680 foreach($this-> pkg_elements as $package => $trash) 1681 { 1682 $pkgs['package'] = $package; 1683 $pkg['package'] = $package; 1684 list($pkg['pindex'],$letters[$package]) = $this> generatePkgElementIndex($package); 1685 if (count($pkg['pindex'])) 1686 { 1687 $packages[] = $pkg; 1688 $package_names[] = $pkgs; 1689 } 1690 unset($pkgs); 1691 unset($pkg); 1692 } 1693 foreach($packages as $i => $package) 1694 { 1695 $pnames = array(); 1696 for($j=0;$j< count($package_names);$j++) 1697 { 1698 if ($package_names[$j]['package'] != $package['package']) $pnames[] = $package_names[$j]; 1699 } 1700 $packages[$i]['packageindexes'] = $pnames; 1701 } 1702 return array($packages,$package_names,$letters); 1703 } 1704 1705 /** 1706 * @param string name of class 1707 * @param string package name 1708 * @param string full path to look in (used in index generation)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1082 of 1382

1709 * @param boolean deprecated 1710 * @param boolean return just the URL, or enclose it in an html a tag 1711 * @return mixed false if not found, or an html a link to the class's documentation 1712 * @see parent::getClassLink() 1713 */ 1714 function getClassLink($expr,$package, $file = false,$text = false, $with_a = true) 1715 { 1716 $a = Converter::getClassLink($expr,$package,$file); 1717 if (!$a) return false; 1718 return $this-> returnSee($a, $text, $with_a); 1719 } 1720 1721 /** 1722 * @param string name of function 1723 * @param string package name 1724 * @param string full path to look in (used in index generation) 1725 * @param boolean deprecated 1726 * @param boolean return just the URL, or enclose it in an html a tag 1727 * @return mixed false if not found, or an html a link to the function's documentation 1728 * @see parent::getFunctionLink() 1729 */ 1730 function getFunctionLink($expr,$package, $file = false,$text = false) 1731 { 1732 $a = Converter::getFunctionLink($expr,$package,$file); 1733 if (!$a) return false; 1734 return $this-> returnSee($a, $text); 1735 } 1736 1737 /** 1738 * @param string name of define 1739 * @param string package name 1740 * @param string full path to look in (used in index generation) 1741 * @param boolean deprecated 1742 * @param boolean return just the URL, or enclose it in an html a tag 1743 * @return mixed false if not found, or an html a link to the define's documentation 1744 * @see parent::getDefineLink() 1745 */ 1746 function getDefineLink($expr,$package, $file = false,$text = false) 1747 { 1748 $a = Converter::getDefineLink($expr,$package,$file); 1749 if (!$a) return false; 1750 return $this-> returnSee($a, $text); 1751 } 1752 1753 /** 1754 * @param string name of global variable 1755 * @param string package name 1756 * @param string full path to look in (used in index generation) 1757 * @param boolean deprecated 1758 * @param boolean return just the URL, or enclose it in an html a tag 1759 * @return mixed false if not found, or an html a link to the global variable's documentation 1760 * @see parent::getGlobalLink() 1761 */ 1762 function getGlobalLink($expr,$package, $file = false,$text = false) 1763 { 1764 $a = Converter::getGlobalLink($expr,$package,$file); 1765 if (!$a) return false; 1766 return $this-> returnSee($a, $text); 1767 } 1768 1769 /** 1770 * @param string name of procedural page 1771 * @param string package name 1772 * @param string full path to look in (used in index generation) 1773 * @param boolean deprecated 1774 * @param boolean return just the URL, or enclose it in an html a tag 1775 * @return mixed false if not found, or an html a link to the procedural page's documentation 1776 * @see parent::getPageLink() 1777 */ 1778 function getPageLink($expr,$package, $path = false,$text = false) 1779 { 1780 $a = Converter::getPageLink($expr,$package,$path); 1781 if (!$a) return false; 1782 return $this-> returnSee($a, $text); 1783 } 1784 1785 /** 1786 * @param string name of method

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1083 of 1382

1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866

* @param string class containing method * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @param boolean return just the URL, or enclose it in an html a tag * @return mixed false if not found, or an html a link to the method's documentation * @see parent::getMethodLink() */ function getMethodLink($expr,$class,$package, $file = false,$text = false) { $a = Converter::getMethodLink($expr,$class,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * @param string name of var * @param string class containing var * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @param boolean return just the URL, or enclose it in an html a tag * @return mixed false if not found, or an html a link to the var's documentation * @see parent::getVarLink() */ function getVarLink($expr,$class,$package, $file = false,$text = false) { $a = Converter::getVarLink($expr,$class,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * @param string name of class constant * @param string class containing class constant * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @param boolean return just the URL, or enclose it in an html a tag * @return mixed false if not found, or an html a link to the var's documentation * @see parent::getVarLink() */ function getConstLink($expr,$class,$package, $file = false,$text = false) { $a = Converter::getConstLink($expr,$class,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * does a nat case sort on the specified second level value of the array * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); return strnatcasecmp($aa, $bb); } /** * does a nat case sort on the specified second level value of the array. * this one puts constructors first * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp1 ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); if (strpos($aa,'CONSTRUCTOR') === 0) { return -1;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1084 of 1382

1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914

} if (strpos($bb,'CONSTRUCTOR') === 0) { return 1; } if (strpos($aa,strtoupper($this-> class)) === 0) { return -1; } if (strpos($bb,strtoupper($this-> class)) === 0) { return -1; } return strnatcasecmp($aa, $bb); } /** * This function is not used by HTMLdefaultConverter, but is required by Converter */ function Output() { } } /** * @access private * @global string name of the package to set as the first package */ function HTMLframes_pindexcmp($a, $b) { global $phpDocumentor_DefaultPackageName; if ($a['title'] == $phpDocumentor_DefaultPackageName) return -1; if ($b['title'] == $phpDocumentor_DefaultPackageName) return 1; return strnatcasecmp($a['title'],$b['title']); } /** @access private */ function HTMLframes_lettersort($a, $b) { return strnatcasecmp($a['letter'],$b['letter']); } /** @access private */ function HTMLframes_outputfilter($src, & $smarty) { return str_replace('{$subdir}',$smarty-> _tpl_vars['subdir'],$src); } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1085 of 1382

File Source for HTMLSmartyConverter.inc


Documentation for this file is available at HTMLSmartyConverter.inc
1 <?php 2 /** 3 * HTML output converter for Smarty Template. 4 * This Converter takes output from the {@link Parser} and converts it to HTML-ready output for use with {@link Smarty}. 5 * 6 * phpDocumentor :: automatic documentation generator 7 * 8 * PHP versions 4 and 5 9 * 10 * Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver 11 * 12 * LICENSE: 13 * 14 * This library is free software; you can redistribute it 15 * and/or modify it under the terms of the GNU Lesser General 16 * Public License as published by the Free Software Foundation; 17 * either version 2.1 of the License, or (at your option) any 18 * later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free Software 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 * 29 * @package Converters 30 * @subpackage HTMLframes 31 * @author Joshua Eichorn <[email protected]> 32 * @author Greg Beaver <[email protected]> 33 * @copyright 2000-2006 Joshua Eichorn, Gregory Beaver 34 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 35 * @version CVS: $Id: HTMLSmartyConverter.inc 234145 2007-04-19 20:20:57Z ashnazg $ 36 * @filesource 37 * @link http://www.phpdoc.org 38 * @link http://pear.php.net/PhpDocumentor 39 * @see parserDocBlock, parserInclude, parserPage, parserClass 40 * @see parserDefine, parserFunction, parserMethod, parserVar 41 * @since 1.0rc1 42 */ 43 /** 44 * HTML output converter. 45 * This Converter takes output from the {@link Parser} and converts it to HTML-ready output for use with {@link Smarty}. 46 * 47 * @package Converters 48 * @subpackage HTMLSmarty 49 * @see parserDocBlock, parserInclude, parserPage, parserClass, parserDefine, parserFunction, parserMethod, parserVar 50 * @author Greg Beaver <[email protected]> 51 * @since 1.0rc1 52 * @version $Revision: 234145 $ 53 */ 54 class HTMLSmartyConverter extends Converter 55 { 56 /** 57 * This converter knows about the new root tree processing 58 * In order to fix PEAR Bug #6389 59 * @var boolean 60 */ 61 var $processSpecialRoots = true; 62 /** 63 * Smarty Converter wants elements sorted by type as well as alphabetically 64 * @see Converter::$sort_page_contents_by_type

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1086 of 1382

65 * @var boolean 66 */ 67 var $sort_page_contents_by_type = true; 68 /** @var string */ 69 var $outputformat = 'HTML'; 70 /** @var string */ 71 var $name = 'Smarty'; 72 /** 73 * indexes of elements by package that need to be generated 74 * @var array 75 */ 76 var $leftindex = array('classes' => true, 'pages' => true, 'functions' => true, 'defines' => false, 'globals' => false); 77 78 /** 79 * output directory for the current procedural page being processed 80 * @var string 81 */ 82 var $page_dir; 83 84 /** 85 * target directory passed on the command-line. 86 * {@link $targetDir} is malleable, always adding package/ and package/subpackage/ subdirectories onto it. 87 * @var string 88 */ 89 var $base_dir; 90 91 /** 92 * output directory for the current class being processed 93 * @var string 94 */ 95 var $class_dir; 96 97 /** 98 * array of converted package page names. 99 * Used to link to the package page in the left index 100 * @var array Format: array(package => 1) 101 */ 102 var $package_pages = array(); 103 104 /** 105 * controls formatting of parser informative output 106 * 107 * Converter prints: 108 * "Converting /path/to/file.php... Procedural Page Elements... Classes..." 109 * Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there 110 * is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that 111 * and is purely cosmetic 112 * @var boolean 113 */ 114 var $juststarted = false; 115 116 /** 117 * contains all of the template procedural page element loop data needed for the current template 118 * @var array 119 */ 120 var $current; 121 122 /** 123 * contains all of the template class element loop data needed for the current template 124 * @var array 125 */ 126 var $currentclass; 127 var $wrote = false; 128 var $ric_set = array(); 129 130 /** 131 * sets {@link $base_dir} to $targetDir 132 * @see Converter() 133 */ 134 135 /**#@+ 136 * @access private 137 */ 138 var $_classleft_cache = false; 139 var $_classcontents_cache = false;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1087 of 1382

140 var $_pagecontents_cache = false; 141 var $_pageleft_cache = false; 142 var $_done_package_index = false; 143 var $_ric_done = false; 144 var $_wrote_tdir = false; 145 var $ric_contents = array(); 146 /**#@-*/ 147 148 function HTMLSmartyConverter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) 149 { 150 Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title); 151 $this-> base_dir = $targetDir; 152 } 153 154 function writeSource($path, $value) 155 { 156 $templ = & $this-> newSmarty(); 157 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this); 158 $templ-> assign('source',$value); 159 $templ-> assign('package',$pathinfo['package']); 160 $templ-> assign('subpackage',$pathinfo['subpackage']); 161 $templ-> assign('name',$pathinfo['name']); 162 $templ-> assign('source_loc',$pathinfo['source_loc']); 163 $templ-> assign('docs',$pathinfo['docs']); 164 $templ-> assign("subdir" ,'../'); 165 $templ-> register_outputfilter('HTMLSmarty_outputfilter'); 166 $this-> setTargetDir($this-> getFileSourcePath($this-> base_dir)); 167 phpDocumentor_out("\n" ); 168 $this-> setSourcePaths($path); 169 $this-> writefile($this-> getFileSourceName($path).'.html',$templ> fetch('filesource.tpl')); 170 } 171 172 function writeExample($title, $path, $source) 173 { 174 $templ = & $this-> newSmarty(); 175 $templ-> assign('source',$source); 176 if (empty($title)) 177 { 178 $title = 'example'; 179 addWarning(PDERROR_EMPTY_EXAMPLE_TITLE, $path, $title); 180 } 181 $templ-> assign('title',$title); 182 $templ-> assign('file',$path); 183 $templ-> assign("subdir" ,'../'); 184 $templ-> register_outputfilter('HTMLSmarty_outputfilter'); 185 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . '__examplesource'); 186 phpDocumentor_out("\n" ); 187 $this-> writefile('exsource_'.$path.'.html',$templ-> fetch('examplesource.tpl')); 188 } 189 190 function getExampleLink($path, $title) 191 { 192 return $this-> returnLink('{$subdir}__examplesource' . PATH_DELIMITER . 'exsource_'.$path.'.html',$title); 193 } 194 195 function getSourceLink($path) 196 { 197 return $this-> returnLink('{$subdir}__filesource/' . 198 $this-> getFileSourceName($path).'.html','Source Code for this file'); 199 } 200 201 /** 202 * Retrieve a Converter-specific anchor to a segment of a source code file 203 * parsed via a {@tutorial tags.filesource.pkg} tag. 204 * @param string full path to source file 205 * @param string name of anchor 206 * @param string link text, if this is a link 207 * @param boolean returns either a link or a destination based on this 208 * parameter 209 * @return string link to an anchor, or the anchor 210 */ 211 function getSourceAnchor($sourcefile,$anchor,$text = '',$link = false) 212 { 213 if ($link) { 214 return $this-> returnLink('{$subdir}__filesource/' . 215 $this-> getFileSourceName($sourcefile) . '.html#a' . $anchor, $text);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1088 of 1382

216 } else { 217 return '<a name="a' .$anchor.'"></a>' ; 218 } 219 } 220 221 /** 222 * Return a line of highlighted source code with formatted line number 223 * 224 * If the $path is a full path, then an anchor to the line number will be 225 * added as well 226 * @param integer line number 227 * @param string highlighted source code line 228 * @param false|stringfull path to @filesource file this line is a part of, 229 * if this is a single line from a complete file. 230 * @return string formatted source code line with line number 231 */ 232 function sourceLine($linenumber, $line, $path = false) 233 { 234 $extra = ''; 235 if (strlen(str_replace("\n" , '', $line)) == 0) { 236 $extra = '&nbsp;' ; 237 } 238 if ($path) 239 { 240 return '<li><div class="src-line">' . $this> getSourceAnchor($path, $linenumber) . 241 str_replace("\n" ,'',$line) . $extra . 242 "</div></li>\n" ; 243 } else 244 { 245 return '<li><div class="src-line">' . str_replace("\n" ,'',$line) . " $extra</div></li>\n " ; 246 } 247 } 248 249 /** 250 * Used to convert the <<code>> tag in a docblock 251 * @param string 252 * @param boolean 253 * @return string 254 */ 255 function ProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 256 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 257 { 258 $trans = $this-> template_options['desctranslate']; 259 $this-> template_options['desctranslate'] = array(); 260 $example = '<ol>' . parent::ProgramExample($example, $tutorial, $inlinesourceparse, $class, $linenum, $filesourcepath) 261 .'</ol>' ; 262 $this-> template_options['desctranslate'] = $trans; 263 if (!isset($this-> template_options['desctranslate'])) return $example; 264 if (!isset($this-> template_options['desctranslate']['code'])) return $example; 265 $example = $this-> template_options['desctranslate']['code'] . $example; 266 if (!isset($this-> template_options['desctranslate']['/code'])) return $example; 267 return $example . $this-> template_options['desctranslate']['/code']; 268 } 269 270 /** 271 * @param string 272 */ 273 function TutorialExample($example) 274 { 275 $trans = $this-> template_options['desctranslate']; 276 $this-> template_options['desctranslate'] = array(); 277 $example = '<ol>' . parent::TutorialExample($example) 278 .'</ol>' ; 279 $this-> template_options['desctranslate'] = $trans; 280 if (!isset($this-> template_options['desctranslate'])) return $example; 281 if (!isset($this-> template_options['desctranslate']['code'])) return $example; 282 $example = $this-> template_options['desctranslate']['code'] . $example; 283 if (!isset($this-> template_options['desctranslate']['/code'])) return $example; 284 return $example . $this-> template_options['desctranslate']['/code']; 285 } 286 287 function getCurrentPageLink() 288 { 289 return $this-> curname . '.html'; 290 } 291

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1089 of 1382

292 function unmangle($sourcecode) 293 { 294 $sourcecode = str_replace('&nbsp;' ,' ',$sourcecode); 295 $sourcecode = str_replace('&amp;' ,'&' ,$sourcecode); 296 $sourcecode = str_replace('<br />' ,"<br>" ,$sourcecode); 297 $sourcecode = str_replace('<code>' ,'<pre>' ,$sourcecode); 298 $sourcecode = str_replace('</code>' ,'</pre>' ,$sourcecode); 299 $sourcecode = str_replace('&lt;' ,'<' ,$sourcecode); 300 $sourcecode = str_replace('&gt;' ,'>' ,$sourcecode); 301 return $sourcecode; 302 } 303 304 /** 305 * Uses htmlspecialchars() on the input 306 */ 307 function postProcess($text) 308 { 309 if ($this-> highlightingSource) { 310 return str_replace(array(' ',"\t" ), array('&nbsp;' , '&nbsp;&nbsp;&nbsp;' ), 311 htmlspecialchars($text)); 312 } 313 return htmlspecialchars($text); 314 } 315 316 /** 317 * Use the template tutorial_toc.tpl to generate a table of contents for HTML 318 * @return string table of contents formatted for use in the current output format 319 * @param array format: array(array('tagname' => section, 'link' => returnsee link, 'id' => anchor name, 'title' => from title tag),...) 320 */ 321 function formatTutorialTOC($toc) 322 { 323 $template = & $this-> newSmarty(); 324 $template-> assign('toc',$toc); 325 return $template-> fetch('tutorial_toc.tpl'); 326 } 327 328 function & SmartyInit(& $templ) 329 { 330 $this-> makeLeft(); 331 $templ-> assign("ric" ,$this-> ric_set); 332 $templ-> assign("packageindex" ,$this-> package_index); 333 $templ-> assign('hastodos',count($this-> todoList)); 334 $templ-> assign('todolink','todolist.html'); 335 $templ-> assign("subdir" ,''); 336 return $templ; 337 } 338 339 /** 340 * Writes out the template file of {@link $class_data} and unsets the template to save memory 341 * @see registerCurrentClass() 342 * @see parent::endClass() 343 */ 344 function endClass() 345 { 346 $a = '../'; 347 if (!empty($this-> subpackage)) $a .= '../'; 348 if ($this-> juststarted) 349 { 350 $this-> juststarted = false; 351 phpDocumentor_out("\n" ); 352 flush(); 353 } 354 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> class_dir); 355 $classleft = $this-> getClassLeft(); 356 $this-> class_data-> assign("compiledfileindex" ,$this-> getPageLeft()); 357 $this-> class_data-> assign("compiledclassindex" ,$classleft['class']); 358 $this-> class_data> assign("compiledinterfaceindex" ,$classleft['interface']); 359 $this-> class_data-> assign("tutorials" ,$this-> getTutorialList()); 360 $this-> class_data-> assign("contents" ,$this-> getClassContents()); 361 $this-> class_data-> assign("packageindex" ,$this-> package_index); 362 $this-> class_data-> assign("package" ,$this-> package); 363 $this-> class_data-> assign("subdir" ,$a); 364 $this-> class_data-> register_outputfilter('HTMLSmarty_outputfilter'); 365 $this-> writefile($this-> class . '.html',$this-> class_data> fetch('class.tpl')); 366 unset($this-> class_data);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1090 of 1382

367 } 368 369 function getTutorialList() 370 { 371 static $cache = false; 372 if ($cache) 373 { 374 if (isset($cache[$this-> package])) return $cache[$this-> package]; 375 } 376 $package = $this-> package; 377 if (!isset($this-> tutorials[$package])) return false; 378 foreach($this-> tutorials[$package] as $subpackage => $blah) 379 { 380 $subpackages[] = $subpackage; 381 } 382 $tutes = array(); 383 foreach($subpackages as $subpackage) 384 { 385 if (isset($this-> tutorial_tree) && is_array($this-> tutorial_tree)) 386 foreach($this-> tutorial_tree as $root => $tr) 387 { 388 if ($tr['tutorial']-> package == $package && $tr['tutorial']> subpackage == $subpackage) 389 $tutes[$tr['tutorial']-> tutorial_type][] = $this> getTutorialTree($tr['tutorial']); 390 } 391 } 392 $cache[$this-> package] = $tutes; 393 return $tutes; 394 } 395 396 function getTutorialTree($tutorial,$k = false) 397 { 398 $ret = ''; 399 if (is_object($tutorial)) $tree = parent::getTutorialTree($tutorial); else $tree = $tutorial; 400 if (!$tree) 401 { 402 $template = & $this-> newSmarty(); 403 $template-> assign('subtree',false); 404 $template-> assign('name',str_replace('.','',$tutorial-> name)); 405 $template-> assign('parent',false); 406 $template-> assign('haskids',false); 407 $template-> assign('kids',''); 408 $link = new tutorialLink; 409 $t = $tutorial; 410 $link-> addLink('',$t-> path,$t-> name,$t-> package,$t-> subpackage,$t> getTitle($this)); 411 $main = array('link' => $this-> getId($link), 'title' => $link-> title); 412 $template-> assign('main',$main); 413 return $template-> fetch('tutorial_tree.tpl'); 414 } 415 if (isset($tree['kids'])) 416 { 417 foreach($tree['kids'] as $subtree) 418 { 419 $ret .= $this-> getTutorialTree($subtree, true); 420 } 421 } 422 $template = & $this-> newSmarty(); 423 $template-> assign('subtree',$k); 424 $template-> assign('name',str_replace('.','',$tree['tutorial']-> name)); 425 $template-> assign('parent',($k ? str_replace('.','',$tree['tutorial']-> parent> name) : false)); 426 $template-> assign('haskids',strlen($ret)); 427 $template-> assign('kids',$ret); 428 $link = new tutorialLink; 429 $t = $tree['tutorial']; 430 $link-> addLink('',$t-> path,$t-> name,$t-> package,$t-> subpackage,$t> getTitle($this)); 431 $main = array('link' => $this-> getId($link), 'title' => $link-> title); 432 $template-> assign('main',$main); 433 return $template-> fetch('tutorial_tree.tpl'); 434 } 435 436 function getClassLeft() 437 { 438 if ($this-> _classleft_cache) 439 { 440 if (isset($this-> _classleft_cache[$this-> package][$this-> subpackage]))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1091 of 1382

return $this-> _classleft_cache[$this-> package][$this-> subpackage]; 441 } 442 $arr = $classarr = $interfacearr = array(); 443 if (isset($this-> left['#class'][$this-> package])) 444 foreach($this-> left['#class'][$this-> package] as $subpackage => $pages) 445 { 446 for ($i = 0; $i < count($pages); $i++) { 447 if ($pages[$i]['is_interface']) { 448 $interfacearr[$subpackage][] = $pages[$i]; 449 } else { 450 $classarr[$subpackage][] = $pages[$i]; 451 } 452 } 453 } 454 $templ = & $this-> newSmarty(); 455 $templ-> assign('classleftindex',$classarr); 456 $classarr = $templ-> fetch('classleft.tpl'); 457 $this-> _classleft_cache[$this-> package][$this-> subpackage]['class'] = $classarr; 458 $templ = & $this-> newSmarty(); 459 $templ-> assign('classleftindex',$interfacearr); 460 $interfacearr = $templ-> fetch('classleft.tpl'); 461 $this-> _classleft_cache[$this-> package][$this-> subpackage]['interface'] = 462 $interfacearr; 463 return $this-> _classleft_cache[$this-> package][$this-> subpackage]; 464 } 465 466 function getClassContents() 467 { 468 if ($this-> _classcontents_cache) 469 { 470 if (isset($this-> _classcontents_cache[$this-> package][$this> subpackage][$this-> class])) return $this-> _classcontents_cache[$this-> package][$this> subpackage][$this-> class]; 471 } 472 $arr = array(); 473 foreach($this-> class_contents[$this-> package][$this-> subpackage][$this> class] as $i => $link) 474 { 475 if (is_object($link)) 476 $arr[$link-> type][] = $this-> returnSee($link,$link-> name); 477 } 478 $this-> _classcontents_cache[$this-> package][$this-> subpackage][$this> class] = $arr; 479 return $arr; 480 } 481 482 function getPageContents() 483 { 484 if (!isset($this-> path)) $this-> path = '#####'; 485 if ($this-> _pagecontents_cache) 486 { 487 if (isset($this-> _pagecontents_cache[$this-> package][$this> subpackage][$this-> path])) return $this-> _pagecontents_cache[$this-> package][$this> subpackage][$this-> path]; 488 } 489 $arr = array(); 490 foreach($this-> page_contents[$this-> curpage-> package][$this-> curpage> subpackage] as $i => $link) 491 { 492 if (is_object($link)) 493 $arr[$link-> type][$i] = $this-> returnSee($link); 494 } 495 $this-> _pagecontents_cache[$this-> package][$this-> subpackage][$this-> path] = $arr; 496 return $arr; 497 } 498 499 function getPageLeft() 500 { 501 if ($this-> _pageleft_cache) 502 { 503 if (isset($this-> _pageleft_cache[$this-> package][$this-> subpackage])) return $this-> _pageleft_cache[$this-> package][$this-> subpackage]; 504 } 505 $arr = array(); 506 if (isset($this-> left[$this-> package])) 507 foreach($this-> left[$this-> package] as $subpackage => $pages) 508 { 509 $arr[$subpackage] = $pages;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1092 of 1382

510 } 511 $templ = & $this-> newSmarty(); 512 $templ-> assign('fileleftindex',$arr); 513 $arr = $templ-> fetch('fileleft.tpl'); 514 $this-> _pageleft_cache[$this-> package][$this-> subpackage] = $arr; 515 return $arr; 516 } 517 518 /** 519 * Writes out the template file of {@link $page_data} and unsets the template to save memory 520 * @see registerCurrent() 521 * @see parent::endPage() 522 */ 523 function endPage() 524 { 525 $this-> package = $this-> curpage-> package; 526 $this-> subpackage = $this-> curpage-> subpackage; 527 $a = '../'; 528 if (!empty($this-> subpackage)) $a .= '../'; 529 $classleft = $this-> getClassLeft(); 530 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $this-> page_dir); 531 $this-> page_data-> assign("contents" ,$this-> getPageContents()); 532 $this-> page_data-> assign("compiledfileindex" ,$this-> getPageLeft()); 533 $this-> page_data-> assign("compiledclassindex" ,$classleft['class']); 534 $this-> page_data> assign("compiledinterfaceindex" ,$classleft['interface']); 535 $this-> page_data-> assign("tutorials" ,$this-> getTutorialList()); 536 $this-> page_data-> assign("packageindex" ,$this-> package_index); 537 $this-> page_data-> assign("package" ,$this-> package); 538 $this-> page_data-> assign("subdir" ,$a); 539 $this-> page_data-> register_outputfilter('HTMLSmarty_outputfilter'); 540 $this-> writefile($this-> page . '.html',$this-> page_data-> fetch('page.tpl')); 541 unset($this-> page_data); 542 } 543 544 /** 545 * @param string 546 * @param string 547 * @return string &lt;a href="'.$link.'">'.$text.'</a&gt; 548 */ 549 function returnLink($link,$text) 550 { 551 return '<a href="' .$link.'">' .$text.'</a>' ; 552 } 553 554 function makeLeft() 555 { 556 if ($this-> _done_package_index) return; 557 $this-> _done_package_index = true; 558 if (!isset($this-> package_index)) 559 foreach($this-> all_packages as $key => $val) 560 { 561 if (isset($this-> pkg_elements[$key])) 562 { 563 if (!isset($start)) $start = $key; 564 $this-> package_index[] = array('link' => " li_$key.html" , 'title' => $key); 565 } 566 } 567 foreach($this-> page_elements as $package => $o1) 568 { 569 foreach($o1 as $subpackage => $links) 570 { 571 for($i=0;$i< count($links);$i++) 572 { 573 $this-> left[$package][$subpackage][] = 574 array("link" => $this-> getId($links[$i]), "title" => $links[$i]-> name); 575 } 576 } 577 } 578 foreach($this-> class_elements as $package => $o1) 579 { 580 foreach($o1 as $subpackage => $links) 581 { 582 for($i=0;$i< count($links);$i++) 583 { 584 $isinterface = false; 585 if ($links[$i]-> type == 'class') { 586 $class = $this-> classes-> getClass($links[$i]-> name,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1093 of 1382

587 $links[$i]-> path); 588 if ($class) { 589 $isinterface = $class-> isInterface(); 590 } 591 } 592 $this-> left['#class'][$package][$subpackage][] = 593 array("link" => $this-> getId($links[$i]), "title" => $links[$i]-> name, 'is_interface' => $isinterface); 594 } 595 } 596 } 597 } 598 599 /** 600 * HTMLdefaultConverter chooses to format both package indexes and the complete index here 601 * 602 * This function formats output for the elementindex.html and pkgelementindex.html template files. It then 603 * writes them to the target directory 604 * @see generateElementIndex(), generatePkgElementIndex() 605 */ 606 function formatPkgIndex() 607 { 608 list($package_indexes,$packages,$mletters) = $this-> generatePkgElementIndexes(); 609 for($i=0;$i< count($package_indexes);$i++) 610 { 611 $template = & $this-> newSmarty(); 612 $this-> package = $package_indexes[$i]['package']; 613 $this-> subpackage = ''; 614 $classleft = $this-> getClassLeft(); 615 $template-> assign("compiledfileindex" ,$this-> getPageLeft()); 616 $template-> assign("compiledclassindex" ,$classleft['class']); 617 $template-> assign("compiledinterfaceindex" ,$classleft['interface']); 618 $template-> assign("tutorials" ,$this-> getTutorialList()); 619 $template-> assign("index" ,$package_indexes[$i]['pindex']); 620 $template-> assign("package" ,$package_indexes[$i]['package']); 621 $template> assign("letters" ,$mletters[$package_indexes[$i]['package']]); 622 $template-> assign("title" ,"Package " .$package_indexes[$i]['package']." Element Index" ); 623 $template-> assign("date" ,date("r" ,time())); 624 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 625 $this-> setTargetDir($this-> base_dir); 626 $this> writefile('elementindex_'.$package_indexes[$i]['package'].'.html',$template> fetch('pkgelementindex.tpl')); 627 } 628 phpDocumentor_out("\n" ); 629 flush(); 630 } 631 632 /** 633 * HTMLdefaultConverter uses this function to format template index.html and packages.html 634 * 635 * This function generates the package list from {@link $all_packages}, eliminating any 636 * packages that don't have any entries in their package index (no files at all, due to @ignore 637 * or other factors). Then it uses the default package name as the first package index to display. 638 * It sets the right pane to be either a blank file with instructions on making packagelevel docs, 639 * or the package-level docs for the default package. 640 * @global string Used to set the starting package to display 641 */ 642 function formatIndex() 643 { 644 global $phpDocumentor_DefaultPackageName; 645 if (!isset($this-> package_index)) 646 { 647 debug("\nERROR: Nothing parsed, check the command-line" ); 648 die(); 649 } 650 list($elindex,$mletters) = $this-> generateElementIndex(); 651 $template = & $this-> newSmarty(); 652 $template-> assign("index" ,$elindex); 653 $template-> assign("letters" ,$mletters); 654 $template-> assign("title" ,"Element Index" ); 655 $template-> assign("package" , false); 656 $template-> assign("date" ,date("r" ,time())); 657 phpDocumentor_out("\n" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1094 of 1382

658 flush(); 659 $this-> setTargetDir($this-> base_dir); 660 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 661 $this-> writefile('elementindex.html',$template-> fetch('elementindex.tpl')); 662 usort($this-> package_index,"HTMLSmarty_pindexcmp" ); 663 $index = & $this-> newSmarty(); 664 foreach($this-> all_packages as $key => $val) 665 { 666 if (isset($this-> pkg_elements[$key])) 667 { 668 if (!isset($start)) $start = $key; 669 if (!isset($this-> package_pages[$key])) $this-> writeNewPPage($key); 670 } 671 } 672 // Created index.html 673 $start = $phpDocumentor_DefaultPackageName; 674 if (!isset($this-> pkg_elements[$key])) 675 { 676 // if there are no elements, use a random package as the default 677 $a = array_keys($this-> pkg_elements); 678 $start = array_shift($a); 679 } 680 $this-> package = $start; 681 $this-> subpackage = ''; 682 $classleft = $this-> getClassLeft(); 683 $index-> assign("compiledfileindex" ,$this-> getPageLeft()); 684 $index-> assign("compiledclassindex" ,$classleft['class']); 685 $index-> assign("compiledinterfaceindex" ,$classleft['interface']); 686 $index-> assign('hastodos',count($this-> todoList)); 687 $index-> assign('todolink','todolist.html'); 688 $index-> assign("tutorials" ,$this-> getTutorialList()); 689 $index-> assign("date" ,date("r" ,time())); 690 $index-> assign("package" ,$this-> package); 691 $index-> assign("title" ,$this-> title); 692 $index-> assign("start" ," li_$start.html" ); 693 if (isset($this-> package_pages[$start])) 694 { 695 $index-> assign("contents" ,$this-> package_pages[$start]); 696 } 697 $index-> register_outputfilter('HTMLSmarty_outputfilter'); 698 phpDocumentor_out("\n" ); 699 flush(); 700 $this-> setTargetDir($this-> base_dir); 701 $this-> writefile("index.html" ,$index-> fetch('index.tpl')); 702 unset($index); 703 704 } 705 706 function writeNewPPage($key) 707 { 708 $template = & $this-> newSmarty(); 709 $this-> package = $key; 710 $this-> subpackage = ''; 711 $classleft = $this-> getClassLeft(); 712 $template-> assign("compiledfileindex" ,$this-> getPageLeft()); 713 $template-> assign("compiledclassindex" ,$classleft['class']); 714 $template-> assign("compiledinterfaceindex" ,$classleft['interface']); 715 $template-> assign("tutorials" ,$this-> getTutorialList()); 716 $template-> assign("date" ,date("r" ,time())); 717 $template-> assign("title" ,$this-> title); 718 $template-> assign("package" ,$key); 719 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 720 phpDocumentor_out("\n" ); 721 flush(); 722 $this-> setTargetDir($this-> base_dir); 723 $this-> writefile(" li_$key.html" ,$template-> fetch('index.tpl')); 724 unset($template); 725 } 726 727 /** 728 * Generate indexes for li_package.html and classtree output files 729 * 730 * This function generates the li_package.html files from the template file left.html. It does this by 731 * iterating through each of the $page_elements, $class_elements and $function_elements arrays to retrieve 732 * the pre-sorted {@link abstractLink} descendants needed for index generation. Conversion of these links to 733 * text is done by {@link returnSee()}. 734 *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1095 of 1382

735 * Then it uses {@link generateFormattedClassTrees()} to create class trees from the template file classtrees.html. Output 736 * filename is classtrees_packagename.html. This function also unsets {@link $elements} and {@link $pkg_elements} to free 737 * up the considerable memory these two class vars use 738 * @see $page_elements, $class_elements, $function_elements 739 */ 740 function formatLeftIndex() 741 { 742 phpDocumentor_out("\n" ); 743 flush(); 744 $this-> setTargetDir($this-> base_dir); 745 if (!isset($this-> left)) 746 { 747 debug("Nothing parsed, check the command-line" ); 748 die(); 749 } 750 foreach($this-> all_packages as $package => $rest) 751 { 752 if (!isset($this-> pkg_elements[$package])) continue; 753 // Create class tree page 754 $template = & $this-> newSmarty(); 755 $classleft = $this-> getClassLeft(); 756 $template-> assign("compiledfileindex" ,$this-> getPageLeft()); 757 $template-> assign("compiledclassindex" ,$classleft['class']); 758 $template-> assign("compiledinterfaceindex" ,$classleft['interface']); 759 $template-> assign("classtrees" ,$this> generateFormattedClassTrees($package)); 760 $template-> assign("interfaces" ,$this> generateFormattedInterfaceTrees($package)); 761 $template-> assign("package" ,$package); 762 $template-> assign("date" ,date("r" ,time())); 763 $template-> assign("title" ," Class Trees for Package $package" ); 764 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 765 $this-> writefile(" classtrees_$package.html" ,$template> fetch('classtrees.tpl')); 766 phpDocumentor_out("\n" ); 767 flush(); 768 } 769 $this-> writeRIC(); 770 // free up considerable memory 771 unset($this-> elements); 772 unset($this-> pkg_elements); 773 } 774 775 776 /** 777 * This function takes an {@link abstractLink} descendant and returns an html link 778 * 779 * @param abstractLink a descendant of abstractlink should be passed, and never text 780 * @param string text to display in the link 781 * @param boolean this parameter is not used, and is deprecated 782 * @param boolean determines whether the returned text is enclosed in an &lt;a> tag 783 */ 784 function returnSee(& $element, $eltext = false, $with_a = true) 785 { 786 if (!is_object($element) || !$element) return false; 787 if (!$with_a) return $this-> getId($element, false); 788 if (!$eltext) 789 { 790 $eltext = ''; 791 switch($element-> type) 792 { 793 case 'tutorial' : 794 $eltext = strip_tags($element-> title); 795 break; 796 case 'method' : 797 case 'var' : 798 case 'const' : 799 $eltext .= $element-> class.'::'; 800 case 'page' : 801 case 'define' : 802 case 'class' : 803 case 'function' : 804 case 'global' : 805 default : 806 $eltext .= $element-> name; 807 if ($element-> type == 'function' || $element-> type == 'method') $eltext .= '()';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1096 of 1382

808 break; 809 } 810 } 811 return '<a href="' .$this-> getId($element).'">' .$eltext.'</a>' 812 } 813 814 function getId($element, $fullpath = true) 815 { 816 if (phpDocumentor_get_class($element) == 'parserdata') 817 { 818 $element = $this-> addLink($element-> parent); 819 $elp = $element-> parent; 820 } elseif (is_a($element, 'parserbase')) 821 { 822 $elp = $element; 823 $element = $this-> addLink($element); 824 } 825 $c = ''; 826 if (!empty($element-> subpackage)) 827 { 828 $c = '/'.$element-> subpackage; 829 } 830 $b = '{$subdir}'; 831 switch ($element-> type) 832 { 833 case 'page' : 834 if ($fullpath) 835 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html'; 836 return 'top'; 837 break; 838 case 'define' : 839 case 'global' : 840 case 'function' : 841 if ($fullpath) 842 return $b.$element-> package.$c.'/'.$element-> fileAlias.'.html#'.$element> type.$element-> name; 843 return $element-> type.$element-> name; 844 break; 845 case 'class' : 846 if ($fullpath) 847 return $b.$element-> package.$c.'/'.$element-> name.'.html'; 848 return 'top'; 849 break; 850 case 'method' : 851 case 'var' : 852 case 'const' : 853 if ($fullpath) 854 return $b.$element-> package.$c.'/'.$element-> class.'.html#'.$element> type.$element-> name; 855 return $element-> type.$element-> name; 856 break; 857 case 'tutorial' : 858 $d = ''; 859 if ($element-> section) 860 { 861 $d = '#'.$element-> section; 862 } 863 return $b.$element-> package.$c.'/tutorial_'.$element-> name.'.html'.$d; 864 } 865 } 866 867 /** 868 * Convert README/INSTALL/CHANGELOG file contents to output format 869 * @param README|INSTALL|CHANGELOG 870 * @param string contents of the file 871 */ 872 function Convert_RIC($name, $contents) 873 { 874 $this-> ric_contents[$name] = $contents; 875 $this-> ric_set[] = array('file' => 'ric_'.$name . '.html','name' => $name); 876 } 877 878 function writeRIC() 879 { 880 if ($this-> _ric_done) return; 881 $this-> _ric_done = true; 882 foreach($this-> ric_contents as $name => $contents) 883 { 884 $template = & $this-> newSmarty(); 885 $template-> assign('contents',$contents);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1097 of 1382

886 $template-> assign('name',$name); 887 $template-> assign('title',$name); 888 $this-> setTargetDir($this-> base_dir); 889 $this-> writefile('ric_'.$name . '.html',$template-> fetch('ric.tpl')); 890 } 891 } 892 893 function ConvertTodoList() 894 { 895 $todolist = array(); 896 foreach($this-> todoList as $package => $alltodos) 897 { 898 foreach($alltodos as $todos) 899 { 900 $converted = array(); 901 $converted['link'] = $this-> returnSee($todos[0]); 902 if (!is_array($todos[1])) 903 { 904 $converted['todos'][] = $todos[1]-> Convert($this); 905 } else 906 { 907 foreach($todos[1] as $todo) 908 { 909 $converted['todos'][] = $todo-> Convert($this); 910 } 911 } 912 $todolist[$package][] = $converted; 913 } 914 } 915 $templ = & $this-> newSmarty(); 916 $templ-> assign('todos',$todolist); 917 $templ-> register_outputfilter('HTMLSmarty_outputfilter'); 918 $this-> setTargetDir($this-> base_dir); 919 $this-> writefile('todolist.html',$templ-> fetch('todolist.tpl')); 920 } 921 922 /** 923 * Create errors.html template file output 924 * 925 * This method takes all parsing errors and warnings and spits them out ordered by file and line number. 926 * @global ErrorTracker We'll be using it's output facility 927 */ 928 function ConvertErrorLog() 929 { 930 global $phpDocumentor_errors; 931 $allfiles = array(); 932 $files = array(); 933 $warnings = $phpDocumentor_errors-> returnWarnings(); 934 $errors = $phpDocumentor_errors-> returnErrors(); 935 $template = & $this-> newSmarty(); 936 foreach($warnings as $warning) 937 { 938 $file = '##none'; 939 $linenum = 'Warning'; 940 if ($warning-> file) 941 { 942 $file = $warning-> file; 943 $allfiles[$file] = 1; 944 $linenum .= ' on line '.$warning-> linenum; 945 } 946 $files[$file]['warnings'][] = array('name' => $linenum, 'listing' => $warning> data); 947 } 948 foreach($errors as $error) 949 { 950 $file = '##none'; 951 $linenum = 'Error'; 952 if ($error-> file) 953 { 954 $file = $error-> file; 955 $allfiles[$file] = 1; 956 $linenum .= ' on line '.$error-> linenum; 957 } 958 $files[$file]['errors'][] = array('name' => $linenum, 'listing' => $error> data); 959 } 960 $i=1; 961 $af = array(); 962 foreach($allfiles as $file => $num)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1098 of 1382

963 { 964 $af[$i++] = $file; 965 } 966 $allfiles = $af; 967 usort($allfiles,'strnatcasecmp'); 968 $allfiles[0] = "Post-parsing" ; 969 foreach($allfiles as $i => $a) 970 { 971 $allfiles[$i] = array('file' => $a); 972 } 973 $out = array(); 974 foreach($files as $file => $data) 975 { 976 if ($file == '##none') $file = 'Post-parsing'; 977 $out[$file] = $data; 978 } 979 $template-> assign("files" ,$allfiles); 980 $template-> assign("all" ,$out); 981 $template-> assign("title" ,"phpDocumentor Parser Errors and Warnings" ); 982 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 983 $this-> setTargetDir($this-> base_dir); 984 $this-> writefile("errors.html" ,$template-> fetch('errors.tpl')); 985 unset($template); 986 phpDocumentor_out("\n\nTo view errors and warnings, look at " .$this> base_dir. PATH_DELIMITER . "errors.html\n" ); 987 flush(); 988 } 989 990 function getCData($value) 991 { 992 return '<pre>' .htmlentities($value).'</pre>' ; 993 } 994 995 function getTutorialId($package,$subpackage,$tutorial,$id) 996 { 997 return $id; 998 } 999 1000 /** 1001 * Converts package page and sets its package as used in {@link $package_pages} 1002 * @param parserPackagePage 1003 */ 1004 function convertPackagepage(& $element) 1005 { 1006 phpDocumentor_out("\n" ); 1007 flush(); 1008 $template = & $this-> newSmarty(); 1009 $this-> package = $element-> package; 1010 $this-> subpackage = ''; 1011 $classleft = $this-> getClassLeft(); 1012 $template-> assign("compiledfileindex" ,$this-> getPageLeft()); 1013 $template-> assign("compiledclassindex" ,$classleft['class']); 1014 $template-> assign("compiledinterfaceindex" ,$classleft['interface']); 1015 $template-> assign("tutorials" ,$this-> getTutorialList()); 1016 $template-> assign("date" ,date("r" ,time())); 1017 $template-> assign("title" ,$this-> title); 1018 $template-> assign("package" ,$element-> package); 1019 $x = $element-> Convert($this); 1020 $x = substr($x,strpos($x,'<body' )); 1021 $template-> assign("contents" ,trim(substr($x,strpos($x,'>' ) + 1))); 1022 $this-> package_pages[$element-> package] = trim(substr($x,strpos($x,'>' ) + 1)); 1023 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 1024 phpDocumentor_out("\n" ); 1025 flush(); 1026 $this-> setTargetDir($this-> base_dir); 1027 $this-> writefile("li_" .$element-> package.".html" ,$template> fetch('index.tpl')); 1028 unset($template); 1029 } 1030 1031 /** 1032 * @param parserTutorial 1033 */ 1034 function convertTutorial(& $element) 1035 { 1036 phpDocumentor_out("\n" ); 1037 flush(); 1038 $template = & parent::convertTutorial($element); 1039 $this-> package = $element-> package;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1099 of 1382

1040 $this-> subpackage = $element-> subpackage; 1041 $classleft = $this-> getClassLeft(); 1042 $template-> assign("compiledfileindex" ,$this-> getPageLeft()); 1043 $template-> assign("compiledclassindex" ,$classleft['class']); 1044 $template-> assign("compiledinterfaceindex" ,$classleft['interface']); 1045 $template-> assign("tutorials" ,$this-> getTutorialList()); 1046 $template-> assign("title" ,strip_tags($element-> getTitle($this))); 1047 $contents = $element-> Convert($this); 1048 if ($element-> name == $this-> package . '.pkg') 1049 { 1050 $this-> package_pages[$element-> package] = $contents; 1051 } 1052 $a = '../'; 1053 if (!empty($element-> subpackage)) $a .= $a; 1054 $template-> assign("subdir" ,$a); 1055 $a = ''; 1056 if ($element-> subpackage) $a = PATH_DELIMITER . $element-> subpackage; 1057 $template-> register_outputfilter('HTMLSmarty_outputfilter'); 1058 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $element-> package . $a); 1059 $this-> writeFile('tutorial_'.$element-> name.'.html',$template> fetch('tutorial.tpl')); 1060 if ($element-> name == $element-> package . '.pkg') 1061 { 1062 phpDocumentor_out("\n" ); 1063 flush(); 1064 // package-level docs 1065 $this-> setTargetDir($this-> base_dir); 1066 $template-> assign("subdir" ,''); 1067 $this-> writeFile('li_'.$element-> package.'.html',$template> fetch('tutorial.tpl')); 1068 } 1069 unset($template); 1070 } 1071 1072 /** 1073 * Converts class for template output 1074 * @see prepareDocBlock(), generateChildClassList(), generateFormattedClassTree(), getFormattedConflicts() 1075 * @see getFormattedInheritedMethods(), getFormattedInheritedVars() 1076 * @param parserClass 1077 */ 1078 function convertClass(& $element) 1079 { 1080 parent::convertClass($element); 1081 $this-> class_dir = $element-> docblock-> package; 1082 if (!empty($element-> docblock-> subpackage)) $this-> class_dir .= PATH_DELIMITER . $element-> docblock-> subpackage; 1083 $a = '../classtrees_'; 1084 if ($element-> docblock-> subpackage != '') $a = " ../$a" ; 1085 1086 $this-> class_data-> assign('subdir',$a); 1087 $this-> class_data-> assign("title" ,"Docs For Class " . $element-> getName()); 1088 $this-> class_data-> assign("page" ,$element-> getName() . '.html'); 1089 } 1090 1091 /** 1092 * Converts class variables for template output 1093 * @see prepareDocBlock(), getFormattedConflicts() 1094 * @param parserDefine 1095 */ 1096 function convertVar(& $element) 1097 { 1098 parent::convertVar($element, array('var_dest' => $this-> getId($element,false))); 1099 } 1100 1101 /** 1102 * Converts class variables for template output 1103 * @see prepareDocBlock(), getFormattedConflicts() 1104 * @param parserDefine 1105 */ 1106 function convertConst(& $element) 1107 { 1108 parent::convertConst($element, array('const_dest' => $this> getId($element,false))); 1109 } 1110 1111 /** 1112 * Converts class methods for template output 1113 * @see prepareDocBlock(), getFormattedConflicts()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1100 of 1382

1114 * @param parserDefine 1115 */ 1116 function convertMethod(& $element) 1117 { 1118 parent::convertMethod($element, array('method_dest' => $this> getId($element,false))); 1119 } 1120 1121 /** 1122 * Converts function for template output 1123 * @see prepareDocBlock(), parserFunction::getFunctionCall(), getFormattedConflicts() 1124 * @param parserFunction 1125 */ 1126 function convertFunction(& $element) 1127 { 1128 $funcloc = $this-> getId($this-> addLink($element)); 1129 parent::convertFunction($element,array('function_dest' => $this> getId($element,false))); 1130 } 1131 1132 /** 1133 * Converts include elements for template output 1134 * @see prepareDocBlock() 1135 * @param parserInclude 1136 */ 1137 function convertInclude(& $element) 1138 { 1139 parent::convertInclude($element, array('include_file' => '_'.strtr($element> getValue(),array('"' => '', "'" => '','.' => '_')))); 1140 } 1141 1142 /** 1143 * Converts defines for template output 1144 * @see prepareDocBlock(), getFormattedConflicts() 1145 * @param parserDefine 1146 */ 1147 function convertDefine(& $element) 1148 { 1149 parent::convertDefine($element, array('define_link' => $this> getId($element,false))); 1150 } 1151 1152 /** 1153 * Converts global variables for template output 1154 * @param parserGlobal 1155 * @see prepareDocBlock(), getFormattedConflicts() 1156 */ 1157 function convertGlobal(& $element) 1158 { 1159 parent::convertGlobal($element, array('global_link' => $this> getId($element,false))); 1160 } 1161 1162 /** 1163 * converts procedural pages for template output 1164 * @see prepareDocBlock(), getClassesOnPage() 1165 * @param parserData 1166 */ 1167 function convertPage(& $element) 1168 { 1169 parent::convertPage($element); 1170 $this-> juststarted = true; 1171 $this-> page_dir = $element-> parent-> package; 1172 if (!empty($element-> parent-> subpackage)) $this-> page_dir .= PATH_DELIMITER . $element-> parent-> subpackage; 1173 // registering stuff on the template 1174 $a = '../'; 1175 if (!empty($element-> docblock-> subpackage)) $a = $a . $a; 1176 $this-> page_data-> assign('subdir',$a); 1177 $this-> page_data-> assign("page" ,$this-> getPageName($element) . '.html'); 1178 $this-> page_data-> assign("title" ,"Docs for page " .$element> parent-> getFile()); 1179 } 1180 1181 function getPageName(& $element) 1182 { 1183 if (phpDocumentor_get_class($element) == 'parserpage') return '_'.$element> getName(); 1184 return '_'.$element-> parent-> getName();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1101 of 1382

1185 } 1186 1187 /** 1188 * returns an array containing the class inheritance tree from the root object to the class 1189 * 1190 * @param parserClass class variable 1191 * @return array Format: array(root,child,child,child,...,$class) 1192 * @uses parserClass::getParentClassTree() 1193 */ 1194 1195 function generateFormattedClassTree($class) 1196 { 1197 $tree = $class-> getParentClassTree($this); 1198 $out = ''; 1199 if (count($tree) - 1) 1200 { 1201 $result = array($class-> getName()); 1202 $parent = $tree[$class-> getName()]; 1203 $distance[] = ''; 1204 while ($parent) 1205 { 1206 $x = $parent; 1207 if (is_object($parent)) 1208 { 1209 $subpackage = $parent-> docblock-> subpackage; 1210 $package = $parent-> docblock-> package; 1211 $x = $parent; 1212 $x = $parent-> getLink($this); 1213 if (!$x) $x = $parent-> getName(); 1214 } 1215 $result[] = 1216 $x; 1217 $distance[] = 1218 "\n%s|\n" . 1219 "%s--" ; 1220 if (is_object($parent)) 1221 $parent = $tree[$parent-> getName()]; 1222 elseif (isset($tree[$parent])) 1223 $parent = $tree[$parent]; 1224 } 1225 $nbsp = ' '; 1226 for($i=count($result) - 1;$i>= 0;$i--) 1227 { 1228 $my_nbsp = ''; 1229 for($j=0;$j< count($result) - $i;$j++) $my_nbsp .= $nbsp; 1230 $distance[$i] = sprintf($distance[$i],$my_nbsp,$my_nbsp); 1231 } 1232 return array('classes'=> array_reverse($result),'distance'=> array_reverse($distance)); 1233 } else 1234 { 1235 return array('classes'=> $class-> getName(),'distance'=>array( '')); 1236 } 1237 } 1238 1239 /** @access private */ 1240 function sortVar($a, $b) 1241 { 1242 return strnatcasecmp($a-> getName(),$b-> getName()); 1243 } 1244 1245 /** @access private */ 1246 function sortMethod($a, $b) 1247 { 1248 if ($a-> isConstructor) return -1; 1249 if ($b-> isConstructor) return 1; 1250 return strnatcasecmp($a-> getName(),$b-> getName()); 1251 } 1252 1253 /** 1254 * returns a template-enabled array of class trees 1255 * 1256 * @param string $package package to generate a class tree for 1257 * @see $roots, HTMLConverter::getRootTree() 1258 */ 1259 function generateFormattedClassTrees($package) 1260 { 1261 if (!isset($this-> roots['normal'][$package]) && 1262 !isset($this-> roots['special'][$package])) { 1263 return array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1102 of 1382

1264 } 1265 $trees = array(); 1266 if (isset($this-> roots['normal'][$package])) { 1267 $roots = $this-> roots['normal'][$package]; 1268 for($i=0;$i< count($roots);$i++) 1269 { 1270 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1271 if ($root && $root-> isInterface()) { 1272 continue; 1273 } 1274 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1275 } 1276 } 1277 if (isset($this-> roots['special'][$package])) { 1278 $roots = $this-> roots['special'][$package]; 1279 foreach ($roots as $parent => $classes) { 1280 $thistree = ''; 1281 foreach ($classes as $classinfo) { 1282 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1283 if ($root && $root-> isInterface()) { 1284 continue; 1285 } 1286 $thistree .= 1287 $this-> getRootTree( 1288 $this-> getSortedClassTreeFromClass( 1289 $classinfo, 1290 $package, 1291 ''), 1292 $package, 1293 true); 1294 } 1295 if (!$thistree) { 1296 continue; 1297 } 1298 $trees[] = array( 1299 'class' => $parent, 1300 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1301 ); 1302 } 1303 } 1304 return $trees; 1305 } 1306 1307 /** 1308 * returns a template-enabled array of interface inheritance trees 1309 * 1310 * @param string $package package to generate a class tree for 1311 * @see $roots, HTMLConverter::getRootTree() 1312 */ 1313 function generateFormattedInterfaceTrees($package) 1314 { 1315 if (!isset($this-> roots['normal'][$package]) && 1316 !isset($this-> roots['special'][$package])) { 1317 return array(); 1318 } 1319 $trees = array(); 1320 if (isset($this-> roots['normal'][$package])) { 1321 $roots = $this-> roots['normal'][$package]; 1322 for($i=0;$i< count($roots);$i++) 1323 { 1324 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1325 if ($root && ! $root-> isInterface()) { 1326 continue; 1327 } 1328 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1329 } 1330 } 1331 if (isset($this-> roots['special'][$package])) { 1332 $roots = $this-> roots['special'][$package]; 1333 foreach ($roots as $parent => $classes) { 1334 $thistree = ''; 1335 foreach ($classes as $classinfo) { 1336 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1337 if ($root && ! $root-> isInterface()) { 1338 continue;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1103 of 1382

1339 } 1340 $thistree .= 1341 $this-> getRootTree( 1342 $this-> getSortedClassTreeFromClass( 1343 $classinfo, 1344 $package, 1345 ''), 1346 $package, 1347 true); 1348 } 1349 if (!$thistree) { 1350 continue; 1351 } 1352 $trees[] = array( 1353 'class' => $parent, 1354 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1355 ); 1356 } 1357 } 1358 return $trees; 1359 } 1360 1361 /** 1362 * return formatted class tree for the Class Trees page 1363 * 1364 * @param array $tree output from {@link getSortedClassTreeFromClass()} 1365 * @param string $package package 1366 * @param boolean $nounknownparent if true, an object's parent will not be checked 1367 * @see Classes::$definitechild, generateFormattedClassTrees() 1368 * @return string 1369 */ 1370 function getRootTree($tree, $package, $noparent = false) 1371 { 1372 if (!$tree) return ''; 1373 $my_tree = ''; 1374 $cur = '#root'; 1375 $lastcur = array(false); 1376 $kids = array(); 1377 $dopar = false; 1378 if (!$noparent && $tree[$cur]['parent']) 1379 { 1380 $dopar = true; 1381 if (!is_object($tree[$cur]['parent'])) 1382 { 1383 // debug("parent ".$tree[$cur]['parent']." not found"); 1384 $my_tree .= '<li>' . $tree[$cur]['parent'] .'<ul>' ; 1385 } 1386 else 1387 { 1388 // debug("parent ".$this>returnSee($tree[$cur]['parent'])." in other package"); 1389 $root = $this-> classes-> getClassByPackage($tree[$cur]['parent']-> name, 1390 $package); 1391 $my_tree .= '<li>' . $this-> returnSee($tree[$cur]['parent']); 1392 if ($tree[$cur]['parent']-> package != $package) $my_tree .= ' <b>(Different package)</b><ul>' ; 1393 } 1394 } 1395 do 1396 { 1397 // fancy_debug($cur,$lastcur,$kids); 1398 if (count($tree[$cur]['children'])) 1399 { 1400 // debug("$cur has children"); 1401 if (!isset($kids[$cur])) 1402 { 1403 // debug("set $cur kids"); 1404 $kids[$cur] = 1; 1405 $root = $this-> classes-> getClassByPackage( 1406 $tree[$cur]['link']-> name, 1407 $tree[$cur]['link']-> package); 1408 if ($implements = $root-> getImplements()) { 1409 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link']) . 1410 ' (implements '; 1411 foreach ($implements as $i => $interface) { 1412 if ($i && $i != count($implements) - 1) $my_tree .= ', '; 1413 if ($link = $this-> getLink('object ' . $interface)) { 1414 $my_tree .= $this-> returnSee($link); 1415 } else {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1104 of 1382

1416 $my_tree .= $interface; 1417 } 1418 } 1419 $my_tree .= ')'; 1420 } else { 1421 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link']); 1422 } 1423 $my_tree .= '<ul>' ."\n" ; 1424 } 1425 array_push($lastcur,$cur); 1426 list(,$cur) = each($tree[$cur]['children']); 1427 // var_dump('listed',$cur); 1428 if ($cur) 1429 { 1430 $cur = $cur['package'] . '#' . $cur['class']; 1431 // debug("set cur to child $cur"); 1432 // $my_tree .= '<li>'.$this->returnSee($tree[$cur]['link']); 1433 continue; 1434 } else 1435 { 1436 // debug("end of children for $cur"); 1437 $cur = array_pop($lastcur); 1438 $cur = array_pop($lastcur); 1439 $my_tree .= '</ul></li>' ."\n" ; 1440 if ($dopar && ( $cur == '#root' || !$cur)) $my_tree .= '</ul></li>' ; 1441 } 1442 } else 1443 { 1444 // debug("$cur has no children"); 1445 $my_tree .= '<li>' .$this> returnSee($tree[$cur]['link'])."</li>" ; 1446 if ($dopar && $cur == '#root') $my_tree .= '</ul></li>' ; 1447 $cur = array_pop($lastcur); 1448 } 1449 } while ($cur); 1450 return $my_tree; 1451 } 1452 1453 /** 1454 * Generate indexing information for given element 1455 * 1456 * @param parserElement descendant of parserElement 1457 * @see generateElementIndex() 1458 * @return array 1459 */ 1460 function getIndexInformation($elt) 1461 { 1462 $Result['type'] = $elt-> type; 1463 $Result['file_name'] = $elt-> file; 1464 $Result['path'] = $elt-> getPath(); 1465 1466 if (isset($elt-> docblock)) 1467 { 1468 $Result['description'] = $elt-> docblock-> getSDesc($this); 1469 1470 if ($elt-> docblock-> hasaccess) 1471 $Result['access'] = $elt-> docblock-> tags['access'][0]> value; 1472 else 1473 $Result['access'] = 'public'; 1474 1475 $Result['abstract'] = isset ($elt-> docblock-> tags['abstract'][0]); 1476 } 1477 else 1478 $Result['description'] = ''; 1479 1480 $aa = $Result['description']; 1481 if (!empty($aa)) $aa = " <br>&nbsp;&nbsp;&nbsp;&nbsp; $aa" ; 1482 1483 switch($elt-> type) 1484 { 1485 case 'class': 1486 $Result['name'] = $elt-> getName(); 1487 $Result['title'] = 'Class'; 1488 $Result['link'] = $this-> getClassLink($elt-> getName(), 1489 $elt-> docblock-> package, 1490 $elt-> getPath(), 1491 $elt-> getName());

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1105 of 1382

1492 $Result['listing'] = 'in file '.$elt-> file.', class '.$Result['link']." $aa" ; 1493 break; 1494 case 'define': 1495 $Result['name'] = $elt-> getName(); 1496 $Result['title'] = 'Constant'; 1497 $Result['link'] = $this-> getDefineLink($elt-> getName(), 1498 $elt-> docblock-> package, 1499 $elt-> getPath(), 1500 $elt-> getName()); 1501 $Result['listing'] = 'in file '.$elt-> file.', constant '.$Result['link']." $aa" ; 1502 break; 1503 case 'global': 1504 $Result['name'] = $elt-> getName(); 1505 $Result['title'] = 'Global'; 1506 $Result['link'] = $this-> getGlobalLink($elt-> getName(), 1507 $elt-> docblock-> package, 1508 $elt-> getPath(), 1509 $elt-> getName()); 1510 $Result['listing'] = 'in file '.$elt-> file.', global variable '.$Result['link']." $aa" ; 1511 break; 1512 case 'function': 1513 $Result['name'] = $elt-> getName(); 1514 $Result['title'] = 'Function'; 1515 $Result['link'] = $this-> getFunctionLink($elt-> getName(), 1516 $elt-> docblock-> package, 1517 $elt-> getPath(), 1518 $elt-> getName().'()'); 1519 $Result['listing'] = 'in file '.$elt-> file.', function '.$Result['link']." $aa" ; 1520 break; 1521 case 'method': 1522 $Result['name'] = $elt-> getName(); 1523 $Result['title'] = 'Method'; 1524 $Result['link'] = $this-> getMethodLink($elt-> getName(), 1525 $elt-> class, 1526 $elt-> docblock-> package, 1527 $elt-> getPath(), 1528 $elt-> class.'::'.$elt> getName().'()' 1529 ); 1530 if ($elt-> isConstructor) $Result['constructor'] = 1; 1531 $Result['listing'] = 'in file '.$elt-> file.', method '.$Result['link']." $aa" ; 1532 break; 1533 case 'var': 1534 $Result['name'] = $elt-> getName(); 1535 $Result['title'] = 'Variable'; 1536 $Result['link'] = $this-> getVarLink($elt-> getName(), 1537 $elt-> class, 1538 $elt-> docblock-> package, 1539 $elt-> getPath(), 1540 $elt-> class.'::'.$elt> getName()); 1541 $Result['listing'] = 'in file '.$elt-> file.', variable '.$Result['link']." $aa" ; 1542 break; 1543 case 'const': 1544 $Result['name'] = $elt-> getName(); 1545 $Result['title'] = 'Variable'; 1546 $Result['link'] = $this-> getConstLink($elt-> getName(), 1547 $elt-> class, 1548 $elt-> docblock-> package, 1549 $elt-> getPath(), 1550 $elt-> class.'::'.$elt> getName()); 1551 $Result['listing'] = 'in file '.$elt-> file.', class constant '.$Result['link']." $aa" ; 1552 break; 1553 case 'page': 1554 $Result['name'] = $elt-> getFile(); 1555 $Result['title'] = 'Page'; 1556 $Result['link'] = $this-> getPageLink($elt-> getFile(), 1557 $elt-> package, 1558 $elt-> getPath(), 1559 $elt-> getFile()); 1560 $Result['listing'] = 'procedural page '.$Result['link'];

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1106 of 1382

1561 break; 1562 case 'include': 1563 $Result['name'] = $elt-> getName(); 1564 $Result['title'] = 'Include'; 1565 $Result['link'] = $elt-> getValue(); 1566 $Result['listing'] = 'include '.$Result['name']; 1567 break; 1568 } 1569 1570 return $Result; 1571 } 1572 1573 /** 1574 * Generate alphabetical index of all elements 1575 * 1576 * @see $elements, walk() 1577 */ 1578 function generateElementIndex() 1579 { 1580 $elementindex = array(); 1581 $letters = array(); 1582 $used = array(); 1583 foreach($this-> elements as $letter => $nutoh) 1584 { 1585 foreach($this-> elements[$letter] as $i => $yuh) 1586 { 1587 if ($this-> elements[$letter][$i]-> type != 'include') 1588 { 1589 if (!isset($used[$letter])) 1590 { 1591 $letters[]['letter'] = $letter; 1592 $elindex['letter'] = $letter; 1593 $used[$letter] = 1; 1594 } 1595 1596 $elindex['index'][] = $this-> getIndexInformation($this> elements[$letter][$i]); 1597 } 1598 } 1599 if (isset($elindex['index'])) 1600 { 1601 $elementindex[] = $elindex; 1602 } else 1603 { 1604 unset($letters[count($letters) - 1]); 1605 } 1606 $elindex = array(); 1607 } 1608 return array($elementindex,$letters); 1609 } 1610 1611 function copyMediaRecursively($media,$targetdir,$subdir = '') 1612 { 1613 $versionControlDirectories = array ('CVS', 'media/CVS', 'media\\CVS', '.svn', 'media/.svn', 'media\\.svn'); 1614 if (!is_array($media)) { 1615 return; 1616 } 1617 foreach($media as $dir => $files) 1618 { 1619 if ($dir === '/') 1620 { 1621 $this-> copyMediaRecursively($files,$targetdir); 1622 } else 1623 { 1624 if (!is_numeric($dir)) 1625 { 1626 if (in_array($dir, $versionControlDirectories)) 1627 { 1628 // skip it entirely 1629 } 1630 else 1631 { 1632 // create the subdir 1633 phpDocumentor_out(" creating $targetdir" . PATH_DELIMITER . " $dir\n" ); 1634 Converter::setTargetDir($targetdir . PATH_DELIMITER . $dir); 1635 if (!empty($subdir)) 1636 { 1637 $subdir .= PATH_DELIMITER;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1107 of 1382

1638 } 1639 $this> copyMediaRecursively($files," $targetdir/$dir" ,$subdir . $dir); 1640 } 1641 } 1642 else 1643 { 1644 // copy the file 1645 phpDocumentor_out(" copying $targetdir" . PATH_DELIMITER . $files['file']."\n" ); 1646 $this-> copyFile($files['file'],$subdir); 1647 } 1648 } 1649 } 1650 } 1651 1652 /** 1653 * calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied 1654 * @see Converter::setTargetDir() 1655 */ 1656 function setTargetDir($dir) 1657 { 1658 Converter::setTargetDir($dir); 1659 if ($this-> _wrote_tdir) return; 1660 $this-> _wrote_tdir = true; 1661 $template_images = array(); 1662 $stylesheets = array(); 1663 $tdir = $dir; 1664 $dir = $this-> templateDir; 1665 $this-> templateDir = $this-> templateDir.'templates/'; 1666 $info = new Io; 1667 $this-> copyMediaRecursively($info-> getDirTree($this-> templateDir.'media',$this> templateDir),$tdir); 1668 } 1669 1670 /** 1671 * Generate alphabetical index of all elements by package and subpackage 1672 * 1673 * @param string $package name of a package 1674 * @see $pkg_elements, walk(), generatePkgElementIndexes() 1675 */ 1676 function generatePkgElementIndex($package) 1677 { 1678 $elementindex = array(); 1679 $letters = array(); 1680 $letterind = array(); 1681 $used = array(); 1682 $subp = ''; 1683 foreach($this-> pkg_elements[$package] as $subpackage => $els) 1684 { 1685 if (empty($els)) continue; 1686 if (!empty($subpackage)) $subp = " (<b>subpackage:</b> $subpackage)" ; else $subp = ''; 1687 foreach($els as $letter => $yuh) 1688 { 1689 foreach($els[$letter] as $i => $yuh) 1690 { 1691 if ($els[$letter][$i]-> type != 'include') 1692 { 1693 if (!isset($used[$letter])) 1694 { 1695 $letters[]['letter'] = $letter; 1696 $letterind[$letter] = count($letters) - 1; 1697 $used[$letter] = 1; 1698 } 1699 $elindex[$letter]['letter'] = $letter; 1700 1701 $elindex[$letter]['index'][] = $this> getIndexInformation($els[$letter][$i]); 1702 } 1703 } 1704 } 1705 } 1706 ksort($elindex); 1707 usort($letters,'HTMLSmarty_lettersort'); 1708 if (isset($elindex)) 1709 { 1710 while(list($letter,$tempel) = each($elindex)) 1711 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1108 of 1382

1712 if (!isset($tempel)) 1713 { 1714 unset($letters[$letterind[$tempel['letter']]]); 1715 } else 1716 $elementindex[] = $tempel; 1717 } 1718 } else $letters = array(); 1719 return array($elementindex,$letters); 1720 } 1721 1722 /** 1723 * 1724 * @see generatePkgElementIndex() 1725 */ 1726 function generatePkgElementIndexes() 1727 { 1728 $packages = array(); 1729 $package_names = array(); 1730 $pkg = array(); 1731 $letters = array(); 1732 foreach($this-> pkg_elements as $package => $trash) 1733 { 1734 $pkgs['package'] = $package; 1735 $pkg['package'] = $package; 1736 list($pkg['pindex'],$letters[$package]) = $this> generatePkgElementIndex($package); 1737 if (count($pkg['pindex'])) 1738 { 1739 $packages[] = $pkg; 1740 $package_names[] = $pkgs; 1741 } 1742 unset($pkgs); 1743 unset($pkg); 1744 } 1745 foreach($packages as $i => $package) 1746 { 1747 $pnames = array(); 1748 for($j=0;$j< count($package_names);$j++) 1749 { 1750 if ($package_names[$j]['package'] != $package['package']) $pnames[] = $package_names[$j]; 1751 } 1752 $packages[$i]['packageindexes'] = $pnames; 1753 } 1754 return array($packages,$package_names,$letters); 1755 } 1756 1757 /** 1758 * @param string name of class 1759 * @param string package name 1760 * @param string full path to look in (used in index generation) 1761 * @param boolean deprecated 1762 * @param boolean return just the URL, or enclose it in an html a tag 1763 * @return mixed false if not found, or an html a link to the class's documentation 1764 * @see parent::getClassLink() 1765 */ 1766 function getClassLink($expr,$package, $file = false,$text = false, $with_a = true) 1767 { 1768 $a = Converter::getClassLink($expr,$package,$file); 1769 if (!$a) return false; 1770 return $this-> returnSee($a, $text, $with_a); 1771 } 1772 1773 /** 1774 * @param string name of function 1775 * @param string package name 1776 * @param string full path to look in (used in index generation) 1777 * @param boolean deprecated 1778 * @param boolean return just the URL, or enclose it in an html a tag 1779 * @return mixed false if not found, or an html a link to the function's documentation 1780 * @see parent::getFunctionLink() 1781 */ 1782 function getFunctionLink($expr,$package, $file = false,$text = false) 1783 { 1784 $a = Converter::getFunctionLink($expr,$package,$file); 1785 if (!$a) return false; 1786 return $this-> returnSee($a, $text); 1787 } 1788 1789 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1109 of 1382

1790 * @param string name of define 1791 * @param string package name 1792 * @param string full path to look in (used in index generation) 1793 * @param boolean deprecated 1794 * @param boolean return just the URL, or enclose it in an html a tag 1795 * @return mixed false if not found, or an html a link to the define's documentation 1796 * @see parent::getDefineLink() 1797 */ 1798 function getDefineLink($expr,$package, $file = false,$text = false) 1799 { 1800 $a = Converter::getDefineLink($expr,$package,$file); 1801 if (!$a) return false; 1802 return $this-> returnSee($a, $text); 1803 } 1804 1805 /** 1806 * @param string name of global variable 1807 * @param string package name 1808 * @param string full path to look in (used in index generation) 1809 * @param boolean deprecated 1810 * @param boolean return just the URL, or enclose it in an html a tag 1811 * @return mixed false if not found, or an html a link to the global variable's documentation 1812 * @see parent::getGlobalLink() 1813 */ 1814 function getGlobalLink($expr,$package, $file = false,$text = false) 1815 { 1816 $a = Converter::getGlobalLink($expr,$package,$file); 1817 if (!$a) return false; 1818 return $this-> returnSee($a, $text); 1819 } 1820 1821 /** 1822 * @param string name of procedural page 1823 * @param string package name 1824 * @param string full path to look in (used in index generation) 1825 * @param boolean deprecated 1826 * @param boolean return just the URL, or enclose it in an html a tag 1827 * @return mixed false if not found, or an html a link to the procedural page's documentation 1828 * @see parent::getPageLink() 1829 */ 1830 function getPageLink($expr,$package, $path = false,$text = false) 1831 { 1832 $a = Converter::getPageLink($expr,$package,$path); 1833 if (!$a) return false; 1834 return $this-> returnSee($a, $text); 1835 } 1836 1837 /** 1838 * @param string name of method 1839 * @param string class containing method 1840 * @param string package name 1841 * @param string full path to look in (used in index generation) 1842 * @param boolean deprecated 1843 * @param boolean return just the URL, or enclose it in an html a tag 1844 * @return mixed false if not found, or an html a link to the method's documentation 1845 * @see parent::getMethodLink() 1846 */ 1847 function getMethodLink($expr,$class,$package, $file = false,$text = false) 1848 { 1849 $a = Converter::getMethodLink($expr,$class,$package,$file); 1850 if (!$a) return false; 1851 return $this-> returnSee($a, $text); 1852 } 1853 1854 /** 1855 * @param string name of var 1856 * @param string class containing var 1857 * @param string package name 1858 * @param string full path to look in (used in index generation) 1859 * @param boolean deprecated 1860 * @param boolean return just the URL, or enclose it in an html a tag 1861 * @return mixed false if not found, or an html a link to the var's documentation 1862 * @see parent::getVarLink() 1863 */ 1864 function getVarLink($expr,$class,$package, $file = false,$text = false) 1865 { 1866 $a = Converter::getVarLink($expr,$class,$package,$file); 1867 if (!$a) return false;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1110 of 1382

1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947

return $this-> }

returnSee($a, $text);

/** * @param string name of class constant * @param string class containing class constant * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @param boolean return just the URL, or enclose it in an html a tag * @return mixed false if not found, or an html a link to the var's documentation * @see parent::getVarLink() */ function getConstLink($expr,$class,$package, $file = false,$text = false) { $a = Converter::getConstLink($expr,$class,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * does a nat case sort on the specified second level value of the array * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); return strnatcasecmp($aa, $bb); } /** * does a nat case sort on the specified second level value of the array. * this one puts constructors first * * @param mixed $a * @param mixed $b * @return int */ function rcNatCmp1 ($a, $b) { $aa = strtoupper($a[$this-> rcnatcmpkey]); $bb = strtoupper($b[$this-> rcnatcmpkey]); if (strpos($aa,'CONSTRUCTOR') === 0) { return -1; } if (strpos($bb,'CONSTRUCTOR') === 0) { return 1; } if (strpos($aa,strtoupper($this-> class)) === 0) { return -1; } if (strpos($bb,strtoupper($this-> class)) === 0) { return -1; } return strnatcasecmp($aa, $bb); } /** * This function is not used by HTMLdefaultConverter, but is required by Converter */ function Output() { } } /** * @access private * @global string name of the package to set as the first package */ function HTMLSmarty_pindexcmp($a, $b)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1111 of 1382

1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966

{ global $phpDocumentor_DefaultPackageName; if ($a['title'] == $phpDocumentor_DefaultPackageName) return -1; if ($b['title'] == $phpDocumentor_DefaultPackageName) return 1; return strnatcasecmp($a['title'],$b['title']); } /** @access private */ function HTMLSmarty_lettersort($a, $b) { return strnatcasecmp($a['letter'],$b['letter']); } /** @access private */ function HTMLSmarty_outputfilter($src, & $smarty) { return str_replace('{$subdir}',$smarty-> _tpl_vars['subdir'],$src); } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1112 of 1382

File Source for class.phpdocpdf.php


Documentation for this file is available at class.phpdocpdf.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Cezpdf callback class customized for phpDocumentor * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package Converters * @subpackage PDFdefault * @author Greg Beaver <[email protected]> * @copyright 2000-2006 Joshua Eichorn, Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: class.phpdocpdf.php 212211 2006-04-30 22:18:14Z cellog $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 */ /** ezPdf libraries */ include_once 'phpDocumentor/Converters/PDF/default/class.ezpdf.php'; include_once 'phpDocumentor/Converters/PDF/default/ParserPDF.inc'; // define a class extension to allow the use of a callback to get the table of // contents, and to put the dots in the toc /** * @package Converters * @subpackage PDFdefault */ class phpdocpdf extends Cezpdf { var $reportContents = array(); var $indexContents = array(); var $indents = array(); var $font_dir = false; var $set_pageNumbering = false; var $converter; var $_save = ''; var $listType = 'ordered'; var $_colorStack = array(); function phpdocpdf(& $pdfconverter,$fontdir,$paper='a4',$orientation='portrait') { Cezpdf::Cezpdf($paper,$orientation); $this-> converter = $pdfconverter; $this-> font_dir = $fontdir; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1113 of 1382

68 69 /** 70 * This really should be in the parent class 71 */ 72 function getColor() 73 { 74 return $this-> currentColour; 75 } 76 77 function setColorArray($color) 78 { 79 $this-> setColor($color['r'], $color['g'], $color['b']); 80 } 81 82 /** 83 * Extract Pdfphp-format color from html-format color 84 * @return array 85 * @access private 86 */ 87 function _extractColor($htmlcolor) 88 { 89 preg_match('/#([a-fA-F0-9][a-fA-F0-9])([a-fA-F0-9][a-fA-F0-9])([a-fA-F0-9][a-fA-F09])/', $htmlcolor, $color); 90 if (count($color) != 4) 91 { 92 return false; 93 } 94 $red = hexdec($color[1]) / hexdec('FF'); 95 $green = hexdec($color[2]) / hexdec('FF'); 96 $blue = hexdec($color[3]) / hexdec('FF'); 97 return array('r' => $red, 'g' => $green, 'b' => $blue); 98 } 99 100 function validHTMLColor($color) 101 { 102 return $this-> _extractColor($htmlcolor); 103 } 104 105 function setHTMLColor($color) 106 { 107 fancy_debug('toplevel setting to', $color); 108 $this-> setColor($color['r'], $color['g'], $color['b']); 109 } 110 111 function textcolor($info) 112 { 113 if ($info['status'] == 'start') 114 { 115 array_push($this-> _colorStack, $this-> getColor()); 116 $color = $this-> _extractColor($info['p']); 117 if ($color) 118 { 119 // fancy_debug('set color to ',$info['p'],$color, $this->_colorStack); 120 $this-> setColorArray($color); 121 } else 122 { 123 array_pop($this-> _colorStack); 124 } 125 } elseif ($info['status'] == 'end') 126 { 127 // debug('unsetting'); 128 $this-> setColorArray(array_pop($this-> _colorStack)); 129 } 130 } 131 132 function rf($info) 133 { 134 $tmp = $info['p']; 135 $lvl = $tmp[0]; 136 $lbl = rawurldecode(substr($tmp,1)); 137 $num=$this-> ezWhatPageNumber($this-> ezGetCurrentPageNumber()); 138 $this-> reportContents[] = array($lbl,$num,$lvl ); 139 $this-> addDestination('toc'.(count($this-> reportContents)1),'FitH',$info['y']+$info['height']); 140 } 141 142 function index($info) 143 { 144 $res = explode('|||',rawurldecode($info['p'])); 145 $name = $res[0];

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1114 of 1382

146 147 148 149 > 150 151 152 153 154 155 156 157 158 159 160 161 > > 162 163 164 165 166 167 168 the 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221

$descrip = $res[1]; $letter = $name[0]; if ($letter == '$') $letter = $name[1]; $this-> indexContents[strtoupper($letter)][] = array($name,$descrip,$thisezWhatPageNumber($this-> ezGetCurrentPageNumber()),count($this-> reportContents) - 1); } function IndexLetter($info) { $letter = $info['p']; $this-> transaction('start'); $ok=0; while (!$ok){ $thisPageNum = $this-> ezPageCount; $this-> saveState(); $this-> setColor(0.9,0.9,0.9); $this-> filledRectangle($this-> ez['leftMargin'],$this-> y-$thisgetFontHeight(18)+$this-> getFontDecender(18),$this-> ez['pageWidth']-$thisez['leftMargin']-$this-> ez['rightMargin'],$this-> getFontHeight(18)); $this-> restoreState(); $this-> _ezText($letter,18,array('justification'=> 'left')); if ($this-> ezPageCount==$thisPageNum){ $this-> transaction('commit'); $ok=1; } else { // then we have moved onto a new page, bad bad, as the background colour will be on old one $this-> transaction('rewind'); $this-> ezNewPage(); } } } function dots($info) { // draw a dotted line over to the right and put on a page number $tmp = $info['p']; $lvl = $tmp[0]; $lbl = substr($tmp,1); $xpos = 520; switch($lvl) { case '1': $size=16; $thick=1; break; case '2': $size=14; $thick=1; break; case '3': $size=12; $thick=1; break; case '4': $size=11; $thick=1; break; } $adjust = if ($size $this-> $this-> $this-> $this-> $this-> } /** * @uses PDFParser extracts all meta-tags and processes text for output */ function ezText($text,$size=0,$options=array(),$test=0) { $text = str_replace("\t" ," " ,$text); // paragraph breaks $text = str_replace("<##P##>" ,"\n " ,$text); $text = str_replace("<<c:i" ,'< <c:i' ,$text); $text = str_replace("ilink>>" ,"ilink> >" ,$text); 0; != 16) $adjust = 1; saveState(); setLineStyle($thick,'round','',array(0,10)); line($xpos - (5*$adjust),$info['y'],$info['x']+5,$info['y']); restoreState(); addText($xpos - (5*$adjust)+5,$info['y'],$size,$lbl);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1115 of 1382

222 $this-> _save .= $text; 223 } 224 225 function setupTOC() 226 { 227 $parser = new PDFParser; 228 $parser-> parse($this-> _save,$this-> font_dir,$this); 229 $this-> _save = ''; 230 } 231 232 function ezOutput($debug = false, $template) 233 { 234 if ($debug) return $this-> _save; 235 $this-> setupTOC(); 236 if ($template) 237 { 238 uksort($this-> indexContents,'strnatcasecmp'); 239 $xpos = 520; 240 $z = 0; 241 foreach($this-> indexContents as $letter => $contents) 242 { 243 if ($z++/50 == 0) {phpDocumentor_out('.');flush();} 244 uksort($this-> indexContents[$letter],array($this> converter,'mystrnatcasecmp')); 245 } 246 $template-> assign('indexcontents',$this-> indexContents); 247 $this-> ezText($template-> fetch('index.tpl')); 248 $this-> setupTOC(); 249 } 250 return parent::ezOutput(); 251 } 252 253 function _ezText($text,$size=0,$options=array(),$test=0) 254 { 255 return parent::ezText($text,$size,$options,$test); 256 } 257 258 function getYPlusOffset($offset) 259 { 260 return $this-> y + $offset; 261 } 262 263 function addMessage($message) 264 { 265 return parent::addMessage($message); 266 phpDocumentor_out($message."\n" ); 267 flush(); 268 } 269 270 function ezProcessText($text){ 271 // this function will intially be used to implement underlining support, but could be used for a range of other 272 // purposes 273 $text = parent::ezProcessText($text); 274 $text = str_replace(array('<UL>' ,'</UL>' ,'<LI>' ,'</LI>' ,'<OL>' ,'</OL>' ,'&l t;/ol>' ,'<blockquote>' ,'</blockquote>' ), 275 array('<ul>' ,'</ul>' ,'<li>' ,'</li>' ,'<ol>' ,'</ul>' ,'</ul>' ,& quot;<C:indent:20>\n" ,"<C:indent:-20>" ),$text); 276 // $text = str_replace("<ul>\n","<ul>",$text); 277 $text = preg_replace("/\n+\s*(<ul>|<ol>)/" , "\n\\1" , $text); 278 // some problemos fixed here - hack 279 $text = preg_replace('/<text [^]]+>/' , '', $text); 280 $text = str_replace("<li>\n" ,"<li>" ,$text); 281 $text = preg_replace("/\n+\s*<li>/" , "<li>" , $text); 282 $text = str_replace("<mybr>" ,"\n" ,$text); 283 $text = str_replace('</li></ul>' ,'</ul>' ,$text); 284 $text = preg_replace("/^\n(\d+\s+.*)/" , '\\1', $text); 285 $search = array('<ul>' ,'</ul>' ,'<ol>' ,'<li>' ,'</li>' ); 286 $replace = array("<C:indent:20>\n" ,"\n<C:indent:20>" ,"\n<C:indent:20:ordered>\n" ,'<C:bullet>' ,"\n" ); 287 $text = str_replace($search,$replace,$text); 288 $text = preg_replace("/([^\n])<C:bullet/" , "\\1\n<C:bullet" , $text); 289 if (false) { 290 $fp = @fopen("C:/Documents and Settings/Owner/Desktop/pdfsourceorig.txt" ,'a'); 291 if ($fp) 292 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1116 of 1382

293 fwrite($fp, $text); 294 fclose($fp); 295 } 296 } 297 return $text; 298 } 299 300 function indent($info) 301 { 302 $stuff = explode(':', $info['p']); 303 $margin = $stuff[0]; 304 if (count($stuff) - 1) 305 { 306 $this-> listType = 'ordered'; 307 $this-> listIndex = 1; 308 } else 309 { 310 if ($margin > 0) 311 { 312 $this-> listIndex = 1; 313 } 314 $this-> listType = 'unordered'; 315 } 316 $this-> ez['leftMargin'] += $margin; 317 } 318 319 /** 320 * @author Murray Shields 321 */ 322 function bullet($Data) 323 { 324 if ($this-> listType == 'ordered') 325 { 326 return $this-> orderedBullet($Data); 327 } 328 $D = abs($Data["decender" ]); 329 $X = $Data["x" ] - ($D * 2) - 10; 330 $Y = $Data["y" ] + ($D * 1.5); 331 $this-> setLineStyle($D, "butt" , "miter" , array()); 332 $this-> setColor(0,0,0); 333 $this-> ellipse($X, $Y, 1); 334 } 335 336 function orderedBullet($info) 337 { 338 $this-> addText($info['x']-20, $info['y']-1, 10, $this-> listIndex++ . '.'); 339 } 340 341 function ezNewPage($debug=false) 342 { 343 parent::ezNewPage(); 344 if (!$this-> set_pageNumbering) 345 { 346 $template = $this-> converter-> newSmarty(); 347 $parser = new PDFParser; 348 $parser-> parse($template-> fetch('pagenumbering.tpl'),$this> font_dir,$this); 349 } 350 $this-> set_pageNumbering = true; 351 } 352 } 353 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1117 of 1382

File Source for ParserPDF.inc


Documentation for this file is available at ParserPDF.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * This class handles the XML-based CezPDF markup language created to allow * templates for the PDFdefaultConverter * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package Converters * @subpackage PDFdefault * @author Greg Beaver <[email protected]> * @copyright 2002-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: ParserPDF.inc 238276 2007-06-22 14:58:30Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 */ /** when <text> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_EVENT_TEXT', 600); /** when <text> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_STATE_TEXT', 700); /** used for parsing stuff between <text> */ define('PHPDOCUMENTOR_PDF_EVENT_CONTENT', 601); /** used for parsing stuff between <text> */ define('PHPDOCUMENTOR_PDF_STATE_CONTENT', 701); /** when <font> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_EVENT_FONT', 602); /** when <font> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_STATE_FONT', 702); /** when <newpage/> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_EVENT_NEWPAGE', 603); /** when <newpage/> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_STATE_NEWPAGE', 703); /** when <pdffunction> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION', 604); /** when <pdffunction> is found in an ezText input */ define('PHPDOCUMENTOR_PDF_STATE_PDFFUNCTION', 704); /** * @package Converters * @subpackage PDFdefault * @author Greg Beaver <[email protected]> * @since 1.2 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1118 of 1382

68 class PDFParser extends Parser 69 { 70 /** 71 * Mapping of event constants to events handler function names 72 * @var array 73 * @access private 74 */ 75 var $eventHandlers 76 = array( 77 PHPDOCUMENTOR_PDF_EVENT_TEXT => 'handleText', 78 PHPDOCUMENTOR_PDF_EVENT_FONT => 'handleFont', 79 PHPDOCUMENTOR_PDF_EVENT_NEWPAGE => 'handleNewPage', 80 PARSER_EVENT_QUOTE => 'handleQuote', 81 PARSER_EVENT_NOEVENTS => 'defaultHandler', 82 PHPDOCUMENTOR_PDF_EVENT_CONTENT => 'handleContent', 83 PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION => 'handlePDFfunction', 84 ); 85 86 /** 87 * Sets up the wordparser for this class 88 */ 89 function PDFParser() 90 { 91 $this-> wp = new WordParser; 92 $this-> setupStates(); 93 } 94 /** 95 * Parse text for PDFParser XML tags, and add the text to the PDF file 96 * 97 * @param string text to parse for PDFParser XML tags 98 * @param string full path to the font directory 99 * @param phpdocpdf 100 * @param boolean determines whether output is saved in a variable or 101 * added directly to the output 102 * @staticvar integer used for recursion limiting if a handler for an event is not found 103 * @return bool 104 */ 105 function parse ($parse_data,$fontdir,& $pdf,$debug=false) 106 { 107 static $endrecur = 0; 108 $this-> _debug = $debug; 109 110 // initialize variables so E_ALL error_reporting doesn't complain 111 $pevent = 0; 112 $word = 0; 113 $this-> p_vars['event_stack'] = new EventStack; 114 $this-> p_flags['reset_quote_data'] = true; 115 $this-> p_vars['options'] = false; 116 $this-> p_vars['font_dir'] = $fontdir; 117 $this-> p_vars['text_size'] = false; 118 $this-> p_vars['pdf'] = & $pdf; 119 120 $this-> wp-> setup($parse_data); 121 $this-> wp-> setWhitespace(true); 122 123 do 124 { 125 $lpevent = $pevent; 126 $pevent = $this-> p_vars['event_stack']-> getEvent(); 127 if ($lpevent != $pevent) 128 { 129 $this-> p_vars['last_pevent'] = $lpevent; 130 } 131 132 if ($this-> p_vars['last_pevent'] != $pevent) 133 { 134 // its a new event so the word parser needs to be reconfigured 135 $this-> configWordParser($pevent); 136 } 137 138 139 $this-> p_vars['last_word'] = $word; 140 $word = $this-> wp-> getWord(); 141 142 if (PHPDOCUMENTOR_DEBUG == true) 143 { 144 echo "----------------\n" ; 145 echo "LAST: |" . $this-> p_vars['last_word'] . "|\n" ; 146 // echo "INDEX: ".$this->p_vars['curpar']."\n";

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1119 of 1382

147 echo "PEVENT: " . $this-> getParserEventName($pevent) . "\n" ; 148 echo "LASTPEVENT: " . $this-> getParserEventName($this> p_vars['last_pevent']) . "\n" ; 149 echo $this-> wp-> getPos() . " WORD: |" .$word."|\n\n" ; 150 } 151 if (isset($this-> eventHandlers[$pevent])) 152 { 153 $handle = $this-> eventHandlers[$pevent]; 154 $this-> $handle($word, $pevent); 155 } else 156 { 157 debug('WARNING: possible error, no ParserPDFParser handler for event number '.$pevent); 158 if ($endrecur++ == 25) 159 { 160 die("FATAL ERROR, recursion limit reached" ); 161 } 162 } 163 } while (!($word === false)); 164 if (false) { 165 $fp = fopen("C:/Documents and Settings/Owner/Desktop/pdfsource.txt" , "a" ); 166 fwrite($fp, $this-> wp-> data); 167 fclose($fp); 168 } 169 } 170 171 /**#@+ 172 * Event Handlers 173 * @param string token 174 * @param integer event constant 175 * @access private 176 */ 177 function defaultHandler($word, $pevent) 178 { 179 if ($this-> checkEventPush($word, $pevent)) return; 180 } 181 182 /** 183 * Handles <newpage /> 184 * @tutorial ParserPDF.cls#tags.newpage 185 */ 186 function handleNewPage($word, $pevent) 187 { 188 $this-> p_vars['event_stack']-> popEvent(); 189 $this-> p_vars['pdf']-> ezNewPage($this-> _debug); 190 } 191 192 /** 193 * Handles <text></text> 194 * @tutorial ParserPDF.cls#tags.text 195 */ 196 function handleText($word, $pevent) 197 { 198 $e = $this-> checkEventPush($word, $pevent); 199 $e1 = $this-> checkEventPop($word, $pevent); 200 if ($e == PARSER_EVENT_QUOTE) return; 201 if ($e1) 202 { 203 $this-> p_flags['textcolor'] = false; 204 if (($a = $this-> p_vars['savecolor']) != $this-> p_vars['pdf']-> getColor()) 205 { 206 $this-> p_vars['pdf']-> setColor($a['r'],$a['g'],$a['b']); 207 } 208 } 209 if ($this-> p_vars['last_word'] == '<text' ) 210 { 211 // set up flags 212 $this-> p_flags['paramval'] = false; 213 $this-> p_flags['textcolor'] = false; 214 $this-> p_vars['curparam'] = false; 215 $this-> p_vars['savecolor'] = $this-> p_vars['pdf']-> getColor(); 216 $this-> p_vars['options'] = array(); 217 unset($this-> p_vars['quote_data']); 218 } 219 if (!$this-> p_flags['paramval']) 220 { 221 if ($e || $e1) return; 222 if ($word == '=')

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1120 of 1382

223 { 224 // debug('set paramval '.$this->p_vars['curparam']); 225 $this-> p_flags['paramval'] = true; 226 return; 227 } 228 $this-> p_vars['curparam'] = trim($word); 229 } else 230 { 231 if ($this-> p_vars['last_pevent'] == PARSER_EVENT_QUOTE) 232 { 233 if ($this-> p_vars['curparam'] == 'size') 234 { 235 $this-> p_vars['text_size'] = (int)$this-> p_vars['quote_data']; 236 $this-> p_flags['paramval'] = false; 237 $this-> p_vars['curparam'] = false; 238 if (!$e && ! $e1) 239 { 240 $this-> p_vars['curparam'] = trim($word); 241 } 242 unset($this-> p_vars['quote_data']); 243 } elseif ($this-> p_vars['curparam'] == 'color') 244 { 245 if ($a = $this-> p_vars['pdf']-> validHTMLColor($this> p_vars['quote_data'])) 246 { 247 $this-> p_flags['textcolor'] = true; 248 $this-> p_vars['pdf']-> setHTMLColor($a); 249 } 250 } else 251 { 252 if ($this-> p_vars['quote_data'] === (string)(int)$this> p_vars['quote_data']) $this-> p_vars['quote_data'] = (int)$this-> p_vars['quote_data']; 253 // debug('added '.$this->p_vars['curparam'].' = '.$this>p_vars['quote_data']); 254 $this-> p_vars['options'][$this-> p_vars['curparam']] = $this> p_vars['quote_data']; 255 $this-> p_flags['paramval'] = false; 256 $this-> p_vars['curparam'] = false; 257 if (!$e && ! $e1) 258 { 259 $this-> p_vars['curparam'] = trim($word); 260 } 261 unset($this-> p_vars['quote_data']); 262 } 263 } 264 } 265 } 266 267 /** 268 * handles <font></font> 269 * @tutorial ParserPDF.cls#tags.font 270 */ 271 function handleFont($word, $pevent) 272 { 273 $e = $this-> checkEventPush($word, $pevent); 274 $e1 = $this-> checkEventPop($word, $pevent); 275 if ($e == PARSER_EVENT_QUOTE) return; 276 if ($this-> p_vars['last_word'] == '<font' ) 277 { 278 // set up flags 279 $this-> p_flags['paramval'] = false; 280 $this-> p_vars['curparam'] = false; 281 unset($this-> p_vars['quote_data']); 282 } 283 if (!$this-> p_flags['paramval']) 284 { 285 if ($e || $e1) return; 286 if ($word == '=') 287 { 288 //debug('set paramval '.$this->p_vars['curparam']); 289 $this-> p_flags['paramval'] = true; 290 return; 291 } 292 $this-> p_vars['curparam'] = trim($word); 293 } else 294 { 295 if ($this-> p_vars['last_pevent'] == PARSER_EVENT_QUOTE) 296 { 297 if ($this-> p_vars['curparam'] == 'face') 298 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1121 of 1382

299 //debug('set face to '.$this->p_vars['font_dir'] . $this>p_vars['quote_data'] . '.afm'); 300 $this-> p_vars['pdf']-> selectFont($this-> p_vars['font_dir'] . $this> p_vars['quote_data'] . '.afm'); 301 $this-> p_flags['paramval'] = false; 302 $this-> p_vars['curparam'] = false; 303 unset($this-> p_vars['quote_data']); 304 } 305 } 306 } 307 } 308 309 /** 310 * handles <pdffunction> 311 * @tutorial ParserPDF.cls#tags.pdffunction 312 */ 313 function handlePDFFunction($word, $pevent) 314 { 315 $e = $this-> checkEventPush($word, $pevent); 316 $e1 = $this-> checkEventPop($word, $pevent); 317 if ($e == PARSER_EVENT_QUOTE) return; 318 if ($this-> p_vars['last_word'] == '<pdffunction:' ) 319 { 320 // set up flags 321 $this-> p_flags['paramval'] = $this-> p_flags['curparam'] = false; 322 $this-> p_flags['returnval'] = false; 323 $this-> p_vars['funcname'] = trim($word); 324 // debug("funcname is $word"); 325 $this-> p_vars['options'] = array(); 326 unset($this-> p_vars['quote_data']); 327 if ($e1) addErrorDie(PDERROR_PDFFUNCTION_NO_FUNC); 328 } 329 if (!$this-> p_flags['paramval']) 330 { 331 if ($e1) 332 { // call function, no parameters 333 $func = $this-> p_vars['funcname']; 334 if (!$func) addErrorDie(PDERROR_PDFFUNCTION_NO_FUNC); 335 if (method_exists($this-> p_vars['pdf'],$func)) 336 { 337 if (count($this-> p_vars['options'])) 338 { 339 // fancy_debug("calling function $func",$this>p_vars['options']); 340 $a = call_user_func_array(array(& $this-> p_vars['pdf'],$func), $this-> p_vars['options']); 341 } else 342 { 343 // debug("calling function $func"); 344 $a = $this-> p_vars['pdf']-> $func(); 345 } 346 if ($this-> p_flags['returnval']) 347 { 348 // debug("setting returnvar ".$this>p_vars['return_varname']); 349 $this-> tempvars[$this-> p_vars['return_varname']] = $a; 350 } 351 } else 352 { 353 addWarning(PDERROR_PDF_METHOD_DOESNT_EXIST,$func); 354 } 355 return; 356 } 357 if ($e) return; 358 if ($word == '=') 359 { 360 // debug('set paramval '.$this->p_vars['curparam']); 361 $this-> p_flags['paramval'] = true; 362 return; 363 } 364 $this-> p_vars['curparam'] = trim($word); 365 } else 366 { 367 if ($this-> p_vars['last_word'] == '=') 368 { // check to see if we should use a tempvar from a previous return 369 if (substr(trim($word),0,1) == '$') 370 { 371 if (substr(trim($word),0,7) == '$this->' ) 372 { // this is a pdf var 373 $a = substr(trim($word),7);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1122 of 1382

374 $a = $this-> p_vars['pdf']-> $a; 375 // debug("set option to $word"); 376 $this-> p_vars['options'][] = $a; 377 $this-> p_flags['paramval'] = false; 378 unset($this-> p_vars['quote_data']); 379 } else 380 { // this is a tempvar 381 if (!isset($this-> tempvars[substr(trim($word),1)])) 382 { 383 addErrorDie(PDERROR_PDF_TEMPVAR_DOESNT_EXIST,$this> p_vars['funcname'],trim($word),trim($word)); 384 } 385 $a = $this-> tempvars[substr(trim($word),1)]; 386 // debug("set option to $word"); 387 $this-> p_vars['options'][] = $a; 388 $this-> p_flags['paramval'] = false; 389 unset($this-> p_vars['quote_data']); 390 } 391 } 392 } else 393 { 394 if ($this-> p_vars['last_pevent'] == PARSER_EVENT_QUOTE) 395 { 396 if ($this-> p_vars['quote_data'] === (string)(int)$this> p_vars['quote_data']) 397 { 398 $this-> p_vars['quote_data'] = (int)$this-> p_vars['quote_data']; 399 } 400 if ($this-> p_vars['curparam'] == 'return') 401 { 402 // debug("param is return"); 403 $this-> p_vars['return_varname'] = $this-> p_vars['quote_data']; 404 $this-> p_flags['returnval'] = true; 405 } else 406 { 407 // fancy_debug("set option to arg",$this>p_vars['quote_data']); 408 $this-> p_vars['options'][] = $this-> p_vars['quote_data']; 409 } 410 $this-> p_flags['paramval'] = false; 411 unset($this-> p_vars['quote_data']); 412 } 413 } 414 if ($e1) 415 { // call function, with parameters 416 $func = $this-> p_vars['funcname']; 417 if (method_exists($this-> p_vars['pdf'],$func)) 418 { 419 if (count($this-> p_vars['options'])) 420 { 421 // fancy_debug("calling function $func",$this>p_vars['options']); 422 if ($func == 'ezImage') { 423 // set padding to 5, width to 0, resize to none 424 $this-> p_vars['options'][] = 5; 425 $this-> p_vars['options'][] = 0; 426 $this-> p_vars['options'][] = 'none'; 427 } 428 $a = call_user_func_array(array(& $this-> p_vars['pdf'],$func), $this-> p_vars['options']); 429 } else 430 { 431 // debug("calling function $func"); 432 $a = $this-> p_vars['pdf']-> $func(); 433 } 434 if ($this-> p_flags['returnval']) 435 { 436 // debug("setting returnvar ".$this>p_vars['return_varname']); 437 $this-> tempvars[$this-> p_vars['return_varname']] = $a; 438 } 439 } else 440 { 441 addWarning(PDERROR_PDF_METHOD_DOESNT_EXIST,$func); 442 } 443 } 444 } 445 } 446 447 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1123 of 1382

448 * Adds content to the <text> tag 449 */ 450 function handleContent($word, $pevent) 451 { 452 if ($e = $this-> checkEventPush($word, $pevent)) 453 { 454 if ($e == PHPDOCUMENTOR_PDF_EVENT_FONT) 455 { // flush content 456 if (!isset($this-> p_vars['content'])) return; 457 $this-> p_vars['pdf']-> _ezText($this-> p_vars['content'],$this> p_vars['text_size'],$this-> p_vars['options']); 458 unset($this-> p_vars['content']); 459 } 460 return; 461 } 462 if ($this-> checkEventPop($word, $pevent)) 463 { 464 $this-> wp-> backupPos($word); 465 if (!isset($this-> p_vars['content'])) return; 466 $this-> p_vars['pdf']-> _ezText($this-> p_vars['content'],$this> p_vars['text_size'],$this-> p_vars['options']); 467 unset($this-> p_vars['content']); 468 } else 469 { 470 if (!isset($this-> p_vars['content'])) $this-> p_vars['content'] = ''; 471 if (isset($this-> p_vars['quote_data'])) 472 { 473 $this-> p_vars['content'] .= $this-> p_vars['quote_data']; 474 unset($this-> p_vars['quote_data']); 475 } 476 $this-> p_vars['content'] .= $word; 477 } 478 } 479 /**#@-*/ 480 /** 481 * setup the parser tokens, and the pushEvent/popEvent arrays 482 * @see $tokens, $pushEvent, $popEvent 483 */ 484 485 function setupStates() 486 { 487 $this-> tokens[STATE_NOEVENTS] = array("<text" ,"<font" ,"<newpage />" ,"<newpage/>" ,'<pdffunction:' ,'"' ); 488 $this-> tokens[PHPDOCUMENTOR_PDF_STATE_TEXT] = array(">" ,"=" ,'"' ,"</text>" ); 489 $this-> tokens[PHPDOCUMENTOR_PDF_STATE_FONT] = array("/>" ,"=" ,'"' ); 490 $this-> tokens[PHPDOCUMENTOR_PDF_STATE_CONTENT] = array("<font" ,'<pdffunction:' ,"</text>" ); 491 $this-> tokens[PHPDOCUMENTOR_PDF_STATE_PDFFUNCTION] = array('"' ,"/>" ,"=" ," " ); 492 $this-> tokens[STATE_QUOTE] = array("\\\"" ,"\\\\" ,"\"" ); 493 $this-> tokens[STATE_ESCAPE] = false;// this tells the word parser to just cycle 494 495 // For each event word to event mapings 496 $this-> pushEvent[PARSER_EVENT_QUOTE] = 497 array( 498 "\\" => PARSER_EVENT_ESCAPE 499 ); 500 $this-> popEvent[PARSER_EVENT_QUOTE] = array("\"" ); 501 ########################## 502 $this-> pushEvent[PARSER_EVENT_NOEVENTS] = 503 array( 504 "<text" => PHPDOCUMENTOR_PDF_EVENT_TEXT, 505 "<font" => PHPDOCUMENTOR_PDF_EVENT_FONT, 506 "<newpage />" => PHPDOCUMENTOR_PDF_EVENT_NEWPAGE, 507 "<newpage/>" => PHPDOCUMENTOR_PDF_EVENT_NEWPAGE, 508 "<pdffunction:" => PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION, 509 '"' => PARSER_EVENT_QUOTE, 510 ); 511 ########################## 512 $this-> pushEvent[PHPDOCUMENTOR_PDF_EVENT_TEXT] = 513 array( 514 '"' => PARSER_EVENT_QUOTE, 515 '>' => PHPDOCUMENTOR_PDF_EVENT_CONTENT, 516 ); 517

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1124 of 1382

518 $this-> popEvent[PHPDOCUMENTOR_PDF_EVENT_TEXT] = array("</text>" 519 ########################## 520 $this-> pushEvent[PHPDOCUMENTOR_PDF_EVENT_FONT] = 521 array( 522 '"' => PARSER_EVENT_QUOTE, 523 ); 524 525 $this-> popEvent[PHPDOCUMENTOR_PDF_EVENT_FONT] = array("/>" ); 526 ########################## 527 $this-> pushEvent[PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION] = 528 array( 529 '"' => PARSER_EVENT_QUOTE, 530 ); 531 532 $this-> popEvent[PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION] = array("/>" 533 ########################## 534 $this-> pushEvent[PHPDOCUMENTOR_PDF_EVENT_CONTENT] = 535 array( 536 "<font" => PHPDOCUMENTOR_PDF_EVENT_FONT, 537 "<newpage />" => PHPDOCUMENTOR_PDF_EVENT_NEWPAGE, 538 "<newpage/>" => PHPDOCUMENTOR_PDF_EVENT_NEWPAGE, 539 "<pdffunction:" => PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION, 540 ); 541 542 $this-> popEvent[PHPDOCUMENTOR_PDF_EVENT_CONTENT] = array("</text>" 543 } 544 545 /** 546 * Return the name of the parser event 547 * @param integer 548 */ 549 function getParserEventName ($value) 550 { 551 $lookup = array( 552 PARSER_EVENT_NOEVENTS => "PARSER_EVENT_NOEVENTS" , 553 PARSER_EVENT_QUOTE => "PARSER_EVENT_QUOTE" , 554 PHPDOCUMENTOR_PDF_EVENT_TEXT => "PHPDOCUMENTOR_PDF_EVENT_TEXT" 555 PHPDOCUMENTOR_PDF_EVENT_CONTENT => "PHPDOCUMENTOR_PDF_EVENT_CONTENT" , 556 PHPDOCUMENTOR_PDF_EVENT_FONT => "PHPDOCUMENTOR_PDF_EVENT_FONT" 557 PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION => "PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION" , 558 ); 559 if (isset($lookup[$value])) 560 return $lookup[$value]; 561 else return $value; 562 } 563 } 564 ?>

);

);

);

, ,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1125 of 1382

File Source for PDFdefaultConverter.inc


Documentation for this file is available at PDFdefaultConverter.inc
1 <?php 2 /** 3 * Outputs documentation in PDF format 4 * 5 * phpDocumentor :: automatic documentation generator 6 * 7 * PHP versions 4 and 5 8 * 9 * Copyright (c) 2002-2006 Gregory Beaver 10 * 11 * LICENSE: 12 * 13 * This library is free software; you can redistribute it 14 * and/or modify it under the terms of the GNU Lesser General 15 * Public License as published by the Free Software Foundation; 16 * either version 2.1 of the License, or (at your option) any 17 * later version. 18 * 19 * This library is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 * Lesser General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public 25 * License along with this library; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 * 28 * @package Converters 29 * @subpackage PDFdefault 30 * @author Greg Beaver <[email protected]> 31 * @copyright 2002-2006 Gregory Beaver 32 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 33 * @version CVS: $Id: PDFdefaultConverter.inc 236747 2007-05-31 02:02:42Z ashnazg $ 34 * @filesource 35 * @link http://www.phpdoc.org 36 * @link http://pear.php.net/PhpDocumentor 37 * @since 1.2 38 */ 39 /** 40 * The Cezpdf class library 41 */ 42 include_once('phpDocumentor/Converters/PDF/default/class.phpdocpdf.php'); 43 /** 44 * PDF output converter. 45 * This Converter takes output from the {@link Parser} and converts it to PDF-ready output for use with {@link Cezpdf}. 46 * This is now beta code 47 * 48 * @package Converters 49 * @subpackage PDFdefault 50 * @author Greg Beaver <[email protected]> 51 * @since 1.1 52 * @version $Id: PDFdefaultConverter.inc 236747 2007-05-31 02:02:42Z ashnazg $ 53 * @todo Implement links to conflicts/inheritance 54 */ 55 class PDFdefaultConverter extends Converter 56 { 57 /** 58 * default PDF Converter wants elements sorted by type as well as alphabetically 59 * @see Converter::$sort_page_contents_by_type 60 * @var boolean 61 */ 62 var $sort_absolutely_everything = true; 63 var $leftindex = array('classes' => false, 'pages' => false, 'functions' => false, 'defines' => false, 'globals' => false); 64 var $pagepackage_pagenums = array(); 65 var $classpackage_pagenums = array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1126 of 1382

66 /** @var string always PDF */ 67 var $outputformat = 'PDF'; 68 /** @var string always default */ 69 var $name = 'default'; 70 var $curpagepackage = false; 71 var $curclasspackage = false; 72 var $smarty_dir; 73 /** 74 * @var Cezpdf 75 */ 76 var $pdf = false; 77 var $ric_set = array(); 78 /** 79 * Source files for appendix C are stored here 80 * 81 * Format: array(array(package => packagename, code => array(highlightedsource code 1, ...))) 82 * @var array 83 */ 84 var $_sourcecode; 85 /** 86 * @see Converter::Converter() 87 */ 88 function PDFdefaultConverter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) 89 { 90 Converter::Converter($allp, $packp, $classes, $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title); 91 $this-> pdf =& new phpdocpdf($this, $this-> getConverterDir() . PATH_DELIMITER .'templates/fonts/','letter'); 92 $this-> pdf-> selectFont($this-> getConverterDir() . PATH_DELIMITER .'templates/fonts/Helvetica.afm'); 93 // put a line top and bottom on all the pages 94 $this-> pdf-> ezSetMargins(50,70,50,50); 95 $template = & $this-> newSmarty(); 96 $this-> pdf-> ezText($template-> fetch('footer.tpl')); 97 $template-> assign('title',$title); 98 if (file_exists($this-> templateDir . 'templates' . PATH_DELIMITER . 'media'. PATH_DELIMITER .'logo.jpg')) 99 { 100 $template-> assign('logo',$this-> templateDir . 'templates' . PATH_DELIMITER . 'media'. PATH_DELIMITER .'logo.jpg'); 101 } 102 $this-> pdf-> ezText($template-> fetch('title_page.tpl')); 103 unset($template); 104 } 105 106 function writeSource($path, $value) 107 { 108 $templ = & $this-> newSmarty(); 109 $pathinfo = $this-> proceduralpages-> getPathInfo($path, $this); 110 $templ-> assign('source',$value); 111 $templ-> assign('package',$pathinfo['package']); 112 $templ-> assign('subpackage',$pathinfo['subpackage']); 113 $templ-> assign('name',$pathinfo['name']); 114 $templ-> assign('source_loc',$pathinfo['source_loc']); 115 $templ-> assign('docs',$pathinfo['docs']); 116 $templ-> assign('dest', $this-> getFileSourceName($path)); 117 $this-> setSourcePaths($path); 118 $this-> _sourcecode[$pathinfo['package']][] = $templ-> fetch('filesource.tpl'); 119 } 120 121 function postProcess($text) 122 { 123 return htmlspecialchars($text); 124 } 125 126 function writeExample($title, $path, $source) 127 { 128 $templ = & $this-> newSmarty(); 129 $templ-> assign('source',$source); 130 if (empty($title)) 131 { 132 $title = 'example'; 133 addWarning(PDERROR_EMPTY_EXAMPLE_TITLE, $path, $title); 134 } 135 $templ-> assign('title',$title); 136 $templ-> assign('file',$path); 137 $this-> pdf-> ezText($templ-> fetch('examplesource.tpl')); 138 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1127 of 1382

139 140 function getExampleLink($path, $title) 141 { 142 return ''; 143 return $this-> returnLink('{$subdir}__examplesource' . PATH_DELIMITER . 'exsource_'.$path.'.html',$title); 144 } 145 146 function getSourceLink($path) 147 { 148 // var_dump(htmlentities('<c:ilink:'.$this->getFileSourceName($path).'>Source Code for this file</c:ilink>')); 149 return '<c:ilink:' .$this-> getFileSourceName($path).'>Source Code for this file</c:ilink>' ; 150 } 151 152 function getFileSourceName($path, $anchor = '') 153 { 154 return urlencode($anchor . parent::getFileSourceName($path)); 155 } 156 157 /** 158 * Retrieve a Converter-specific anchor to a segment of a source code file 159 * parsed via a {@tutorial tags.filesource.pkg} tag. 160 * @param string full path to source file 161 * @param string name of anchor 162 * @param string link text, if this is a link 163 * @param boolean returns either a link or a destination based on this 164 * parameter 165 * @return string link to an anchor, or the anchor 166 */ 167 function getSourceAnchor($sourcefile,$anchor,$text = '',$link = false) 168 { 169 if ($link) 170 { 171 return '<c:ilink:' . $this-> getFileSourceName($sourcefile, $anchor). '>' . $text . '</c:ilink>' ; 172 } else 173 { 174 return '</text><pdffunction:addDestination arg="' .$this> getFileSourceName($sourcefile, $anchor).'" arg="FitH" arg=$this->y /><text size="8">' ; 175 } 176 } 177 178 /** 179 * Returns a bookmark using Cezpdf 009 180 * 181 * @param abstractLink a descendant of abstractlink should be passed, and never text 182 * @param string text to display in the link 183 */ 184 function returnSee(& $element, $eltext = false) 185 { 186 if (!$element) return false; 187 if (!$eltext) 188 { 189 $eltext = ''; 190 switch($element-> type) 191 { 192 case 'tutorial' : 193 $eltext = $element-> title; 194 break; 195 case 'method' : 196 case 'var' : 197 case 'const' : 198 $eltext .= $element-> class.'::'; 199 case 'page' : 200 case 'define' : 201 case 'class' : 202 case 'function' : 203 case 'global' : 204 default : 205 $eltext .= $element-> name; 206 if ($element-> type == 'function' || $element-> type == 'method') $eltext .= '()'; 207 break; 208 } 209 } 210 switch ($element-> type) 211 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1128 of 1382

212 case 'tutorial' : 213 return '<c:ilink:' .urlencode($element-> type.$element-> package.$element> subpackage.$element-> name.$element-> section).'>' .$eltext.'</c:ilink>' ; 214 case 'page' : 215 return '<c:ilink:' .urlencode($element-> type.$element-> package.$element> path).'>' .$eltext.'</c:ilink>' ; 216 case 'define' : 217 case 'global' : 218 case 'class' : 219 case 'function' : 220 return '<c:ilink:' .urlencode($element-> type.$element-> package.$element> name).'>' .$eltext.'</c:ilink>' ; 221 case 'method' : 222 case 'var' : 223 case 'const' : 224 return '<c:ilink:' .urlencode($element-> type.$element-> package.$element> class.'::'.$element-> name).'>' .$eltext.'</c:ilink>' ; 225 } 226 return $element; 227 } 228 229 /** 230 * @param string 231 * @param string 232 * @return string <c:alink:$link>$text</c:alink> 233 */ 234 function returnLink($link,$text) 235 { 236 return " <c:alink: $link> $text</c:alink> " ; 237 } 238 239 /** 240 * Convert README/INSTALL/CHANGELOG file contents to output format 241 * @param README|INSTALL|CHANGELOG 242 * @param string contents of the file 243 */ 244 function Convert_RIC($name, $contents) 245 { 246 $this-> ric_set[$name] = $contents; 247 } 248 249 function convertDocBlock(& $element) 250 { 251 if (!$element-> docblock) return; 252 $template = & $this-> newSmarty(); 253 254 $nopackage = true; 255 if ($element-> type == 'page' || $element-> type == 'class') $nopackage = false; 256 $tagses = $element-> docblock-> listTags(); 257 $tags = array(); 258 $names = array('staticvar' => 'Static Variable','deprec' => 'Deprecated','abstract' => 'Abstract Element','todo' => 'TODO'); 259 if (!$nopackage) 260 { 261 $tags[] = array('keyword' => 'Package','data' => $element-> docblock> package); 262 if (!empty($element-> docblock-> subpackage)) $tags[] = array('keyword' => 'Sub-Package','data' => $element-> docblock-> subpackage); 263 } 264 if ($element-> docblock-> var) 265 { 266 $a = $element-> docblock-> var-> Convert($this); 267 if (!empty($a)) 268 $tags[] = array('keyword' => 'Var', 'data' => $a); 269 } 270 if ($element-> docblock-> funcglobals) 271 foreach($element-> docblock-> funcglobals as $global => $val) 272 { 273 if ($a = $this-> getGlobalLink($global,$element-> docblock-> package)) 274 { 275 $global = $a; 276 } 277 $b = Converter::getLink($val[0]); 278 if (is_object($b) && phpDocumentor_get_class($b) == 'classlink') 279 { 280 $val[0] = $this-> returnSee($b); 281 } 282 $tags[] = array('keyword' => 'Global Variable Used','data' => $val[0].' '.$global.': '.$val[1]-> Convert($this)); 283 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1129 of 1382

284 285 286 287 288 > 289 290 291 292 293 294 > 295 296 297 298 299 > 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 > 319 320 321 > 322 323 324 325 > 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 > 343 344 345 346 347 348 349 350 351 352 353 354 355 356

if ($element-> docblock-> statics) foreach($element-> docblock-> statics as $static => $val) { $a = $val-> Convert($this); $tags[] = array('keyword' => 'Static Variable Used','data' => $valconverted_returnType.' '.$static.': '.$a); } if ($element-> docblock-> properties) foreach($element-> docblock-> properties as $property => $val) { $a = $val-> Convert($this); $tags[] = array('keyword' => ucfirst($val-> keyword),'data' => $valconverted_returnType.' '.$property.': '.$a); } foreach($tagses as $tag) { if (isset($names[$tag-> keyword])) $tag-> keyword = $names[$tag-> keyword]; $tags[] = array("keyword" => ucfirst($tagkeyword),"data" => $tag-> Convert($this)); } $utags = array(); foreach($element-> docblock-> unknown_tags as $keyword => $t) { foreach($t as $tag) $utags[] = array('keyword' => $keyword, 'data' => $tag-> Convert($this)); } if ($element-> type == 'packagepage') return; $sdesc = $element-> docblock-> getSDesc($this); $desc = $element-> docblock-> getDesc($this); $template-> assign('utags',$utags); $template-> assign('tags',$tags); $template-> assign('sdesc',$sdesc); $template-> assign('desc',$desc); if (false) // $element->type != 'page') { if ($element-> type != 'var' && $element-> type != 'method') { $this-> pdf-> addDestination(urlencode($element-> type.$elementdocblock-> package.$element-> name),'FitH',$this-> pdf-> y); } else { $this-> pdf-> addDestination(urlencode($element-> type.$elementdocblock-> package.$element-> class.'::'.$element-> name),'FitH',$this-> pdf-> y); } } elseif (false) { $this-> pdf-> addDestination(urlencode('page'.$element-> parentpackage.$element-> parent-> getPath()),'FitH',$this-> pdf-> y); } $this-> convertParams($element); $this-> pdf-> ezText($template-> fetch('docblock.tpl')); } function convertParams(& $element) { if ($element-> type != 'function' && $element-> type != 'method') return; if (count($element-> docblock-> params)) { $template = & $this-> newSmarty(); $params = array(); if (count($element-> docblock-> params)) foreach($element-> docblock-> params as $param => $val) { $a = $val-> Convert($this); $params[] = array("name" => $param,"type" => $valconverted_returnType,"description" => $a); } $template-> assign('params',$params); $this-> pdf-> ezText($template-> fetch('params.tpl')); } } function convertGlobal(& $element) { $sdesc = ''; if ($element-> docblock-> sdesc) { $sdesc = $element-> docblock-> sdesc-> } $template = & $this-> newSmarty();

Convert($this);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1130 of 1382

357 $template-> assign('linenumber',$element-> getLineNumber()); 358 if ($this-> hasSourceCode($element-> getPath())) 359 $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$element> getLineNumber(),$element-> getLineNumber(),true)); 360 else 361 $template-> assign('slink', false); 362 $template-> assign('dest', urlencode($element-> type.$element-> docblock> package.$element-> name)); 363 $template-> assign('type',$element-> getDataType($this)); 364 $template-> assign('name',$element-> name); 365 $template-> assign('value',$this-> getGlobalValue($element-> getValue())); 366 $template-> assign('sdesc',$sdesc); 367 $this-> pdf-> ezText($template-> fetch('global.tpl')); 368 $this-> convertDocBlock($element); 369 } 370 371 function getGlobalValue($value) 372 { 373 return parent::getGlobalValue(htmlspecialchars($value)); 374 } 375 376 function convertMethod(& $element) 377 { 378 $sdesc = ''; 379 if ($element-> docblock-> sdesc) 380 { 381 $sdesc = $element-> docblock-> sdesc-> Convert($this); 382 } 383 $params = array(); 384 if (count($element-> docblock-> params)) 385 foreach($element-> docblock-> params as $param => $val) 386 { 387 $a = $val-> Convert($this); 388 $params[$param] = array("var" => $param,"datatype" => $val-> converted_returnType,"data" => $a); 389 } 390 if ($element-> docblock-> return) 391 { 392 if (!$element-> docblock-> return-> returnType) $element-> docblock> return-> returnType = 'void'; 393 } 394 $template = & $this-> newSmarty(); 395 $template-> assign('class',$this-> class); 396 $template-> assign('constructor',$element-> isConstructor); 397 $template-> assign('dest', urlencode($element-> type.$element-> docblock> package.$element-> class.'::'.$element-> name)); 398 $template-> assign('linenumber',$element-> getLineNumber()); 399 if ($this-> hasSourceCode($element-> getPath())) 400 $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$element> getLineNumber(),$element-> getLineNumber(),true)); 401 else 402 $template-> assign('slink',false); 403 $ret = 'void'; 404 if ($element-> docblock-> return) 405 { 406 $ret = $element-> docblock-> return-> returnType; 407 } 408 $template-> assign('return',$ret); 409 $template-> assign('functioncall',$element-> getFunctionCall()); 410 $template-> assign('intricatefunctioncall',$element> getIntricateFunctionCall($this,$params)); 411 $template-> assign('sdesc',$sdesc); 412 $this-> pdf-> ezText($template-> fetch('method.tpl')); 413 $this-> convertDocBlock($element); 414 } 415 416 function convertVar(& $element) 417 { 418 $sdesc = ''; 419 if ($element-> docblock-> sdesc) 420 { 421 $sdesc = $element-> docblock-> sdesc-> Convert($this); 422 } 423 $template = & $this-> newSmarty(); 424 $template-> assign('class',$this-> class); 425 $template-> assign('linenumber',$element-> getLineNumber()); 426 if ($this-> hasSourceCode($element-> getPath())) 427 $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$element> getLineNumber(),$element-> getLineNumber(),true)); 428 else

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1131 of 1382

429 430 431 432 > 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 > 451 452 453 454 > 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 > 470 471 472 473 > 474 475 476 477 478 479 480 481 > 482 483 484 485 > 486 487 488 489 490 491 492 493 494 495 496 497 498 499 > 500

$template-> assign('slink',false); $template-> assign('type',$element-> docblock-> var-> returnType); $template-> assign('name',$element-> name); $template-> assign('dest', urlencode($element-> type.$element-> docblockpackage.$element-> class.'::'.$element-> name)); $template-> assign('value',$element-> value); $template-> assign('sdesc',$sdesc); $this-> pdf-> ezText($template-> fetch('var.tpl')); $this-> convertDocBlock($element); } function convertConst(& $element) { $sdesc = ''; if ($element-> docblock-> sdesc) { $sdesc = $element-> docblock-> sdesc-> Convert($this); } $template = & $this-> newSmarty(); $template-> assign('class',$this-> class); $template-> assign('linenumber',$element-> getLineNumber()); if ($this-> hasSourceCode($element-> getPath())) $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$elementgetLineNumber(),$element-> getLineNumber(),true)); else $template-> assign('slink',false); $template-> assign('name',$element-> name); $template-> assign('dest', urlencode($element-> type.$element-> docblockpackage.$element-> class.'::'.$element-> name)); $template-> assign('value',$element-> value); $template-> assign('sdesc',$sdesc); $this-> pdf-> ezText($template-> fetch('const.tpl')); $this-> convertDocBlock($element); } function convertClass(& $element) { $template = & $this-> newSmarty(); if ($this-> curclasspackage != $element-> docblock-> package) { $template-> assign('includeheader',true); if (isset($this-> package_pages[$element-> docblock-> package])) { $template-> assign('ppage',$this-> package_pages[$element-> docblockpackage]); $template-> assign('isclass',true); unset($this-> package_pages[$element-> docblock-> package]); } $template-> assign('classeslink',rawurlencode("Package " .$elementdocblock-> package." Classes" )); } $sdesc = ''; if ($element-> docblock-> sdesc) { $sdesc = $element-> docblock-> sdesc-> Convert($this); } $this-> curclasspackage = $element-> docblock-> package; $template-> assign('dest', urlencode($element-> type.$element-> docblockpackage.$element-> name)); $template-> assign('package',$element-> docblock-> package); $template-> assign('linenumber',$element-> getLineNumber()); if ($this-> hasSourceCode($element-> getPath())) $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$elementgetLineNumber(),$element-> getLineNumber(),true)); else $template-> assign('slink',false); $template-> assign('name',$element-> name); $template-> assign('sdesc',$sdesc); $this-> pdf-> ezText($template-> fetch('class.tpl')); $this-> convertDocBlock($element); } function convertInclude(& $element) { $template = & $this-> newSmarty(); $template-> assign('linenumber',$element-> getLineNumber()); if ($this-> hasSourceCode($element-> getPath())) $template-> assign('slink',$this-> getSourceAnchor($element-> getLineNumber(),$element-> getLineNumber(),true)); else

getPath(),$element-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1132 of 1382

501 $template-> assign('slink',false); 502 $template-> assign('name',$element-> name); 503 $template-> assign('value',$this-> getIncludeValue($element-> getValue(), $element-> getPath())); 504 $this-> pdf-> ezText($template-> fetch('include.tpl')); 505 $this-> convertDocBlock($element); 506 } 507 508 function convertFunction(& $element) 509 { 510 $sdesc = ''; 511 if ($element-> docblock-> sdesc) 512 { 513 $sdesc = $element-> docblock-> sdesc-> Convert($this); 514 } 515 $params = array(); 516 if (count($element-> docblock-> params)) 517 foreach($element-> docblock-> params as $param => $val) 518 { 519 $a = $val-> Convert($this); 520 $params[$param] = array("var" => $param,"datatype" => $val-> converted_returnType,"data" => $a); 521 } 522 if (!$element-> docblock-> return) 523 { 524 $element-> docblock-> return-> returnType = 'void'; 525 } 526 $template = & $this-> newSmarty(); 527 $template-> assign('dest', urlencode($element-> type.$element-> docblock> package.$element-> name)); 528 $template-> assign('linenumber',$element-> getLineNumber()); 529 if ($this-> hasSourceCode($element-> getPath())) 530 $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$element> getLineNumber(),$element-> getLineNumber(),true)); 531 else 532 $template-> assign('slink',false); 533 $template-> assign('return',$element-> docblock-> return-> returnType); 534 $template-> assign('functioncall',$element-> getFunctionCall()); 535 $template-> assign('intricatefunctioncall',$element> getIntricateFunctionCall($this,$params)); 536 $template-> assign('sdesc',$sdesc); 537 $this-> pdf-> ezText($template-> fetch('function.tpl')); 538 $this-> convertDocBlock($element); 539 } 540 541 function convertDefine(& $element) 542 { 543 $sdesc = ''; 544 if ($element-> docblock-> sdesc) 545 { 546 $sdesc = $element-> docblock-> sdesc-> Convert($this); 547 } 548 $template = & $this-> newSmarty(); 549 $template-> assign('linenumber',$element-> getLineNumber()); 550 if ($this-> hasSourceCode($element-> getPath())) 551 $template-> assign('slink',$this-> getSourceAnchor($element-> getPath(),$element> getLineNumber(),$element-> getLineNumber(),true)); 552 else 553 $template-> assign('slink',false); 554 $template-> assign('name',$element-> name); 555 $template-> assign('dest', urlencode($element-> type.$element-> docblock> package.$element-> name)); 556 $template-> assign('value',$element-> value); 557 $template-> assign('sdesc',$sdesc); 558 $this-> pdf-> ezText($template-> fetch('define.tpl')); 559 $this-> convertDocBlock($element); 560 } 561 562 function convertPage(& $element) 563 { 564 $template = & $this-> newSmarty(); 565 $template-> assign('includeheader',false); 566 $sdesc = ''; 567 if ($element-> docblock-> sdesc) 568 { 569 $sdesc = $element-> docblock-> sdesc-> Convert($this); 570 } 571 if (count($element-> elements) || ($sdesc) || count($element-> docblock-> tags)) 572 { 573 if ($this-> curpagepackage != $element-> parent-> package)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1133 of 1382

574 { 575 $template-> assign('includeheader',true); 576 if (isset($this-> package_pages[$element-> parent-> package])) 577 { 578 $template-> assign('ppage',$this-> package_pages[$element-> parent> package]); 579 unset($this-> package_pages[$element-> parent-> package]); 580 } 581 } 582 $this-> curpagepackage = $element-> parent-> package; 583 $template-> assign('dest', urlencode('page'.$element-> parent> package.$element-> parent-> getPath())); 584 $template-> assign('sdesc',$sdesc); 585 $template-> assign('package',$element-> parent-> package); 586 $template-> assign('name',$element-> parent-> file); 587 $this-> pdf-> ezText($template-> fetch('page.tpl')); 588 $this-> convertDocBlock($element); 589 } 590 } 591 592 593 /** 594 * Used to translate an XML DocBook tag from a tutorial by reading the 595 * options.ini file for the template. 596 * @param string tag name 597 * @param string any attributes Format: array(name => value) 598 * @param string the tag contents, if any 599 * @param string the tag contents, if any, unpost-processed 600 * @return string 601 */ 602 function TranslateTag($name,$attr,$cdata,$unconvertedcdata) 603 { 604 if ($name == 'example' && @ $attr['role'] == 'html') 605 { 606 $cdata = htmlspecialchars($cdata); 607 $unconvertedcdata = htmlspecialchars($unconvertedcdata); 608 } 609 if ($name == 'programlisting' && @ $attr['role'] == 'php') 610 { 611 $unconvertedcdata = strtr($unconvertedcdata, array_flip(get_html_translation_table(HTML_SPECIALCHARS))); 612 $a = parent::TranslateTag($name, $attr, $cdata, $unconvertedcdata); 613 // var_dump(htmlspecialchars($cdata), htmlspecialchars($unconvertedcdata), htmlspecialchars($a)); 614 return $a; 615 } 616 return parent::TranslateTag($name, $attr, $cdata, $unconvertedcdata); 617 } 618 619 function getPageName(& $element) 620 { 621 if (phpDocumentor_get_class($element) == 'parserpage') return $element-> getName(); 622 return $element-> parent-> getName(); 623 } 624 625 function getTutorialId($package,$subpackage,$tutorial,$id) 626 { 627 return 'tutorial'.$package.$subpackage.$tutorial.$id; 628 } 629 630 function getCData($value) 631 { 632 return str_replace(array('<c:' ,'<C:' ),array("&lt;c:" ,"&lt;C:" ),$value); 633 } 634 635 /** 636 * @deprecated html package pages just don't work with PDF, use {@tutorial tutorials.pkg} 637 */ 638 function convertPackagepage(& $element) 639 { 640 $x = $element-> Convert($this); 641 $x = substr($x,strpos($x,'<body' )); 642 $this-> package_pages[$element-> package] = trim(substr($x,strpos($x,'>' ) + 1,strpos($x,'</body>' ) - 6)); 643 } 644 645 function convertTutorial(& $element) 646 { 647 $x = $element-> Convert($this, true);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1134 of 1382

648 $template = & $this-> newSmarty(); 649 $template-> assign('package',$element-> package); 650 $template-> assign('subpackage',$element-> subpackage); 651 $template-> assign('contents',$x); 652 $template-> assign('title',$element-> getTitle($this)); 653 $template-> assign('child',$element-> parent); 654 if (isset($element-> parent-> parent)) $template-> assign('hasparent',$element> parent-> parent); 655 $template-> assign('element',$element); 656 $this-> pdf-> ezText($template-> fetch('tutorial.tpl')); 657 } 658 659 /** 660 * returns a template-enabled array of class trees 661 * 662 * @param string $package package to generate a class tree for 663 * @see $roots, getRootTree() 664 */ 665 function generateFormattedClassTrees($package) 666 { 667 if (!isset($this-> roots[$package])) return array(); 668 $roots = $trees = array(); 669 $roots = $this-> roots[$package]; 670 for($i=0;$i< count($roots);$i++) 671 { 672 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 673 } 674 return $trees; 675 } 676 677 /** 678 * return formatted class tree for the Class Trees page 679 * 680 * @param array $tree output from {@link getSortedClassTreeFromClass()} 681 * @see Classes::$definitechild, generateFormattedClassTrees() 682 * @return string 683 */ 684 function getRootTree($tree,$package) 685 { 686 if (!$tree) return ''; 687 $my_tree = ''; 688 $cur = '#root'; 689 $lastcur = array(false); 690 $kids = array(); 691 $dopar = false; 692 if ($tree[$cur]['parent']) 693 { 694 $dopar = true; 695 if (!is_object($tree[$cur]['parent'])) 696 { 697 // debug("parent ".$tree[$cur]['parent']." not found"); 698 $my_tree .= '<li>' . $tree[$cur]['parent'] .'<ul>' ; 699 } 700 else 701 { 702 // debug("parent ".$this->returnSee($tree[$cur]['parent'], false, false)." in other package"); 703 $my_tree .= '<li>' . $this-> returnSee($tree[$cur]['parent'], false, false); 704 if ($tree[$cur]['parent']-> package != $package) $my_tree .= ' <b>(Different package)</b><ul>' ; 705 } 706 } 707 do 708 { 709 // fancy_debug($cur,$lastcur,$kids); 710 if (count($tree[$cur]['children'])) 711 { 712 // debug("$cur has children"); 713 if (!isset($kids[$cur])) 714 { 715 // debug("set $cur kids"); 716 $kids[$cur] = 1; 717 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link'], false, false); 718 $my_tree .= '<ul>' ."\n" ; 719 } 720 array_push($lastcur,$cur);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1135 of 1382

721 list(,$cur) = each($tree[$cur]['children']); 722 // var_dump('listed',$cur); 723 if ($cur) 724 { 725 $cur = $cur['package'] . '#' . $cur['class']; 726 // debug("set cur to child $cur"); 727 // $my_tree .= '<li>'.$this->returnSee($tree[$cur]['link'], false, false); 728 continue; 729 } else 730 { 731 // debug("end of children for $cur"); 732 $cur = array_pop($lastcur); 733 $cur = array_pop($lastcur); 734 $my_tree .= '</ul></li>' ."\n" ; 735 if ($dopar && ( $cur == '#root' || !$cur)) $my_tree .= '</ul></li>' ; 736 } 737 } else 738 { 739 // debug("$cur has no children"); 740 $my_tree .= '<li>' .$this-> returnSee($tree[$cur]['link'], false, false)."</li>" ; 741 if ($dopar && $cur == '#root') $my_tree .= '</ul></li>' 742 $cur = array_pop($lastcur); 743 } 744 } while ($cur); 745 return $my_tree; 746 } 747 748 /** 749 * calls {@link Cezpdf::ezOutput()} and writes documentation.pdf to targetDir 750 */ 751 function Output($title = 'Generated Documentation') 752 { 753 phpDocumentor_out("Generating PDF file.." ); 754 flush(); 755 $template = & $this-> newSmarty(); 756 $this-> pdf-> ezText($template-> fetch('appendix_title_page.tpl')); 757 $trees = array(); 758 foreach($this-> all_packages as $package => $rest) 759 { 760 if (!isset($this-> pkg_elements[$package])) continue; 761 $a = array(); 762 phpDocumentor_out('.'); 763 flush(); 764 $a['package'] = $package; 765 $a["trees" ] = $this-> generateFormattedClassTrees($package); 766 $trees[] = $a; 767 } 768 $template-> assign('trees',$trees); 769 $this-> pdf-> ezText($template-> fetch('classtree.tpl')); 770 phpDocumentor_out('.'); 771 if (count($this-> ric_set)) 772 $this-> pdf-> ezText($template-> fetch('ric_title_page.tpl')); 773 foreach($this-> ric_set as $name => $contents) 774 { 775 $template-> assign('contents',$contents); 776 $template-> assign('name',$name); 777 $this-> pdf-> ezText($template-> fetch('ric.tpl')); 778 } 779 if (count($this-> _sourcecode)) 780 { 781 $this-> pdf-> ezText($template-> fetch('source_title_page.tpl')); 782 $template-> assign('source',$this-> _sourcecode); 783 $this-> pdf-> ezText($template-> fetch('source_loop.tpl')); 784 } 785 flush(); 786 if (count($this-> todoList)) 787 { 788 $todolist = array(); 789 foreach($this-> todoList as $package => $alltodos) 790 { 791 foreach($alltodos as $todos) 792 { 793 $converted = array(); 794 $converted['link'] = $this-> returnSee($todos[0]); 795 if (!is_array($todos[1])) 796 { 797 $converted['todos'][] = $todos[1]-> Convert($this);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1136 of 1382

798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877

} else { foreach($todos[1] as $todo) { $converted['todos'][] = $todo-> } } $todolist[$package][] = $converted; } } $template-> assign('todos',$todolist);

Convert($this);

$this-> pdf-> ezText($template-> fetch('todolist.tpl')); } if (false) { $fp = @fopen("C:/Documents and Settings/Owner/Desktop/pdfsourceorig.txt" if ($fp) { $a = $this-> pdf-> ezOutput(true); // debug fwrite($fp, $a, strlen($a)); fclose($fp); } } $this-> pdf-> setupTOC(); $template-> assign('contents',$this-> pdf-> reportContents); $this-> pdf-> ezText($template-> fetch('toc.tpl')); $x = $this-> pdf-> ezOutput(false, $template); phpDocumentor_out("done\n" ); flush(); $this-> writeFile("documentation.pdf" , $x, true); } function mystrnatcasecmp($a,$b) { return strnatcasecmp($a[0],$b[0]); } /** * @param string name of class * @param string package name * @param string full path to look in (used in index generation) * @return mixed false if not found, or an html a link to the class's documentation * @see parent::getClassLink() */ function getClassLink($expr,$package, $file = false,$text = false) { $a = Converter::getClassLink($expr,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); }

,'w');

/** * @param string name of function * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @return mixed false if not found, or an html a link to the function's documentation * @see parent::getFunctionLink() */ function getFunctionLink($expr,$package, $file = false,$text = false) { $a = Converter::getFunctionLink($expr,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text); } /** * @param string name of define * @param string package name * @param string full path to look in (used in index generation) * @param boolean deprecated * @return mixed false if not found, or an html a link to the define's documentation * @see parent::getDefineLink() */ function getDefineLink($expr,$package, $file = false,$text = false) { $a = Converter::getDefineLink($expr,$package,$file); if (!$a) return false; return $this-> returnSee($a, $text);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1137 of 1382

878 } 879 880 /** 881 * @param string name of global variable 882 * @param string package name 883 * @param string full path to look in (used in index generation) 884 * @param boolean deprecated 885 * @return mixed false if not found, or an html a link to the global variable's documentation 886 * @see parent::getGlobalLink() 887 */ 888 function getGlobalLink($expr,$package, $file = false,$text = false) 889 { 890 $a = Converter::getGlobalLink($expr,$package,$file); 891 if (!$a) return false; 892 return $this-> returnSee($a, $text); 893 } 894 895 /** 896 * @param string name of procedural page 897 * @param string package name 898 * @param string full path to look in (used in index generation) 899 * @param boolean deprecated 900 * @return mixed false if not found, or an html a link to the procedural page's documentation 901 * @see parent::getPageLink() 902 */ 903 function getPageLink($expr,$package, $path = false,$text = false) 904 { 905 $a = Converter::getPageLink($expr,$package,$path); 906 if (!$a) return false; 907 return $this-> returnSee($a, $text); 908 } 909 910 /** 911 * @param string name of method 912 * @param string class containing method 913 * @param string package name 914 * @param string full path to look in (used in index generation) 915 * @param boolean deprecated 916 * @return mixed false if not found, or an html a link to the method's documentation 917 * @see parent::getMethodLink() 918 */ 919 function getMethodLink($expr,$class,$package, $file = false,$text = false) 920 { 921 $a = Converter::getMethodLink($expr,$class,$package,$file); 922 if (!$a) return false; 923 return $this-> returnSee($a, $text); 924 } 925 926 /** 927 * @param string name of var 928 * @param string class containing var 929 * @param string package name 930 * @param string full path to look in (used in index generation) 931 * @param boolean deprecated 932 * @param boolean return just the URL, or enclose it in an html a tag 933 * @return mixed false if not found, or an html a link to the var's documentation 934 * @see parent::getVarLink() 935 */ 936 function getVarLink($expr,$class,$package, $file = false,$text = false) 937 { 938 $a = Converter::getVarLink($expr,$class,$package,$file); 939 if (!$a) return false; 940 return $this-> returnSee($a, $text); 941 } 942 943 /** 944 * @param string name of class constant 945 * @param string class containing class constant 946 * @param string package name 947 * @param string full path to look in (used in index generation) 948 * @param boolean deprecated 949 * @param boolean return just the URL, or enclose it in an html a tag 950 * @return mixed false if not found, or an html a link to the var's documentation 951 * @see parent::getConstLink() 952 */ 953 function getConstLink($expr,$class,$package, $file = false,$text = false) 954 { 955 $a = Converter::getConstLink($expr,$class,$package,$file);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1138 of 1382

956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981

if (!$a) return false; return $this-> returnSee($a, $text); } function setTemplateDir($dir) { Converter::setTemplateDir($dir); $this-> smarty_dir = $this-> templateDir; } /** @return 1 always the same */ function getState() { return 1; } /** * @see parent::unmangle() */ function unmangle($notused,$source) { $source = str_replace("\n","<mybr>",$source); return $source; }

// } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1139 of 1382

File Source for XMLDocBookpeardoc2Converter.inc


Documentation for this file is available at XMLDocBookpeardoc2Converter.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 <?php /** * Outputs documentation in XML DocBook format, in the version expected by * pear.php.net's documentation team * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package Converters * @subpackage XMLDocBook * @author Greg Beaver <[email protected]> * @copyright 2002-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: XMLDocBookpeardoc2Converter.inc 234423 2007-04-24 21:32:15Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 */ /** * XML DocBook converter. * This Converter takes output from the {@link Parser} and converts it to DocBook * output for PEAR documentation. * * This Converter differs from the parent DocBook Converter in that it does not * recognize the possibility of procedural pages or of functions! All functions * must be defined as static methods for namespace purposes. In addition, all * constants and global variables for a package are grouped together as per * peardoc2 requirements. Include statements are not documented. If you want * to document a normal project, don't use the peardoc2 converter, use the * DocBook converter. * @package Converters * @subpackage XMLDocBook * @author Greg Beaver <[email protected]> * @since 1.2 * @version $Id: XMLDocBookpeardoc2Converter.inc 234423 2007-04-24 21:32:15Z ashnazg $ */ class XMLDocBookpeardoc2Converter extends Converter { /** * This converter knows about the new root tree processing * In order to fix PEAR Bug #6389 * @var boolean */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1140 of 1382

65 var $processSpecialRoots = true; 66 /** 67 * XMLDocBookConverter wants elements sorted by type as well as alphabetically 68 * @see Converter::$sort_page_contents_by_type 69 * @var boolean 70 */ 71 var $sort_page_contents_by_type = true; 72 /** @var string */ 73 var $outputformat = 'XML'; 74 /** @var string */ 75 var $name = 'DocBook/peardoc2'; 76 /** 77 * indexes of elements by package that need to be generated 78 * @var array 79 */ 80 var $leftindex = array('classes' => true, 'pages' => false, 'functions' => false, 'defines' => true, 'globals' => true); 81 /** 82 * whether a @see is going to be in the {@link $base_dir}, or in a package/subpackage subdirectory of $base_dir 83 * @var boolean 84 */ 85 var $local = true; 86 87 /** 88 * name of current page being converted 89 * @var string 90 */ 91 var $page; 92 93 /** 94 * path of current page being converted 95 * @var string 96 */ 97 var $path; 98 99 /** 100 * name of current class being converted 101 * @var string 102 */ 103 var $class; 104 105 /** 106 * template for the procedural page currently being processed 107 * @var Template 108 */ 109 var $page_data; 110 111 /** 112 * output directory for the current procedural page being processed 113 * @var string 114 */ 115 var $page_dir; 116 117 /** 118 * Constants, used for constants.tpl 119 * @var array 120 */ 121 var $_peardoc2_constants = false; 122 123 /** 124 * Global Variables, used for globals.tpl 125 * @var array 126 */ 127 var $_peardoc2_globals = false; 128 129 /** 130 * target directory passed on the command-line. 131 * {@link $targetDir} is malleable, always adding package/ and package/subpackage/ subdirectories onto it. 132 * @var string 133 */ 134 var $base_dir; 135 136 /** 137 * output directory for the current class being processed 138 * @var string 139 */ 140 var $class_dir; 141

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1141 of 1382

142 /** 143 * template for the class currently being processed 144 * @var Template 145 */ 146 var $class_data; 147 148 /** 149 * array of converted package page names. 150 * Used to link to the package page in the left index 151 * @var array Format: array(package => 1) 152 */ 153 var $package_pages = array(); 154 155 /** 156 * Contents of the packagename.xml file are stored in this template variable 157 * @var Smarty 158 */ 159 var $packagexml; 160 /** 161 * controls formatting of parser informative output 162 * 163 * Converter prints: 164 * "Converting /path/to/file.php... Procedural Page Elements... Classes..." 165 * Since HTMLdefaultConverter outputs files while converting, it needs to send a \n to start a new line. However, if there 166 * is more than one class, output is messy, with multiple \n's just between class file output. This variable prevents that 167 * and is purely cosmetic 168 * @var boolean 169 */ 170 var $juststarted = false; 171 172 /** 173 * contains all of the template procedural page element loop data needed for the current template 174 * @var array 175 */ 176 var $current; 177 178 /** 179 * contains all of the template class element loop data needed for the current template 180 * @var array 181 */ 182 var $currentclass; 183 184 /** 185 * Pass elements by package, simplifies generation of package.xml/category.xml 186 */ 187 var $sort_absolutely_everything = true; 188 /** 189 * template options. Currently only 1 recognized option usepear 190 * 191 * usepear tells the getLink() function to return a package link to PEAR and PEAR_ERROR if possible, and to link directly 192 * to the fully-delimited link package#class.method or package#file.method in PEAR style, if possible, even if the 193 * package is not parsed. This will allow parsing of separate PEAR packages without parsing the entire thing at once! 194 * @var array 195 */ 196 var $template_options = array('usepear' => false); 197 198 var $function_data = array(); 199 var $method_data = array(); 200 var $_write_constants_xml = array(); 201 var $_write_globals_xml = array(); 202 var $sourceloc = ''; 203 /** 204 * peardoc2 Category 205 * @var string 206 */ 207 var $category; 208 /** 209 * Used to re-format output so that it's easy for translators to handle 210 * 211 * @var XML_Beautifier|false 212 * @access private 213 */ 214 var $_beautifier = false; 215

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1142 of 1382

216 /** 217 * sets {@link $base_dir} to $targetDir 218 * @see Converter() 219 */ 220 function XMLDocBookpeardoc2Converter(& $allp, & $packp, & $classes, & $procpages, $po, $pp, $qm, $targetDir, $templateDir, $title) 221 { 222 if (!class_exists('XML_Beautifier')) { 223 @include_once 'XML/Beautifier.php'; 224 } 225 Converter::Converter($allp, $packp, $classes, $procpages,$po, $pp, $qm, $targetDir, $templateDir, $title); 226 if (class_exists('XML_Beautifier')) { 227 require_once 'phpDocumentor/Converters/XML/DocBook/peardoc2/Beautifier.php'; 228 $this-> _beautifier = new phpDocumentor_peardoc2_XML_Beautifier; 229 $this-> _beautifier-> setOption('indent', ' '); 230 } 231 $this-> base_dir = $targetDir; 232 } 233 234 /** 235 * do that stuff in $template_options 236 */ 237 function & getLink($expr, $package = false, $packages = false) 238 { 239 return Converter::getLink($expr, $package, $packages); 240 } 241 242 function unmangle($s,$sourcecode) 243 { 244 return '<programlisting role="php"><![CDATA[ 245 '.$sourcecode.']]></programlisting>' ; 246 } 247 248 /** 249 * Writes a file to target dir, beautify any .xml files first 250 * @param string filename 251 * @param string file contents 252 * @param boolean true if the data is binary and not text 253 */ 254 function writeFile($file,$data,$binary = false) 255 { 256 if ($this-> _beautifier && substr($file, -4) == '.xml') { 257 $ret = $this-> _beautifier-> formatString($data); 258 if (PEAR::isError($ret)) { 259 addWarning(PDERROR_BEAUTIFYING_FAILED, $ret-> getMessage()); 260 $ret = $data; 261 } 262 $data = $ret; 263 } 264 return parent::writeFile($file, $data, $binary); 265 } 266 267 /** 268 * Used to convert the {@}example} inline tag in a docblock. 269 * 270 * By default, this just wraps ProgramExample 271 * @see XMLDocBookpeardoc2Converter::exampleProgramExample 272 * @param string 273 * @param boolean true if this is to highlight a tutorial <programlisting> 274 * @return string 275 */ 276 function exampleProgramExample($example, $tutorial = false, $inlinesourceparse = null/*false*/, 277 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/) 278 { 279 return '<example><title>Example</title><programlisting role="php"><![CDATA[' . 280 $example . ']]></programlisting></example>' ; 281 $this-> ProgramExample($example, $tutorial, $inlinesourceparse, $class, $linenum, $filesourcepath) 282 . '</example>' ; 283 } 284 285 function writeExample($title, $path, $source) 286 { 287 $this-> _save_example = array($title, $source); 288 } 289

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1143 of 1382

290 function getExampleLink($unused, $title) 291 { 292 $source = $this-> _save_example[1]; 293 return '<para><example><title>' . $title . '</title>' . $source . '</example></para>' ; 294 } 295 296 function type_adjust($typename) 297 { 298 if (isset($this-> template_options['typechanging'][trim($typename)])) 299 return $this-> template_options['typechanging'][trim($typename)]; 300 $a = $this-> getLink($typename); 301 if (is_object($a)) 302 { 303 if (phpDocumentor_get_class($a) == 'classlink') 304 return '<classname>' .$typename.'</classname>' ; 305 if (phpDocumentor_get_class($a) == 'functionlink' || phpDocumentor_get_class($a) == 'methodlink') 306 return '<function>' .$typename.'</function>' ; 307 if (phpDocumentor_get_class($a) == 'definelink') 308 return '<constant>' .$typename.'</constant>' ; 309 if (phpDocumentor_get_class($a) == 'varlink') 310 return '<varname>' .$typename.'</varname>' ; 311 } 312 return $typename; 313 } 314 315 /** 316 * Writes out the template file of {@link $class_data} and unsets the template to save memory 317 * @see registerCurrentClass() 318 * @see parent::endClass() 319 * @todo move class summary into an array to be written out at the end 320 * of parsing each package 321 */ 322 function endClass() 323 { 324 $a = '../'; 325 if (!empty($this-> subpackage)) $a .= '../'; 326 if ($this-> juststarted) 327 { 328 $this-> juststarted = false; 329 phpDocumentor_out("\n" ); 330 flush(); 331 } 332 foreach($this-> method_data as $func) 333 { 334 $func[0]-> assign("phpdocversion" ,PHPDOCUMENTOR_VER); 335 $func[0]-> assign("phpdocwebsite" ,PHPDOCUMENTOR_WEBSITE); 336 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . strtolower($this> category) . PATH_DELIMITER . strtolower($this-> class_dir . PATH_DELIMITER . str_replace(array('_','.'),array('-','--'),$this-> class))); 337 $this-> writefile(strtolower($func[1] ). '.xml','<!-- $' . "Revision$ ->\n" . $func[0]-> fetch('method.tpl')); 338 } 339 // code below is in packagename.xml handling, see Output() 340 /* $this->setTargetDir($this->base_dir . PATH_DELIMITER . strtolower($this>category) . PATH_DELIMITER . strtolower($this->class_dir)); 341 $this->writefile(str_replace(array('_','.'),array('-','--'),strtolower($this>class)) . '.xml',$this->class_data->fetch('class.tpl'));*/ 342 unset($this-> class_data); 343 } 344 345 function addSummaryToPackageXml($template_output) 346 { 347 $this-> packagexml-> append('ids',$template_output); 348 } 349 350 /** 351 * @param parserClass|false$element is false if this is the end of all conversion 352 */ 353 function flushPackageXml($element) 354 { 355 if (isset($this-> packagexml)) 356 { 357 if (!$element || $element-> docblock-> package != $this-> package) // finished with package 358 { 359 if (isset($this-> _write_constants_xml[$this-> category][$this> package]) &&

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1144 of 1382

360 $this-> _write_constants_xml[$this-> category][$this-> package]) 361 { 362 $this-> packagexml-> append('ids', 363 '&package.' . 364 strtolower($this-> category.'.' . 365 str_replace(array('_','.'),array('-','--'),$this> package).'.constants;')); 366 $this-> _write_constants_xml[$this-> category][$this-> package] = false; 367 } 368 if (isset($this-> _write_globals_xml[$this-> category][$this-> package]) && 369 $this-> _write_globals_xml[$this-> category][$this-> package]) 370 { 371 $this-> packagexml-> append('ids', 372 '&package.' .strtolower($this-> category.'.' . 373 str_replace(array('_','.'),array('-','--'),$this> package).'.globals;')); 374 $this-> _write_globals_xml[$this-> category][$this-> package] = false; 375 } 376 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . strtolower($this> category)); 377 $this-> writefile(str_replace('_','-',strtolower($this-> package)).'.xml', 378 '<!-- $' . "Revision$ -->\n" . $this-> packagexml> fetch('package.tpl')); 379 $this-> packagexml-> clear_all_assign(); 380 if ($element) { 381 $this-> packagexml-> assign('package',$element-> docblock> package); 382 $this-> packagexml-> assign('ids',array()); 383 $this-> packagexml-> assign('id',$this-> getId($element, true)); 384 } 385 } 386 } else 387 { 388 $this-> packagexml = $this-> newSmarty(); 389 $this-> packagexml-> assign('package',$element-> docblock-> package); 390 $this-> packagexml-> assign('ids',array()); 391 $this-> packagexml-> assign('id',$this-> getId($element, true)); 392 } 393 } 394 395 /** 396 * @param string 397 * @param string 398 * @return string <ulink url="'.$link.'">'.$text.'</ulink> 399 */ 400 function returnLink($link,$text) 401 { 402 return '<ulink url="' .$link.'">' .$text.'</ulink>' ; 403 } 404 405 function makeLeft() 406 { 407 } 408 409 /** 410 * Does nothing 411 */ 412 function formatPkgIndex() 413 { 414 } 415 416 /** 417 * Does nothing 418 */ 419 function formatIndex() 420 { 421 } 422 423 /** 424 * Does nothing 425 */ 426 function writeNewPPage($key) 427 { 428 } 429 430 /** 431 * Does nothing 432 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1145 of 1382

433 function writeSource() 434 { 435 } 436 437 /** 438 * Creates package/lang/categoryname/packagename.xml for each package 439 */ 440 function formatLeftIndex() 441 { 442 $this-> makeLeft(); 443 } 444 445 /** 446 * This function takes an {@link abstractLink} descendant and returns an html link 447 * 448 * @param abstractLink a descendant of abstractlink should be passed, and never text 449 * @param string text to display in the link 450 * @param boolean this parameter is not used, and is deprecated 451 * @param boolean determines whether the returned text is enclosed in an <link> tag 452 */ 453 function returnSee(& $element, $eltext = false, $local = true, $with_a = true) 454 { 455 if (!$element) return false; 456 if (!$eltext) 457 { 458 $eltext = ''; 459 switch($element-> type) 460 { 461 case 'tutorial' : 462 $eltext = $element-> title; 463 break; 464 case 'class' : 465 $eltext = '<classname>' .$element-> name.'</classname>' ; 466 break; 467 case 'method' : 468 $eltext .= '<function>' ; 469 case 'var' : 470 if ($element-> type == 'var') $eltext .= '<varname>' ; 471 $eltext .= $element-> class.'::'; 472 case 'page' : 473 case 'define' : 474 if ($element-> type == 'define') 475 $eltext .= '<constant>' ; 476 case 'function' : 477 if ($element-> type == 'function') 478 $eltext .= '<function>' ; 479 case 'global' : 480 default : 481 $eltext .= $element-> name; 482 if ($element-> type == 'function' || $element-> type == 'method') $eltext .= '</function>' ; 483 if ($element-> type == 'var') $eltext .= '</varname>' ; 484 if ($element-> type == 'define') $eltext .= '</constant>' ; 485 break; 486 } 487 } elseif (!is_object($element)) { 488 return false; 489 } elseif ($element-> type == 'method') 490 { 491 $eltext = str_replace($element-> name . '()', $element-> name, $eltext); 492 } 493 494 if ($element-> type == 'page' || $element-> type == 'function' || $element-> type == 'var') 495 { // we ignore all procedural pages, instead, constant, function and 496 // global variable pages are output 497 return $eltext; 498 } 499 if ($element-> type == 'class') 500 { 501 return '<link linkend="' .$this-> getId($element).'summary">' .$eltext.'</link>' ; 502 } 503 return '<link linkend="' .$this> getId($element).'">' .$eltext.'</link>' ; 504 } 505 506 /** 507 * Get the id value needed to allow linking 508 * @param mixed descendant of parserElement or parserData/parserPage

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1146 of 1382

509 * @param boolean true to return the id for the package page 510 * @see parserElement, parserData, parserPage 511 * @return string the id value for this element type 512 */ 513 function getId(& $el, $returnpackage = false) 514 { 515 if (phpDocumentor_get_class($el) == 'parserdata') 516 { 517 $element = $this-> addLink($el-> parent); 518 $elp = $el-> parent; 519 } elseif (!is_a($el,'abstractlink')) 520 { 521 $elp = $el; 522 $element = $this-> addLink($el); 523 } else $element = $el; 524 $a = ''; 525 if (!empty($element-> subpackage)) 526 { 527 $a = str_replace(array('_','.'),array('-','--'),$element-> subpackage).'.'; 528 } 529 if ($returnpackage) return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element-> package)); 530 switch ($element-> type) 531 { 532 case 'page' : 533 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element-> package).'.'.$a.$element> fileAlias); 534 break; 535 case 'define' : 536 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.constants.details.'.$element-> fileAlias); 537 break; 538 case 'global' : 539 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.globals.details.'.$element-> fileAlias); 540 break; 541 case 'class' : 542 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.'.$a.str_replace(array('_','.'),array('-','--'),$element-> name)); 543 break; 544 case 'function' : 545 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element-> package).'.'.$a.$element> fileAlias.'.'.str_replace('_','-',$element-> name)); 546 break; 547 case 'method' : 548 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.'.$a.str_replace(array('_','.'),array('-','--'),$element> class).'.'.str_replace('_','-',$element-> name)); 549 break; 550 case 'var' : 551 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.'.$a.str_replace(array('_','.'),array('-','--'),$element-> class).'summary.vars.'.str_replace(array('$','_'),array('var--','-'),$element-> name)); 552 break; 553 case 'tutorial' : 554 return 'package.'.strtolower($element> category.'.'.str_replace(array('_','.'),array('-','--'),$element> package).'.'.$a.str_replace(array('_','.'),array('-','--'),$element-> name)).'-tutorial'; 555 break; 556 } 557 } 558 559 /** 560 * Create errors.html template file output 561 * 562 * This method takes all parsing errors and warnings and spits them out ordered by file and line number. 563 * @global ErrorTracker We'll be using it's output facility 564 */ 565 function ConvertErrorLog() 566 { 567 global $phpDocumentor_errors; 568 $allfiles = array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1147 of 1382

569 $files = array(); 570 $warnings = $phpDocumentor_errors-> returnWarnings(); 571 $errors = $phpDocumentor_errors-> returnErrors(); 572 $template = & $this-> newSmarty(); 573 foreach($warnings as $warning) 574 { 575 $file = '##none'; 576 $linenum = 'Warning'; 577 if ($warning-> file) 578 { 579 $file = $warning-> file; 580 $allfiles[$file] = 1; 581 $linenum .= ' on line '.$warning-> linenum; 582 } 583 $files[$file]['warnings'][] = array('name' => $linenum, 'listing' => $warning> data); 584 } 585 foreach($errors as $error) 586 { 587 $file = '##none'; 588 $linenum = 'Error'; 589 if ($error-> file) 590 { 591 $file = $error-> file; 592 $allfiles[$file] = 1; 593 $linenum .= ' on line '.$error-> linenum; 594 } 595 $files[$file]['errors'][] = array('name' => $linenum, 'listing' => $error> data); 596 } 597 $i=1; 598 $af = array(); 599 foreach($allfiles as $file => $num) 600 { 601 $af[$i++] = $file; 602 } 603 $allfiles = $af; 604 usort($allfiles,'strnatcasecmp'); 605 $allfiles[0] = "Post-parsing" ; 606 foreach($allfiles as $i => $a) 607 { 608 $allfiles[$i] = array('file' => $a); 609 } 610 $out = array(); 611 foreach($files as $file => $data) 612 { 613 if ($file == '##none') $file = 'Post-parsing'; 614 $out[$file] = $data; 615 } 616 $template-> assign("files" ,$allfiles); 617 $template-> assign("all" ,$out); 618 $template-> assign("title" ,"phpDocumentor Parser Errors and Warnings" ); 619 $this-> setTargetDir($this-> base_dir); 620 $this-> writefile("errors.html" ,$template-> fetch('errors.tpl')); 621 unset($template); 622 phpDocumentor_out("\n\nTo view errors and warnings, look at " .$this> base_dir. PATH_DELIMITER . "errors.html\n" ); 623 flush(); 624 } 625 626 function postProcess($text) 627 { 628 return str_replace("'" , '&apos;' , htmlentities($text)); 629 } 630 631 function prepareDocBlock(& $element, $nopackage = true) 632 { 633 $a = new parserStringWithInlineTags; 634 $a-> add('no exceptions thrown'); 635 if (!$element-> docblock-> getKeyword('throws')) $element-> docblock> addKeyword('throws',$a); 636 $tags = parent::prepareDocBlock($element, 637 array('staticvar' => 'note','deprec' => 'deprecated', 638 'abstract' => 'abstract','TODO' => 'note', 'link' => 'see', 639 'uses' => 'see', 'usedby' => 'see', 'tutorial' => 'see', 640 'return' => 'returns', 'access' => false), $nopackage); 641 $ret = array(); 642 foreach($tags['tags'] as $tag) 643 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1148 of 1382

644 if ($tag['keyword'] == 'return') 645 { 646 // hack because stupid Converter isn't doing its job 647 $tag['keyword'] = 'returns'; 648 } 649 $ret[$tag['keyword']][] = $tag; 650 } 651 $tags['tags'] = $ret; 652 $tags['sdesc'] = $this-> wordwrap($tags['sdesc']); 653 return $tags; 654 } 655 656 function getTutorialId($package,$subpackage,$tutorial,$id,$category) 657 { 658 $subpackage = (empty($subpackage) ? '' : '.'.$subpackage); 659 $id = (empty($id) ? '' : '.'.$id); 660 return 'package.'.strtolower($category.'.'.$package.$subpackage.str_replace(array('_','.'),array('-','-'),$tutorial).$id); 661 } 662 663 664 /** 665 * Retrieve a Converter-specific anchor to a segment of a source code file 666 * parsed via a {@tutorial tags.filesource.pkg} tag. 667 * 668 * NOTE: unused 669 * @param string full path to source file 670 * @param string name of anchor 671 * @param string link text, if this is a link 672 * @param boolean returns either a link or a destination based on this 673 * parameter 674 * @return string link to an anchor, or the anchor 675 */ 676 function getSourceAnchor($sourcefile,$anchor,$text = '',$link = false) 677 { 678 return ''; 679 } 680 681 function Br($input) 682 { 683 return " $input\n" ; 684 } 685 686 function getCData($value) 687 { 688 return '<![CDATA[' .$value.']]>' ; 689 } 690 691 function ProgramExample($listing, $tutorial = false, $inlinesourceparse = null/*false*/, 692 $class = null/*false*/, $linenum = null/*false*/, $filesourcepath = null/*false*/, $origsource = null) 693 { 694 if ($origsource !== null) { 695 $listing = $origsource; 696 } 697 if (!tokenizer_ext) 698 { 699 $listing = $this-> getCData($listing); 700 } 701 return '<programlisting role="php">' . $this-> getCData($listing) . '</programlisting>' ; 702 } 703 704 /** 705 * Does nothing - use tutorials for DocBook 706 * @param parserPackagePage 707 */ 708 function convertPackagePage(& $element) 709 { 710 } 711 712 /** 713 * Convert tutorials for output 714 * @param parserTutorial 715 */ 716 function convertTutorial(& $element) 717 { 718 $template = & parent::convertTutorial($element); 719 phpDocumentor_out("\n" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1149 of 1382

720 flush(); 721 $x = $element-> Convert($this,false); 722 if ($element-> ini) 723 { // add child tutorial list to the tutorial through a slight hack :) 724 $subtutorials = ''; 725 $b = ''; 726 if (!empty($element-> subpackage)) $b = '.'.$element-> subpackage; 727 foreach($element-> ini['Linked Tutorials'] as $child) 728 { 729 $subtutorials .= ' &' .$element-> category.'.'.$element> package.$b.'.'.str_replace(array('_','.'),array('-','--'),$child).'-'.$element> tutorial_type."-tutorial;\n" ; 730 } 731 $x = str_replace('</refsect1></refentry>' ,'</refsect1> 732 <refsect1> 733 <title>Related Docs</title> 734 <para> 735 '.$subtutorials. 736 ' </para> 737 </refsect1></refentry>' ,$x); 738 } 739 $template-> assign('contents',$x); 740 $contents = $template-> fetch('tutorial.tpl'); 741 $a = ''; 742 if ($element-> subpackage) $a = PATH_DELIMITER . $element-> subpackage; 743 phpDocumentor_out("\n" ); 744 flush(); 745 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . str_replace(array('_','.'),array('-','--'),strtolower($element-> category)) 746 . PATH_DELIMITER . strtolower(str_replace(array('_','.'),array('-','--'),$element> package) . $a)); 747 $this-> writeFile(str_replace(array('_','.'),array('-','--'),strtolower($element> name)).'-tutorial.xml', 748 '<!-- $' . "Revision$ -->\n" . $contents); 749 } 750 751 /** 752 * Does nothing in this converter 753 * @param parserVar 754 */ 755 function convertVar(& $element) 756 { 757 return; 758 $docblock = $this-> prepareDocBlock($element); 759 $b = 'mixed'; 760 if ($element-> docblock-> var) 761 { 762 $b = $element-> docblock-> var-> converted_returnType; 763 } 764 // var_dump($this->getFormattedOverrides($element)); 765 if (isset($this-> template_options['separatepage']) && $this> template_options['separatepage']) 766 $this-> class_summary-> append('vars',array('sdesc' => $docblock['sdesc'], 767 'desc' => $docblock['desc'], 768 'tags' => $docblock['tags'], 769 'var_name' => $this-> type_adjust($element> getName()), 770 'var_default' => htmlspecialchars($element> getValue()), 771 'var_type' => $b, 772 'var_overrides' => $this> getFormattedOverrides($element), 773 'line_number' => $element-> getLineNumber(), 774 'id' => $this-> getId($element))); 775 else 776 $this-> class_data-> append('vars',array('sdesc' => $docblock['sdesc'], 777 'desc' => $docblock['desc'], 778 'tags' => $docblock['tags'], 779 'var_name' => $this-> type_adjust($element> getName()), 780 'var_default' => htmlspecialchars($element> getValue()), 781 'var_type' => $b, 782 'var_overrides' => $this> getFormattedOverrides($element), 783 'line_number' => $element-> getLineNumber(), 784 'id' => $this-> getId($element))); 785 } 786 787 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1150 of 1382

788 * Converts class for template output 789 * @param parserClass 790 * @uses flushPackageXml() creates packagename.xml file when all classes in 791 * a package have been converted 792 */ 793 function convertClass(& $element) 794 { 795 $this-> flushPackageXml($element); 796 parent::convertClass($element); 797 $docblock = $this-> prepareDocBlock($element); 798 $this-> method_data = array(); 799 $this-> class_dir = str_replace(array('_','.'),array('-','--'),$element-> docblock> package); 800 $this-> package = $element-> docblock-> package; 801 $this-> category = strtolower($element-> docblock-> category); 802 if (!empty($element-> docblock-> subpackage)) $this-> class_dir .= PATH_DELIMITER . $element-> docblock-> subpackage; 803 $docblock = $this-> prepareDocBlock($element,false); 804 $this-> class_data-> assign("sdesc" ,$docblock['sdesc']); 805 $this-> class_data-> assign("desc" ,$docblock['desc']); 806 $this-> class_data-> assign("tags" ,$docblock['tags']); 807 808 $this-> class_data-> assign("source_location" ,$element> getSourceLocation($this,$this-> template_options['usepear'])); 809 $this-> class_data-> assign("id" ,$this-> getId($element)); 810 $this-> class_data-> assign("method_ids" ,array()); 811 $this-> left[$this-> package][] = array('link' => $this-> getId($element).'summary'); 812 if ($t = $element-> getTutorial()) 813 { 814 $this-> class_data-> append("method_ids" ,$this-> getId($t)); 815 } 816 817 if (isset($this-> template_options['separatepage']) && $this> template_options['separatepage']) 818 { 819 $this-> class_summary = & $this-> newSmarty(true); 820 if ($t = $element-> getTutorial()) 821 { 822 $this-> class_summary-> assign("tutorial" ,$this> returnSee($t)); 823 } 824 825 $this-> class_summary-> assign("class_name" ,$this> type_adjust($element-> getName())); 826 $this-> class_summary-> assign("sdesc" ,$docblock['sdesc']); 827 $this-> class_summary-> assign("desc" ,$docblock['desc']); 828 $this-> class_summary-> assign("tags" ,$docblock['tags']); 829 $this-> class_summary-> assign("vars" ,array()); 830 $this-> class_summary-> assign("methods" ,array()); 831 $this-> class_summary-> assign("package" ,$element-> docblock> package); 832 833 $this-> class_summary-> assign("children" , $this> generateChildClassList($element)); 834 $this-> class_summary-> assign("class_tree" , $this> generateFormattedClassTree($element)); 835 $this-> class_summary-> assign("conflicts" , $this> getFormattedConflicts($element,"classes" )); 836 837 $this-> class_summary-> assign("source_location" ,$element> getSourceLocation($this,$this-> template_options['usepear'])); 838 $this-> class_summary-> assign("id" ,$this-> getId($element).'summary'); 839 $this-> class_data-> append("method_ids" ,$this> getId($element).'.'.strtolower(str_replace('_','-',$element-> getName())).'-summary'); 840 $inherited_methods = $this-> getFormattedInheritedMethods($element); 841 if (!empty($inherited_methods)) 842 { 843 $this-> class_summary-> assign("imethods" ,$inherited_methods); 844 } 845 $inherited_vars = $this-> getFormattedInheritedVars($element); 846 // variables are irrelevant in peardoc2 847 if (false)//!empty($inherited_vars)) 848 { 849 $this-> class_summary-> assign("ivars" ,$inherited_vars); 850 } 851 $this-> addSummaryToPackageXml($this-> class_summary> fetch('class_summary.tpl')); 852 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1151 of 1382

853 $this-> sourceloc = $element-> getSourceLocation($this,$this> template_options['usepear']); 854 } 855 856 /** 857 * Converts method for template output 858 * @see prepareDocBlock(), parserMethod::getFunctionCall(), getFormattedDescMethods(), getFormattedOverrides() 859 * @param parserMethod 860 */ 861 function convertMethod(& $element) 862 { 863 $docblock = $this-> prepareDocBlock($element); 864 $returntype = 'void'; 865 if ($element-> docblock-> return) 866 { 867 $a = $element-> docblock-> return-> Convert($this); 868 $returntype = $element-> docblock-> return-> converted_returnType; 869 if ($returntype != $element-> docblock-> return-> returnType) 870 { 871 $returntype = " <replaceable> $returntype</replaceable> " ; 872 } 873 } 874 $params = array(); 875 if (count($element-> docblock-> params)) 876 foreach($element-> docblock-> params as $param => $val) 877 { 878 $a = $val-> Convert($this); 879 $b = explode(' ',$a); 880 $c = ''; 881 foreach($b as $blah) { 882 if (!empty($c)) { 883 $c .= ' '; 884 } 885 $c .= str_replace(array('true', 'false', 'null'), array('&true;' , '&false;' , '&null;' ), $blah); 886 } 887 $params[$param] = array("var" => $param,"datatype" => str_replace(array('true', 'false', 'null'), array('&true;' , '&false;' , '&null;' ), 888 $val-> returnType), "cdatatype" => $val> converted_returnType,"data" => $this-> wordwrap($c)); 889 } 890 891 $call = $element-> getIntricateFunctionCall($this, $params); 892 if (isset($call['params'])) 893 { 894 foreach($call['params'] as $i => $param) 895 { 896 if (!is_string($call['params'][$i]['default'])) 897 { 898 continue; 899 } 900 $call['params'][$i]['default'] = str_replace(array('true', 'false', 'null'), array('&true;' , '&false;' , '&null;' ), $param['default']); 901 } 902 } 903 $this-> packagexml-> append('ids','&' .$this-> getId($element).';'); 904 $this-> class_data-> append('method_ids',$this-> getId($element)); 905 $this-> class_summary-> append('methods',array('id' => $this-> getId($element), 906 'sdesc' => $docblock['sdesc'], 907 'desc' => $docblock['desc'], 908 'tags' => $docblock['tags'], 909 'is_constructor' => $element> isConstructor, 910 'function_name' => $element-> getName(), 911 'function_return' => $returntype, 912 'function_call' => $call, 913 'descmethod' => $this> getFormattedDescMethods($element), 914 'method_overrides' => $this> getFormattedOverrides($element), 915 'line_number' => $element> getLineNumber(), 916 'params' => $params)); 917 $this-> method_data[$i = count($this-> method_data) - 1][0] = & $this> newSmarty(true); 918 $this-> method_data[$i][1] = str_replace(array('_','.'),array('-','--'),$element> getName()); 919 $this-> method_data[$i][0]-> assign('class',$this-> class); 920 $this-> method_data[$i][0]-> assign('source_location',$this-> returnSee($this-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1152 of 1382

> getLink(basename($this-> curpage-> getFile())),$this-> sourceloc)); 921 $this-> method_data[$i][0]-> assign('sdesc',$docblock['sdesc']); 922 $this-> method_data[$i][0]-> assign('desc',$docblock['desc']); 923 $this-> method_data[$i][0]-> assign('tags',$docblock['tags']); 924 $this-> method_data[$i][0]-> assign('function_name',$element-> getName()); 925 $this-> method_data[$i][0]-> assign('function_return',$returntype); 926 $this-> method_data[$i][0]-> assign('function_call',$call); 927 $this-> method_data[$i][0]-> assign('descmethod',$this> getFormattedDescMethods($element)); 928 $this-> method_data[$i][0]-> assign('method_overrides',$this> getFormattedOverrides($element)); 929 $this-> method_data[$i][0]-> assign('params',$params); 930 $this-> method_data[$i][0]-> assign('id',$this-> getId($element)); 931 } 932 933 /** 934 * Converts function for template output - does nothing in peardoc2! 935 * @param parserFunction 936 */ 937 function convertFunction(& $element) 938 { 939 /* parent::convertFunction($element); 940 $docblock = $this->prepareDocBlock($element); 941 $fname = $element->getName(); 942 $params = array(); 943 if (count($element->docblock->params)) 944 foreach($element->docblock->params as $param => $val) 945 { 946 $a = $val->Convert($this); 947 $params[$param] = array("var" => $param,"datatype" => $val->converted_returnType,"data" => $a); 948 } 949 $returntype = 'void'; 950 if ($element->docblock->return) 951 { 952 $a = $element->docblock->return->Convert($this); 953 $returntype = $element->docblock->return->converted_returnType; 954 } 955 956 $this->page_data->append("function_ids",$this->getId($element)); 957 $this->page_summary->append("function_ids",$this->getId($element)); 958 $this->page_summary->append('functions',array('id' => $this>getId($element), 959 'sdesc' => $docblock['sdesc'], 960 'desc' => $docblock['desc'], 961 'tags' => $docblock['tags'], 962 'function_name' => $element->getName(), 963 'line_number' => $element>getLineNumber(), 964 'function_return' => $returntype, 965 'function_call' => $element>getIntricateFunctionCall($this,$params), 966 'function_conflicts' => $this>getFormattedConflicts($element,'functions'), 967 'params' => $params)); 968 $this->function_data[$i = count($this->function_data) - 1][0] = $this>newSmarty(true); 969 $this->function_data[$i][1] = $element->getName(); 970 $this->function_data[$i][0]->assign('sdesc',$docblock['sdesc']); 971 $this->function_data[$i][0]->assign('desc',$docblock['desc']); 972 $this->function_data[$i][0]->assign('tags',$docblock['tags']); 973 $this->function_data[$i][0]->assign('function_name',$fname); 974 $this->function_data[$i][0]->assign('line_number',$element->getLineNumber()); 975 $this->function_data[$i][0]->assign('function_return',$returntype); 976 $this->function_data[$i][0]->assign('function_call',$element>getIntricateFunctionCall($this,$params)); 977 $this->function_data[$i][0]->assign('function_conflicts',$this>getFormattedConflicts($element,"functions")); 978 $this->function_data[$i][0]->assign('params',$params); 979 $this->function_data[$i][0]->assign('source_location',$this->returnSee($this>getLink(basename($this->curpage->getFile())),$this->sourceloc)); 980 $this->function_data[$i][0]->assign('id',$this->getId($element));*/ 981 } 982 983 /** 984 * Converts include elements for template output 985 * 986 * Completely ignored by this converter 987 * @param parserInclude 988 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1153 of 1382

989 function convertInclude(& $element) 990 { 991 /* parent::convertInclude($element, array('include_file' => '-'.strtr($element>getValue(),array('"' => '', "'" => '','.' => '-')))); 992 $docblock = $this->prepareDocBlock($element); 993 $per = $this->getIncludeValue($element->getValue(), $element->getPath()); 994 $this->page_summary->append('includes',array('sdesc' => $docblock['sdesc'], 995 'desc' => $docblock['desc'], 996 'tags' => $docblock['tags'], 997 'utags' => $docblock['utags'], 998 'include_name' => $element>getName(), 999 'include_value' => $per, 1000 'line_number' => $element>getLineNumber(), 1001 'include_file' => '-'.strtr($element>getValue(),array('"' => '', "'" => '','.' => '-'))));*/ 1002 } 1003 1004 /** 1005 * Converts defines for template output 1006 * @see prepareDocBlock(), getFormattedConflicts() 1007 * @param parserDefine 1008 */ 1009 function convertDefine(& $element) 1010 { 1011 $docblock = $this-> prepareDocBlock($element); 1012 $this-> _appendDefines(array('sdesc' => $docblock['sdesc'], 1013 'desc' => $docblock['desc'], 1014 'tags' => $docblock['tags'], 1015 'name' => $this-> postProcess($element> getName()), 1016 'value' => $this-> postProcess($element> getValue()), 1017 'conflicts' => $this> getFormattedConflicts($element,"defines" ), 1018 'line_number' => $element-> getLineNumber(), 1019 'id' => $this-> getId($element))); 1020 } 1021 1022 /** 1023 * Append the constant information to the Smarty information 1024 * 1025 * Uses category, package, and current file to organize constants defined 1026 * in a package for the constants.xml output file 1027 * @param array 1028 * @uses $_peardoc2_constants appends $define to them 1029 * @access private 1030 */ 1031 function _appendDefines($define) 1032 { 1033 if (!isset($this-> _peardoc2_constants[$this-> category][$this-> package][$this> sourceloc])) 1034 { 1035 $this-> _peardoc2_constants[$this-> category][$this-> package][$this> sourceloc]['name'] = 1036 $this-> sourceloc; 1037 $this-> _peardoc2_constants[$this-> category][$this-> package][$this> sourceloc]['page'] = 1038 $this-> page; 1039 } 1040 $this-> _write_constants_xml[$this-> category][$this-> package] = true; 1041 $this-> _peardoc2_constants[$this-> category][$this-> package][$this> sourceloc]['defines'][] = $define; 1042 } 1043 1044 /** 1045 * Converts global variables for template output 1046 * @param parserGlobal 1047 * @see prepareDocBlock(), getFormattedConflicts() 1048 */ 1049 function convertGlobal(& $element) 1050 { 1051 $docblock = $this-> prepareDocBlock($element); 1052 $value = $this-> getGlobalValue($element-> getValue()); 1053 if ($value == $element-> getValue()) 1054 { 1055 $value = $this-> ProgramExample($value); 1056 } else 1057 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1154 of 1382

1058 $value = $this-> getGlobalValue('<![CDATA[' .$element-> getValue() . ']]>' ); 1059 } 1060 $this-> _appendGlobals(array('sdesc' => $docblock['sdesc'], 1061 'desc' => $docblock['desc'], 1062 'tags' => $docblock['tags'], 1063 'name' => $this-> postProcess($element> getName()), 1064 'link' => $element-> getName(), 1065 'value' => $value, 1066 'type' => $element-> getDataType($this), 1067 'line_number' => $element-> getLineNumber(), 1068 'conflicts' => $this> getFormattedConflicts($element,"global variables" ), 1069 'id' => $this-> getId($element))); 1070 } 1071 1072 /** 1073 * Append the global variable information to the Smarty information 1074 * 1075 * Uses category, package, and current file to organize globals defined 1076 * in a package for the globals.xml output file 1077 * @param array 1078 * @uses $_peardoc2_globals appends $global to them 1079 * @access private 1080 */ 1081 function _appendGlobals($global) 1082 { 1083 if (!isset($this-> _peardoc2_globals[$this-> category][$this-> package][$this> sourceloc])) 1084 { 1085 $this-> _peardoc2_globals[$this-> category][$this-> package][$this> sourceloc]['name'] = 1086 $this-> sourceloc; 1087 $this-> _peardoc2_globals[$this-> category][$this-> package][$this> sourceloc]['page'] = 1088 $this-> page; 1089 } 1090 $this-> _write_globals_xml[$this-> category][$this-> package] = true; 1091 $this-> _peardoc2_globals[$this-> category][$this-> package][$this> sourceloc]['globals'][] = $global; 1092 } 1093 1094 /** 1095 * converts procedural pages for template output 1096 * @see prepareDocBlock(), getClassesOnPage() 1097 * @param parserData 1098 */ 1099 function convertPage(& $element) 1100 { 1101 parent::convertPage($element); 1102 $this-> juststarted = true; 1103 $this-> page_dir = $element-> parent-> package; 1104 $this-> page = $this-> getPageName($element-> parent); 1105 $this-> category = strtolower($element-> parent-> category); 1106 $this-> sourceloc = $element-> parent-> getSourceLocation($this,true); 1107 if (!empty($element-> parent-> subpackage)) $this-> page_dir .= PATH_DELIMITER . $element-> parent-> subpackage; 1108 // registering stuff on the template 1109 } 1110 1111 function getPageName(& $element) 1112 { 1113 return str_replace(array('/','_','.'),array('-','-','---'),$element> getSourceLocation($this,true)); 1114 } 1115 1116 /** 1117 * returns an array containing the class inheritance tree from the root object to the class 1118 * 1119 * @param parserClass class variable 1120 * @return array Format: array(root,child,child,child,...,$class) 1121 * @uses parserClass::getParentClassTree() 1122 */ 1123 1124 function generateFormattedClassTree($class) 1125 { 1126 $tree = $class-> getParentClassTree($this); 1127 $out = ''; 1128 if (count($tree) - 1)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1155 of 1382

1129 { 1130 $result = array($class-> getName()); 1131 $parent = $tree[$class-> getName()]; 1132 while ($parent) 1133 { 1134 if (is_string($parent)) { 1135 $result[] = $parent; 1136 break; 1137 } 1138 $subpackage = $parent-> docblock-> subpackage; 1139 $package = $parent-> docblock-> package; 1140 $x = $parent; 1141 if (is_object($parent)) 1142 $x = $parent-> getLink($this); 1143 if (!$x) $x = $parent-> getName(); 1144 $result[] = 1145 $x; 1146 if (is_object($parent)) 1147 $parent = $tree[$parent-> getName()]; 1148 elseif (isset($tree[$parent])) 1149 $parent = $tree[$parent]; 1150 } 1151 return array_reverse($result); 1152 } else 1153 { 1154 return array($class-> getName()); 1155 } 1156 } 1157 1158 /** 1159 * returns a list of child classes 1160 * 1161 * @param parserClass class variable 1162 * @uses parserClass::getChildClassList() 1163 */ 1164 1165 function generateChildClassList($class) 1166 { 1167 $kids = $class-> getChildClassList($this); 1168 $list = array(); 1169 if (count($kids)) 1170 { 1171 for($i=0; $i< count($kids); $i++) 1172 { 1173 $lt['link'] = '<link linkend="' .$this-> getId($kids[$i]) . 'summary">' . $kids[$i]-> getName().'</link>' ; 1174 $lt['sdesc'] = $kids[$i]-> docblock-> getSDesc($this); 1175 $list[] = $lt; 1176 } 1177 } else return false; 1178 return $list; 1179 } 1180 1181 /** @access private */ 1182 function sortVar($a, $b) 1183 { 1184 return strnatcasecmp($a-> getName(),$b-> getName()); 1185 } 1186 1187 /** @access private */ 1188 function sortMethod($a, $b) 1189 { 1190 if ($a-> isConstructor) return -1; 1191 if ($b-> isConstructor) return 1; 1192 return strnatcasecmp($a-> getName(),$b-> getName()); 1193 } 1194 1195 /** 1196 * returns a template-enabled array of class trees 1197 * 1198 * @param string $package package to generate a class tree for 1199 * @see $roots, HTMLConverter::getRootTree() 1200 */ 1201 function generateFormattedClassTrees($package) 1202 { 1203 if (!isset($this-> roots['normal'][$package]) && 1204 !isset($this-> roots['special'][$package])) { 1205 return array(); 1206 } 1207 $trees = array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1156 of 1382

1208 if (isset($this-> roots['normal'][$package])) { 1209 $roots = $this-> roots['normal'][$package]; 1210 for($i=0;$i< count($roots);$i++) 1211 { 1212 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1213 if ($root && $root-> isInterface()) { 1214 continue; 1215 } 1216 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1217 } 1218 } 1219 if (isset($this-> roots['special'][$package])) { 1220 $roots = $this-> roots['special'][$package]; 1221 foreach ($roots as $parent => $classes) { 1222 $thistree = ''; 1223 foreach ($classes as $classinfo) { 1224 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1225 if ($root && $root-> isInterface()) { 1226 continue; 1227 } 1228 $thistree .= 1229 $this-> getRootTree( 1230 $this-> getSortedClassTreeFromClass( 1231 $classinfo, 1232 $package, 1233 ''), 1234 $package, 1235 true); 1236 } 1237 if (!$thistree) { 1238 continue; 1239 } 1240 $trees[] = array( 1241 'class' => $parent, 1242 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1243 ); 1244 } 1245 } 1246 return $trees; 1247 } 1248 1249 /** 1250 * returns a template-enabled array of interface inheritance trees 1251 * 1252 * @param string $package package to generate a class tree for 1253 * @see $roots, HTMLConverter::getRootTree() 1254 */ 1255 function generateFormattedInterfaceTrees($package) 1256 { 1257 if (!isset($this-> roots['normal'][$package]) && 1258 !isset($this-> roots['special'][$package])) { 1259 return array(); 1260 } 1261 $trees = array(); 1262 if (isset($this-> roots['normal'][$package])) { 1263 $roots = $this-> roots['normal'][$package]; 1264 for($i=0;$i< count($roots);$i++) 1265 { 1266 $root = $this-> classes-> getClassByPackage($roots[$i], $package); 1267 if ($root && ! $root-> isInterface()) { 1268 continue; 1269 } 1270 $trees[] = array('class' => $roots[$i],'class_tree' => "<ul>\n" .$this-> getRootTree($this> getSortedClassTreeFromClass($roots[$i],$package,''),$package)."</ul>\n" ); 1271 } 1272 } 1273 if (isset($this-> roots['special'][$package])) { 1274 $roots = $this-> roots['special'][$package]; 1275 foreach ($roots as $parent => $classes) { 1276 $thistree = ''; 1277 foreach ($classes as $classinfo) { 1278 $root = $this-> classes-> getClassByPackage($classinfo, $package); 1279 if ($root && ! $root-> isInterface()) { 1280 continue; 1281 } 1282 $thistree .=

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1157 of 1382

1283 $this-> getRootTree( 1284 $this-> getSortedClassTreeFromClass( 1285 $classinfo, 1286 $package, 1287 ''), 1288 $package, 1289 true); 1290 } 1291 if (!$thistree) { 1292 continue; 1293 } 1294 $trees[] = array( 1295 'class' => $parent, 1296 'class_tree' => "<ul>\n" . $thistree . "</ul>\n" 1297 ); 1298 } 1299 } 1300 return $trees; 1301 } 1302 1303 /** 1304 * return formatted class tree for the Class Trees page 1305 * 1306 * @param array $tree output from {@link getSortedClassTreeFromClass()} 1307 * @param string $package package 1308 * @param boolean $nounknownparent if true, an object's parent will not be checked 1309 * @see Classes::$definitechild, generateFormattedClassTrees() 1310 * @return string 1311 */ 1312 function getRootTree($tree, $package, $noparent = false) 1313 { 1314 if (!$tree) return ''; 1315 $my_tree = ''; 1316 $cur = '#root'; 1317 $lastcur = array(false); 1318 $kids = array(); 1319 $dopar = false; 1320 if (!$noparent && $tree[$cur]['parent']) 1321 { 1322 $dopar = true; 1323 if (!is_object($tree[$cur]['parent'])) 1324 { 1325 // debug("parent ".$tree[$cur]['parent']." not found"); 1326 $my_tree .= '<listitem>' . $tree[$cur]['parent'] .'<itemizedlist>' 1327 } 1328 else 1329 { 1330 // debug("parent ".$this->returnSee($tree[$cur]['parent'], false, false)." in other package"); 1331 $my_tree .= '<listitem>' . $this-> returnSee($tree[$cur]['parent'], false, false); 1332 if ($tree[$cur]['parent']-> package != $package) $my_tree .= ' <emphasis>(Different package)</emphasis><itemizedlist>' ; 1333 } 1334 } 1335 do 1336 { 1337 // fancy_debug($cur,$lastcur,$kids); 1338 if (count($tree[$cur]['children'])) 1339 { 1340 // debug("$cur has children"); 1341 if (!isset($kids[$cur])) 1342 { 1343 // debug("set $cur kids"); 1344 $kids[$cur] = 1; 1345 $my_tree .= '<listitem>' .$this-> returnSee($tree[$cur]['link'], false, false); 1346 $my_tree .= '<itemizedlist>' ."\n" ; 1347 } 1348 array_push($lastcur,$cur); 1349 list(,$cur) = each($tree[$cur]['children']); 1350 // var_dump('listed',$cur); 1351 if ($cur) 1352 { 1353 $cur = $cur['package'] . '#' . $cur['class']; 1354 // debug("set cur to child $cur"); 1355 // $my_tree .= '<li>'.$this->returnSee($tree[$cur]['link'], false, false); 1356 continue;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1158 of 1382

1357 } else 1358 { 1359 // debug("end of children for $cur"); 1360 $cur = array_pop($lastcur); 1361 $cur = array_pop($lastcur); 1362 $my_tree .= '</itemizedlist></listitem>' ."\n" ; 1363 if ($dopar && ( $cur == '#root' || !$cur)) $my_tree .= '</itemizedlist></listitem>' ; 1364 } 1365 } else 1366 { 1367 // debug("$cur has no children"); 1368 $my_tree .= '<listitem>' .$this-> returnSee($tree[$cur]['link'], false, false)."</listitem>" ; 1369 if ($dopar && $cur == '#root') $my_tree .= '</itemizedlist></listitem>' ; 1370 $cur = array_pop($lastcur); 1371 } 1372 } while ($cur); 1373 return $my_tree; 1374 } 1375 /** 1376 * does nothing 1377 */ 1378 function generateElementIndex() 1379 { 1380 } 1381 1382 function setTemplateDir($dir) 1383 { 1384 Converter::setTemplateDir($dir); 1385 $this-> smarty_dir = $this-> templateDir; 1386 } 1387 1388 /** 1389 * Generate alphabetical index of all elements by package and subpackage 1390 * 1391 * @param string $package name of a package 1392 * @see $pkg_elements, walk(), generatePkgElementIndexes() 1393 */ 1394 function generatePkgElementIndex($package) 1395 { 1396 } 1397 1398 /** 1399 * 1400 * @see generatePkgElementIndex() 1401 */ 1402 function generatePkgElementIndexes() 1403 { 1404 } 1405 1406 /** 1407 * @param string name of class 1408 * @param string package name 1409 * @param string full path to look in (used in index generation) 1410 * @param boolean deprecated 1411 * @param boolean return just the URL, or enclose it in an html a tag 1412 * @return mixed false if not found, or an html a link to the class's documentation 1413 * @see parent::getClassLink() 1414 */ 1415 function getClassLink($expr,$package, $file = false,$text = false, $local = true, $with_a = true) 1416 { 1417 $a = Converter::getClassLink($expr,$package,$file); 1418 if (!$a) return false; 1419 return $this-> returnSee($a, $text, $local, $with_a); 1420 } 1421 1422 /** 1423 * @param string name of function 1424 * @param string package name 1425 * @param string full path to look in (used in index generation) 1426 * @param boolean deprecated 1427 * @param boolean return just the URL, or enclose it in an html a tag 1428 * @return mixed false if not found, or an html a link to the function's documentation 1429 * @see parent::getFunctionLink() 1430 */ 1431 function getFunctionLink($expr,$package, $file = false,$text = false, $local = true) 1432 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1159 of 1382

1433 $a = Converter::getFunctionLink($expr,$package,$file); 1434 if (!$a) return false; 1435 return $this-> returnSee($a, $text, $local); 1436 } 1437 1438 /** 1439 * @param string name of define 1440 * @param string package name 1441 * @param string full path to look in (used in index generation) 1442 * @param boolean deprecated 1443 * @param boolean return just the URL, or enclose it in an html a tag 1444 * @return mixed false if not found, or an html a link to the define's documentation 1445 * @see parent::getDefineLink() 1446 */ 1447 function getDefineLink($expr,$package, $file = false,$text = false, $local = true) 1448 { 1449 $a = Converter::getDefineLink($expr,$package,$file); 1450 if (!$a) return false; 1451 return $this-> returnSee($a, $text, $local); 1452 } 1453 1454 /** 1455 * @param string name of global variable 1456 * @param string package name 1457 * @param string full path to look in (used in index generation) 1458 * @param boolean deprecated 1459 * @param boolean return just the URL, or enclose it in an html a tag 1460 * @return mixed false if not found, or an html a link to the global variable's documentation 1461 * @see parent::getGlobalLink() 1462 */ 1463 function getGlobalLink($expr,$package, $file = false,$text = false, $local = true) 1464 { 1465 $a = Converter::getGlobalLink($expr,$package,$file); 1466 if (!$a) return false; 1467 return $this-> returnSee($a, $text, $local); 1468 } 1469 1470 /** 1471 * @param string name of procedural page 1472 * @param string package name 1473 * @param string full path to look in (used in index generation) 1474 * @param boolean deprecated 1475 * @param boolean return just the URL, or enclose it in an html a tag 1476 * @return mixed false if not found, or an html a link to the procedural page's documentation 1477 * @see parent::getPageLink() 1478 */ 1479 function getPageLink($expr,$package, $path = false,$text = false, $local = true) 1480 { 1481 $a = Converter::getPageLink($expr,$package,$path); 1482 if (!$a) return false; 1483 return $this-> returnSee($a, $text, $local); 1484 } 1485 1486 /** 1487 * @param string name of method 1488 * @param string class containing method 1489 * @param string package name 1490 * @param string full path to look in (used in index generation) 1491 * @param boolean deprecated 1492 * @param boolean return just the URL, or enclose it in an html a tag 1493 * @return mixed false if not found, or an html a link to the method's documentation 1494 * @see parent::getMethodLink() 1495 */ 1496 function getMethodLink($expr,$class,$package, $file = false,$text = false, $local = true) 1497 { 1498 $a = Converter::getMethodLink($expr,$class,$package,$file); 1499 if (!$a) return false; 1500 return $this-> returnSee($a, $text, $local); 1501 } 1502 1503 /** 1504 * @param string name of var 1505 * @param string class containing var 1506 * @param string package name 1507 * @param string full path to look in (used in index generation) 1508 * @param boolean deprecated 1509 * @param boolean return just the URL, or enclose it in an html a tag 1510 * @return mixed false if not found, or an html a link to the var's documentation

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1160 of 1382

1511 * @see parent::getVarLink() 1512 */ 1513 function getVarLink($expr,$class,$package, $file = false,$text = false, $local = true) 1514 { 1515 $a = Converter::getVarLink($expr,$class,$package,$file); 1516 if (!$a) return false; 1517 return $this-> returnSee($a, $text, $local); 1518 } 1519 1520 /** 1521 * does a nat case sort on the specified second level value of the array 1522 * 1523 * @param mixed $a 1524 * @param mixed $b 1525 * @return int 1526 */ 1527 function rcNatCmp ($a, $b) 1528 { 1529 $aa = strtoupper($a[$this-> rcnatcmpkey]); 1530 $bb = strtoupper($b[$this-> rcnatcmpkey]); 1531 1532 return strnatcasecmp($aa, $bb); 1533 } 1534 1535 /** 1536 * does a nat case sort on the specified second level value of the array. 1537 * this one puts constructors first 1538 * 1539 * @param mixed $a 1540 * @param mixed $b 1541 * @return int 1542 */ 1543 function rcNatCmp1 ($a, $b) 1544 { 1545 $aa = strtoupper($a[$this-> rcnatcmpkey]); 1546 $bb = strtoupper($b[$this-> rcnatcmpkey]); 1547 1548 if (strpos($aa,'CONSTRUCTOR') === 0) 1549 { 1550 return -1; 1551 } 1552 if (strpos($bb,'CONSTRUCTOR') === 0) 1553 { 1554 return 1; 1555 } 1556 if (strpos($aa,strtoupper($this-> class)) === 0) 1557 { 1558 return -1; 1559 } 1560 if (strpos($bb,strtoupper($this-> class)) === 0) 1561 { 1562 return -1; 1563 } 1564 return strnatcasecmp($aa, $bb); 1565 } 1566 1567 function wordwrap($string) 1568 { 1569 return wordwrap($string); 1570 } 1571 1572 /** 1573 * Generate the constants.xml, packagename.xml, and globals.xml files 1574 */ 1575 function Output() 1576 { 1577 $this-> flushPackageXml(false); 1578 $templ = & $this-> newSmarty(); 1579 $categories = array(); 1580 $packages = array_flip($this-> all_packages); 1581 foreach($this-> packagecategories as $package => $category) 1582 { 1583 $categories[$category]['package.'.$category.'.'.str_replace('_','',strtolower($package ))] = 1; 1584 if (isset($packages[$package])) unset($packages[$package]); 1585 } 1586 $category = $GLOBALS['phpDocumentor_DefaultCategoryName']; 1587 foreach($packages as $package) 1588 { 1589 $categories[$category]['package.'.$category.'.'.str_replace('_','-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1161 of 1382

',strtolower($package ))] = 1; 1590 } 1591 foreach($categories as $category => $ids) 1592 { 1593 $templ-> assign('id','package.'.$category); 1594 $templ-> assign('ids',array()); 1595 $templ-> assign('category',$category); 1596 $this-> setTargetDir($this-> base_dir); 1597 if (file_exists($this-> base_dir . PATH_DELIMITER . strtolower($category ) . '.xml')) 1598 { 1599 $contents = @file($this-> base_dir . PATH_DELIMITER . strtolower($category ) . '.xml'); 1600 if (is_array($contents)) 1601 { 1602 $found = false; 1603 foreach($contents as $i => $line) 1604 { 1605 $line = trim($line); 1606 if (strlen($line) && $line{0} == '&' ) 1607 { 1608 $found = $i; 1609 if (in_array(str_replace(array ('&' , ';'), array ('', ''), trim($line )), array_keys($ids ))) 1610 { 1611 unset($ids[str_replace(array('&' , ';'), array('', ''), trim($line))]); 1612 } 1613 } 1614 if ($found !== false && (! strlen($line) || $line{0} != '&' )) 1615 { 1616 break; 1617 } 1618 } 1619 $newids = array(); 1620 foreach($ids as $id => $unll) 1621 { 1622 $newids[] = ' &' . $id . ";\n" ; 1623 } 1624 $newcontents = array_merge(array_slice($contents, 0, $i), $newids); 1625 $newcontents = array_merge($newcontents, array_slice($contents, $i)); 1626 } 1627 $categorycontents = implode($newcontents, ''); 1628 } else 1629 { 1630 foreach($ids as $id => $unll) 1631 { 1632 if (!in_array($id, $templ-> _tpl_vars['ids'])) 1633 { 1634 $templ-> append('ids',$id); 1635 } 1636 } 1637 $categorycontents = '<!-- $' . "Revision$ -->\n" . $templ> fetch('category.tpl'); 1638 } 1639 $this-> writefile(strtolower($category) . '.xml', 1640 $categorycontents); 1641 phpDocumentor_out("\n" ); 1642 flush(); 1643 } 1644 $my = & $this-> newSmarty(); 1645 if ($this-> _peardoc2_constants) 1646 { 1647 foreach($this-> _peardoc2_constants as $category => $r) 1648 { 1649 foreach($r as $package => $s) 1650 { 1651 $my-> assign('id','package.'.strtolower($category.'.'.str_replace('_','',strtolower($package ))).'.constants'); 1652 $my-> assign('package',$package); 1653 $defines = array(); 1654 foreach($s as $file => $t) 1655 { 1656 $arr = array(); 1657 $arr['name'] = $file; 1658 $arr['page'] = strtolower($t['page']); 1659 $arr['defines'] = $t['defines']; 1660 $defines[] = $arr; 1661 } 1662 $my-> assign('defines',$defines);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1162 of 1382

1663 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $category 1664 . PATH_DELIMITER . strtolower(str_replace('_','-',strtolower($package )))); 1665 $this-> writefile('constants.xml', 1666 '<!-- $' . "Revision$ -->\n" . $my> fetch('constants.tpl')); 1667 $my-> clear_all_assign(); 1668 } 1669 } 1670 $this-> _peardoc2_constants = false; 1671 } 1672 if ($this-> _peardoc2_globals) 1673 { 1674 foreach($this-> _peardoc2_globals as $category => $r) 1675 { 1676 foreach($r as $package => $s) 1677 { 1678 $my-> assign('id','package.'.strtolower($category.'.'.str_replace('_','',strtolower($package ))).'.globals'); 1679 $my-> assign('package',$package); 1680 $defines = array(); 1681 foreach($s as $file => $t) 1682 { 1683 $arr = array(); 1684 $arr['name'] = $file; 1685 $arr['page'] = strtolower($t['page']); 1686 $arr['globals'] = $t['globals']; 1687 $defines[] = $arr; 1688 } 1689 $my-> assign('globals',$defines); 1690 $this-> setTargetDir($this-> base_dir . PATH_DELIMITER . $category 1691 . PATH_DELIMITER . strtolower(str_replace('_','-',strtolower($package )))); 1692 $this-> writefile('globals.xml', 1693 '<!-- $' . "Revision$ -->\n" . $my> fetch('globals.tpl')); 1694 $my-> clear_all_assign(); 1695 } 1696 } 1697 $this-> _peardoc2_globals = false; 1698 } 1699 } 1700 } 1701 ?>

Package phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1163 of 1382

File Source for file_dialog.php


Documentation for this file is available at file_dialog.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <?php 3 /** 4 * phpDocumentor :: docBuilder Web Interface 5 * 6 * Advanced Web Interface to phpDocumentor 7 * 8 * PHP versions 4 and 5 9 * 10 * Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver 11 * 12 * LICENSE: 13 * 14 * This library is free software; you can redistribute it 15 * and/or modify it under the terms of the GNU Lesser General 16 * Public License as published by the Free Software Foundation; 17 * either version 2.1 of the License, or (at your option) any 18 * later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free Software 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 * 29 * @package phpDocumentor 30 * @author Andrew Eddie 31 * @author Greg Beaver <[email protected]> 32 * @copyright 2003-2006 Andrew Eddie, Greg Beaver 33 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 34 * @version CVS: $Id: file_dialog.php 231860 2007-03-14 12:48:37Z ashnazg $ 35 * @filesource 36 * @see phpdoc.php 37 */ 38 if (!function_exists( 'version_compare' )) { 39 print "phpDocumentor requires PHP version 4.1.0 or greater to function" 40 exit; 41 } 42 43 if ('@WEB-DIR@' != '@'.'WEB-DIR@') 44 { 45 /** 46 * common file information 47 */ 48 require_once 'PhpDocumentor/phpDocumentor/common.inc.php'; 49 require_once 'PhpDocumentor/HTML_TreeMenu-1.1.2/TreeMenu.php'; 50 require_once( '@WEB-DIR@' . PATH_DELIMITER . 'PhpDocumentor/docbuilder/includes/utilities.php' ); 51 52 define(PHPDOC_WEBROOT_DIR, 'PhpDocumentor'); 53 54 // set up include path so we can find all files, no matter what 55 $GLOBALS['_phpDocumentor_install_dir'] = PHPDOC_WEBROOT_DIR; 56 57 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 58 $ini = phpDocumentor_parse_ini_file('@DATA-DIR@' . PATH_DELIMITER . 'PhpDocumentor/phpDocumentor.ini', true); 59 if (isset($ini['_phpDocumentor_options']['userdir'])) { 60 $configdir = $ini['_phpDocumentor_options']['userdir']; 61 } else { 62 $configdir = '@DATA-DIR@' . PATH_DELIMITER . 'PhpDocumentor/user'; 63 } 64 } else {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1164 of 1382

65 66 define(PHPDOC_WEBROOT_DIR, dirname(dirname(__FILE__))); 67 /** 68 * common file information 69 */ 70 include_once(PHPDOC_WEBROOT_DIR . "/phpDocumentor/common.inc.php" ); 71 include_once(PHPDOC_WEBROOT_DIR . "/HTML_TreeMenu-1.1.2/TreeMenu.php" ); 72 include_once(PHPDOC_WEBROOT_DIR . "/docbuilder/includes/utilities.php" ); 73 74 // set up include path so we can find all files, no matter what 75 $GLOBALS['_phpDocumentor_install_dir'] = dirname(dirname( realpath( __FILE__ ) )); 76 // add my directory to the include path, and make it first, should fix any errors 77 if (substr(PHP_OS, 0, 3) == 'WIN') { 78 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path')); 79 } else { 80 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path')); 81 } 82 83 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 84 $ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true); 85 if (isset($ini['_phpDocumentor_options']['userdir'])) { 86 $configdir = $ini['_phpDocumentor_options']['userdir']; 87 } else { 88 $configdir = $_phpDocumentor_install_dir . '/user'; 89 } 90 } 91 92 // allow the user to change this at runtime 93 if (!empty( $_REQUEST['altuserdir'] )) { 94 $configdir = $_REQUEST['altuserdir']; 95 } 96 ?> 97 <html> 98 <head> 99 <title> 100 File browser 101 </title> 102 <style type="text/css"> 103 body, td, th, select, input { 104 font-family: verdana,sans-serif; 105 font-size: 9pt; 106 } 107 .text { 108 font-family: verdana,sans-serif; 109 font-size: 9pt; 110 border: solid 1px #000000; 111 } 112 .button { 113 border: solid 1px #000000; 114 } 115 .small { 116 font-size: 7pt; 117 } 118 </style> 119 120 <script src="../HTML_TreeMenu-1.1.2/TreeMenu.js" language="JavaScript" type="text/javascript"></script> 121 122 <?php 123 set_time_limit(0); // six minute timeout 124 ini_set("memory_limit" ,"256M" ); 125 126 /** 127 * Directory Node 128 * @package HTML_TreeMenu 129 */ 130 class DirNode extends HTML_TreeNode 131 { 132 /** 133 * full path to this node 134 * @var string 135 */ 136 var $path; 137 138 function DirNode($text = false, $link = false, $icon = false, $path, $events = array()) 139 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1165 of 1382

140 $this-> path = $path; 141 $options = array(); 142 if ($text) $options['text'] = $text; 143 if ($link) $options['link'] = $link; 144 if ($icon) $options['icon'] = $icon; 145 HTML_TreeNode::HTML_TreeNode($options,$events); 146 } 147 } 148 149 150 $menu = new HTML_TreeMenu(); 151 $filename = ''; 152 if (isset($_GET) && isset( $_GET['fileName'])) { 153 $filename = $_GET['fileName']; 154 } 155 $filename = realpath($filename); 156 $pd = (substr(PHP_OS, 0, 3) == 'WIN') ? '\\' : '/'; 157 $test = ($pd == '/') ? '/' : 'C:\\'; 158 if (empty($filename) || ($filename == $test)) { 159 $filename = ($pd == '/') ? '/' : 'C:\\'; 160 $node = false; 161 getDir($filename,$node); 162 } else { 163 flush(); 164 // if ($pd != '/') $pd = $pd.$pd; 165 $anode = false; 166 switchDirTree($filename,$anode); 167 // recurseDir($filename,$anode); 168 $node = new HTML_TreeNode(array('text' => "Click to view " .addslashes($filename),'link' => "" ,'icon' => 'branchtop.gif')); 169 $node-> addItem($anode); 170 }; 171 $menu-> addItem($node); 172 if ('@WEB-DIR@' != '@'.'WEB-DIR@') 173 { 174 $DHTMLmenu = & new HTML_TreeMenu_DHTML($menu, 175 array('images' => '../HTML_TreeMenu-1.1.2/images')); 176 } else { 177 $DHTMLmenu = & new HTML_TreeMenu_DHTML($menu, 178 array('images' => str_replace('/docbuilder/file_dialog.php','',$_SERVER['PHP_SELF']) . 179 '/HTML_TreeMenu-1.1.2/images')); 180 } 181 ?> 182 <script type="text/javascript" language="Javascript"> 183 /** 184 Creates some global variables 185 */ 186 function initializate() { 187 // 188 //The "platform independent" newLine 189 // 190 //Taken from http://developer.netscape.com/docs/manuals/communicator/jsref/brow1.htm#1010426 191 if (navigator.appVersion.lastIndexOf( 'Win' ) != -1) { 192 $pathdelim="\\"; 193 $newLine="\r\n"; 194 } else { 195 $newLine="\n"; 196 $pathdelim="/"; 197 } 198 /* for($a=0;$a<document.dataForm.elements.length;$a++) { 199 alert("The name is '"+document.dataForm.elements[$a].name+"' "+$a); 200 } 201 */ 202 } 203 /** Sets the contents of the help box, and submits the form 204 */ 205 function setHelp( $str ) { 206 document.helpForm.fileName.value = $str; 207 document.helpForm.submit(); 208 } 209 210 /** Sets the contents of the help box only 211 */ 212 function setHelpVal( $str ) { 213 document.helpForm.fileName.value = $str; 214 } 215 /**Takes a given string and leaves it ready to add a new string 216 That is, puts the comma and the new line if needed 217 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1166 of 1382

218 function prepareString($myString) { 219 //First verify that a comma is not at the end 220 if($myString.lastIndexOf(",") >= $myString.length-2) { 221 //We have a comma at the end 222 return $myString; 223 } 224 if($myString.length > 0) { 225 $myString+=","+$newLine; 226 } 227 return $myString; 228 } 229 230 231 function myReplace($string,$text,$by) { 232 // Replaces text with by in string 233 var $strLength = $string.length, $txtLength = $text.length; 234 if (($strLength == 0) || ($txtLength == 0)) return $string; 235 236 var $i = $string.indexOf($text); 237 if ((!$i) && ($text != $string.substring(0,$txtLength))) return $string; 238 if ($i == -1) return $string; 239 240 var $newstr = $string.substring(0,$i) + $by; 241 242 if ($i+$txtLength < $strLength) 243 $newstr += myReplace($string.substring($i+$txtLength,$strLength),$text,$by); 244 245 return $newstr; 246 } 247 </script> 248 249 </head> 250 251 <body bgcolor="#ffffff" onload="javascript:initializate()"> 252 <strong>Directory Browser</strong> 253 254 <table cellpadding="1" cellspacing="1" border="0" width="100%"> 255 256 <form name="helpForm" action="<?php print $_SERVER['PHP_SELF']; ?>" method="get" enctype="multipart/form-data"> 257 <tr> 258 <td colspan="2" width="100%"> 259 Use this to find directories and files which can be used below: 260 </td> 261 </tr> 262 <tr> 263 <td align="right"> 264 <a href="javascript:document.helpForm.submit();" title="browse tree"> 265 <?php 266 echo showImage( 'images/rc-gui-install-24.png', '24', '24' ); 267 ?> 268 </a> 269 </td> 270 <td> 271 <input size="60" type="text" name="fileName" value="<?php print $filename;?>" class="text" /> 272 </td> 273 </tr> 274 <tr> 275 <td> 276 <input type="submit" name="helpdata" value="close" class="button" onclick="window.close();" /> 277 </td> 278 <td align="right"> 279 <input type="submit" name="helpdata" value="accept" class="button" onclick="opener.setFile(document.helpForm.fileName.value);window.close();" /> 280 </td> 281 </tr> 282 <tr> 283 <td colspan="2"> 284 <div id='menuLayer'></div> 285 <?php $DHTMLmenu-> printMenu(); ?> 286 </td> 287 </tr> 288 </form> 289 290 </table>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1167 of 1382

291 292 293

</body> </html>

Package phpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1168 of 1382

File Source for builder.php


Documentation for this file is available at builder.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <?php 3 /** 4 * phpDocumentor :: docBuilder Web Interface 5 * 6 * Advanced Web Interface to phpDocumentor 7 * 8 * PHP versions 4 and 5 9 * 10 * Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver 11 * 12 * LICENSE: 13 * 14 * This library is free software; you can redistribute it 15 * and/or modify it under the terms of the GNU Lesser General 16 * Public License as published by the Free Software Foundation; 17 * either version 2.1 of the License, or (at your option) any 18 * later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free Software 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 * 29 * @package phpDocumentor 30 * @author Andrew Eddie 31 * @author Greg Beaver <[email protected]> 32 * @copyright 2003-2006 Andrew Eddie, Greg Beaver 33 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 34 * @version CVS: $Id: builder.php 212211 2006-04-30 22:18:14Z cellog $ 35 * @filesource 36 * @see phpdoc.php 37 */ 38 39 if (!function_exists('version_compare')) 40 { 41 print "phpDocumentor requires PHP version 4.1.0 or greater to function" ; 42 exit; 43 } 44 45 46 if ('@DATA-DIR@' != '@'.'DATA-DIR@') { 47 // set up include path so we can find all files, no matter what 48 $root_dir = 'PhpDocumentor'; 49 /** 50 * common file information 51 */ 52 include_once(" $root_dir/phpDocumentor/common.inc.php" ); 53 $GLOBALS['_phpDocumentor_install_dir'] = 'PhpDocumentor'; 54 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 55 $ini = phpDocumentor_parse_ini_file('@DATA-DIR@/PhpDocumentor/phpDocumentor.ini', true); 56 if (isset($ini['_phpDocumentor_options']['userdir'])) 57 { 58 $configdir = $ini['_phpDocumentor_options']['userdir']; 59 } else { 60 $configdir = '@DATA-DIR@/user'; 61 } 62 } else { 63 // set up include path so we can find all files, no matter what 64 $GLOBALS['_phpDocumentor_install_dir'] = dirname(dirname(realpath(__FILE__))); 65 $root_dir = dirname(dirname(__FILE__)); 66 /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1169 of 1382

67 * common file information 68 */ 69 include_once(" $root_dir/phpDocumentor/common.inc.php" ); 70 // add my directory to the include path, and make it first, should fix any errors 71 if (substr(PHP_OS, 0, 3) == 'WIN') 72 { 73 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path')); 74 } else { 75 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path')); 76 } 77 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 78 $ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true); 79 if (isset($ini['_phpDocumentor_options']['userdir'])) 80 { 81 $configdir = $ini['_phpDocumentor_options']['userdir']; 82 } else { 83 $configdir = $_phpDocumentor_install_dir . '/user'; 84 } 85 } 86 87 88 89 // allow the user to change this at runtime 90 if (!empty($_REQUEST['altuserdir'])) $configdir = $_REQUEST['altuserdir']; 91 ?> 92 <html> 93 <head> 94 <title> 95 output: docbuilder - phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> doc generation information 96 </title> 97 <style type="text/css"> 98 body, td, th { 99 font-family: verdana,sans-serif; 100 font-size: 8pt; 101 } 102 </style> 103 104 </head> 105 <body bgcolor="#e0e0e0" text="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> 106 107 <?php 108 // Find out if we are submitting and if we are, send it 109 // This code originally by Joshua Eichorn on phpdoc.php 110 // 111 if (isset($_GET['dataform']) && empty( $_REQUEST['altuserdir'])) { 112 foreach ($_GET as $k=> $v) { 113 if (strpos( $k, 'setting_' ) === 0) { 114 $_GET['setting'][substr( $k, 8 )] = $v; 115 } 116 } 117 118 echo "<strong>Parsing Files ...</strong>" ; 119 flush(); 120 echo "<pre>\n" ; 121 /** phpdoc.inc */ 122 include(" $root_dir/phpDocumentor/phpdoc.inc" ); 123 echo "</pre>\n" ; 124 echo "<h1>Operation Completed!!</h1>" ; 125 } else { 126 echo "whoops!" ; 127 } 128 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1170 of 1382

File Source for config.php


Documentation for this file is available at config.php
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <?php 3 /** 4 * phpDocumentor :: docBuilder Web Interface 5 * 6 * Advanced Web Interface to phpDocumentor 7 * 8 * PHP versions 4 and 5 9 * 10 * Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver 11 * 12 * LICENSE: 13 * 14 * This library is free software; you can redistribute it 15 * and/or modify it under the terms of the GNU Lesser General 16 * Public License as published by the Free Software Foundation; 17 * either version 2.1 of the License, or (at your option) any 18 * later version. 19 * 20 * This library is distributed in the hope that it will be useful, 21 * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 * Lesser General Public License for more details. 24 * 25 * You should have received a copy of the GNU Lesser General Public 26 * License along with this library; if not, write to the Free Software 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 * 29 * @package phpDocumentor 30 * @author Andrew Eddie 31 * @author Greg Beaver <[email protected]> 32 * @copyright 2003-2006 Andrew Eddie, Greg Beaver 33 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 34 * @version CVS: $Id: config.php 234145 2007-04-19 20:20:57Z ashnazg $ 35 * @filesource 36 * @see phpdoc.php 37 */ 38 39 if (!function_exists( 'version_compare' )) { 40 print "phpDocumentor requires PHP version 4.1.0 or greater to function" ; 41 exit; 42 } 43 44 if ('@DATA-DIR@' != '@'.'DATA-DIR@') 45 { 46 $root_dir = 'PhpDocumentor'; 47 $path = '@WEB-DIR@/PhpDocumentor/docbuilder/images/'; 48 49 /** 50 * common file information 51 */ 52 include_once("PhpDocumentor/phpDocumentor/common.inc.php" ); 53 include_once("@WEB-DIR@/PhpDocumentor/docbuilder/includes/utilities.php" ); 54 55 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 56 $ini = phpDocumentor_parse_ini_file('@DATA-DIR@/PhpDocumentor/phpDocumentor.ini', true); 57 if (isset($ini['_phpDocumentor_options']['userdir'])) { 58 $configdir = $ini['_phpDocumentor_options']['userdir']; 59 } else { 60 $configdir = '@DATA-DIR@/PhpDocumentor/user'; 61 } 62 } else { 63 $root_dir = dirname(dirname(__FILE__)); 64 $path = 'images/'; 65 66 // set up include path so we can find all files, no matter what

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1171 of 1382

67 $GLOBALS['_phpDocumentor_install_dir'] = dirname(dirname( realpath( __FILE__ ) )); 68 // add my directory to the include path, and make it first, should fix any errors 69 if (substr(PHP_OS, 0, 3) == 'WIN') { 70 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path')); 71 } else { 72 ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path')); 73 } 74 75 /** 76 * common file information 77 */ 78 include_once(" $root_dir/phpDocumentor/common.inc.php" ); 79 include_once(" $root_dir/docbuilder/includes/utilities.php" ); 80 81 // find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir] 82 $ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true); 83 if (isset($ini['_phpDocumentor_options']['userdir'])) { 84 $configdir = $ini['_phpDocumentor_options']['userdir']; 85 } else { 86 $configdir = $_phpDocumentor_install_dir . '/user'; 87 } 88 } 89 90 // allow the user to change this at runtime 91 if (!empty( $_REQUEST['altuserdir'] )) { 92 $configdir = $_REQUEST['altuserdir']; 93 } 94 95 // assign the available converters 96 $converters = array( 97 "HTML:frames:default" => 'HTML:frames:default', 98 "HTML:frames:earthli" => 'HTML:frames:earthli', 99 "HTML:frames:l0l33t" => 'HTML:frames:l0l33t', 100 "HTML:frames:phpdoc.de" => 'HTML:frames:phpdoc.de', 101 "HTML:frames:phphtmllib" => 'HTML:frames:phphtmllib', 102 "HTML:frames:phpedit" => 'HTML:frames:phpedit', 103 "HTML:frames:DOM/default" => 'HTML:frames:DOM/default', 104 "HTML:frames:DOM/earthli" => 'HTML:frames:DOM/earthli', 105 "HTML:frames:DOM/l0l33t" => 'HTML:frames:DOM/l0l33t', 106 "HTML:frames:DOM/phpdoc.de" => 'HTML:frames:DOM/phpdoc.de', 107 "HTML:frames:DOM/phphtmllib" => 'HTML:frames:DOM/phphtmllib', 108 "HTML:Smarty:default" => 'HTML:Smarty:default', 109 "HTML:Smarty:HandS" => 'HTML:Smarty:HandS', 110 "HTML:Smarty:PHP" => 'HTML:Smarty:PHP', 111 "PDF:default:default" => 'PDF:default:default', 112 "CHM:default:default" => 'CHM:default:default', 113 "XML:DocBook/peardoc2:default" => 'XML:DocBook/peardoc2:default' 114 ); 115 116 // compile a list of available screen shots 117 $convScreenShots = array(); 118 119 if ($dir = opendir($path)) { 120 while (($file = readdir( $dir )) !== false) { 121 if ($file != '.' && $file != '..') { 122 if (!is_dir( $path . $file )) { 123 if (strpos( $file, 'ss_' ) === 0) { 124 $key = substr( $file, 3 ); 125 $key = str_replace( '_', ':', $key ); 126 $key = str_replace( '-', '/', $key ); 127 $key = str_replace( '.png', '', $key ); 128 $convScreenShots[$key] = $file; 129 } 130 } 131 } 132 } 133 } 134 135 ?> 136 <html> 137 <head> 138 <title> 139 Form to submit to phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> 140 </title> 141 <style type="text/css"> 142 body, td, th {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1172 of 1382

143 font-family: verdana,sans-serif; 144 font-size: 9pt; 145 } 146 .text { 147 font-family: verdana,sans-serif; 148 font-size: 9pt; 149 border: solid 1px #000000; 150 } 151 .small { 152 font-size: 7pt; 153 } 154 </style> 155 156 <script src="includes/tabpane.js" language="JavaScript" type="text/javascript"></script> 157 <link id="webfx-tab-style-sheet" type="text/css" rel="stylesheet" href="includes/tab.webfx.css" /> 158 159 <script type="text/javascript" language="Javascript"> 160 /** 161 Creates some global variables 162 */ 163 function initializate() { 164 // 165 //The "platform independent" newLine 166 // 167 //Taken from http://developer.netscape.com/docs/manuals/communicator/jsref/brow1.htm#1010426 168 if (navigator.appVersion.lastIndexOf('Win') != -1) { 169 $pathdelim="\\"; 170 $newLine="\r\n"; 171 } else { 172 $newLine="\n"; 173 $pathdelim="/"; 174 } 175 } 176 177 /**Adds the contents of the help box as a directory 178 */ 179 function addDirectory($object) { 180 //$a = document.helpForm.fileName.value; 181 $a = parent.ActionFrame.document.actionFrm.fileName.value; 182 $a = myReplace( $a, '\\\\', '\\' ); 183 if ($a[$a.length - 1] == $pathdelim) { 184 $a = $a.substring(0, $a.length - 1); 185 } 186 if ($a.lastIndexOf('.') > 0) { 187 $a = $a.substring(0,$a.lastIndexOf($pathdelim)); 188 } 189 $object.value = prepareString($object.value)+$a; 190 } 191 /**Adds the contents of the converter box to the converters list 192 */ 193 function addConverter($object) { 194 $object.value = prepareString($object.value)+document.dataForm.ConverterSetting.value; 195 } 196 /**Replaces the converters list with the contents of the converter box 197 */ 198 function replaceConverter($object) { 199 $object.value = document.dataForm.ConverterSetting.value; 200 } 201 /**Adds the contents of the help box as a file to the given control 202 */ 203 function addFile($object) { 204 //$a = document.helpForm.fileName.value; 205 $a = parent.ActionFrame.document.actionFrm.fileName.value; 206 $a = myReplace($a,'\\\\','\\'); 207 $object.value = prepareString($object.value)+$a; 208 } 209 /**Takes a given string and leaves it ready to add a new string 210 That is, puts the comma and the new line if needed 211 */ 212 function prepareString($myString) { 213 //First verify that a comma is not at the end 214 if($myString.lastIndexOf(",") >= $myString.length-2) { 215 //We have a comma at the end 216 return $myString; 217 } 218 if($myString.length > 0) { 219 $myString+=","+$newLine; 220 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1173 of 1382

221 return $myString; 222 } 223 /**Do the validation needed before sending the from and return a truth value indicating if the form can be sent 224 */ 225 function validate() { 226 //Take out all newLines and change them by nothing 227 //This could be done by using javascript function's replacebut that was implemented only until Navigator 4.0 and so it is better to use more backward compatible functions like substr 228 document.dataForm.elements[0].value= stripNewLines(document.dataForm.elements[0].value); 229 document.dataForm.elements[1].value= stripNewLines(document.dataForm.elements[1].value); 230 document.dataForm.elements[2].value= stripNewLines(document.dataForm.elements[2].value); 231 document.dataForm.elements[3].value= stripNewLines(document.dataForm.elements[3].value); 232 document.dataForm.elements[4].value= stripNewLines(document.dataForm.elements[4].value); 233 document.dataForm.elements[5].value= stripNewLines(document.dataForm.elements[5].value); 234 document.dataForm.elements[6].value= stripNewLines(document.dataForm.elements[6].value); 235 document.dataForm.elements[7].value= stripNewLines(document.dataForm.elements[7].value); 236 //By returning true we are allowing the form to be submitted 237 return true; 238 } 239 /**Takes a string and removes all the ocurrences of new lines 240 Could have been implemented a lot easier with replace but it's not very backwards compatible 241 */ 242 function stripNewLines( $myString ) { 243 return myReplace($myString,$newLine,''); 244 } 245 246 function myReplace($string,$text,$by) { 247 // Replaces text with by in string 248 var $strLength = $string.length, $txtLength = $text.length; 249 if (($strLength == 0) || ($txtLength == 0)) { 250 return $string; 251 } 252 var $i = $string.indexOf($text); 253 if ((!$i) && ($text != $string.substring(0,$txtLength))) { 254 return $string; 255 } 256 if ($i == -1) { 257 return $string; 258 } 259 var $newstr = $string.substring(0,$i) + $by; 260 if ($i+$txtLength < $strLength) { 261 $newstr += myReplace($string.substring($i+$txtLength,$strLength),$text,$by); 262 } 263 return $newstr; 264 } 265 266 var screenShots = new Array(); 267 <?php 268 $temp = array(); 269 foreach ($converters as $k=> $v) { 270 if (array_key_exists( $k, $convScreenShots )) { 271 echo " \nscreenShots['$k'] = '{$convScreenShots[$k]}'" ; 272 } else { 273 echo " \nscreenShots['$k'] = ''" ; 274 } 275 } 276 ?> 277 278 279 /** Swaps the converted screen shot image 280 */ 281 function swapImage( key ) { 282 document.screenshot.src = 'images/' + screenShots[key]; 283 } 284 285 </script> 286 287 </head> 288 289 <body bgcolor="#ffffff" onload="javascript:initializate()" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> 290 291 <!-- onsubmit="return validate()" --> 292 293 <form name="dataForm" action="builder.php" method="get" target="OutputFrame"> 294 295 <div class="tab-pane" id="tabPane1">

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1174 of 1382

296 <script type="text/javascript"> 297 var tp1 = new WebFXTabPane( document.getElementById( "tabPane1" )); 298 </script> 299 <div class="tab-page" id="tab_intro"> 300 <h2 class="tab">Introduction</h2> 301 Welcome to <b>docBuilder</b>. 302 <p>This is the new web-interface for running, in our opinion, the best in-code documentation compiler there is: <b>phpDocumentor</b>.</p> 303 <p>What's new in this release? Heaps of things, but here are the headlines:</p> 304 <ul> 305 <li>Much greater support for PEAR on both windows and linux</li> 306 <li>CHM, PDF and XML:DocBook/peardoc2 converters are all stable!</li> 307 <li>New tokenizer-based parser is literally twice as fast as the old parser (requires PHP 4.3.0+)</li> 308 <li>New external user-level manual parsing and generation allows crosslinking between API docs and DocBook-format tutorials/manuals!</li> 309 <li>Color syntax source highlighting and cross-referencing with documentation of source code in HTML, CHM and PDF with customizable templating</li> 310 <li>New Configuration files simplify repetitive and complex documentation tasks</li> 311 <li>Brand new extensive manual - which can be generated directly from the source using makedocs.ini!</li> 312 <li>Many improvements to in-code API documentation including new tags, and better handling of in-code html tags</li> 313 <li>New XML:DocBook/peardoc converter makes generating PEAR manual formats easy for PEAR developers along with the --pear command-line switch</li> 314 <li>Many new HTML templates, all of them beautiful thanks to Marco von Ballmoos</li> 315 <li>A brand new web interface thanks to Andrew Eddie!</li> 316 </ul> 317 </div> 318 319 <div class="tab-page" id="tab_config"> 320 <h2 class="tab">Config</h2> 321 <table cellspacing="0" cellpadding="3" border="0"> 322 <tr> 323 <td colspan="2"><b>Use a pre-created config file for form values.</b></td> 324 </tr> 325 <tr> 326 <td nowrap="nowrap"> 327 <b>change config directory:</b> 328 </td> 329 <td width="100%"> 330 <input size="20" type="text" name="altuserdir" value="" /><input type="SUBMIT" value="Change" name="submitButton" onclick="document.dataForm.target='DataFrame'; document.dataForm.action = 'config.php';document.dataForm.submit();"> 331 <?php 332 if (!empty($_REQUEST['altuserdir'])) { 333 print '<br><i>changed to <b>"' .$_REQUEST['altuserdir'].'"</b></i>' ; 334 } 335 ?> 336 </td> 337 </tr> 338 <tr> 339 <td nowrap="nowrap"> 340 <b>Choose a config:</b> 341 </td> 342 <td> 343 344 <select name="setting_useconfig"> 345 <option value="" <?php if (empty($_REQUEST['altuserdir'])) print 'selected'; ?>>don't use config file</option> 346 <?php 347 $dirs = array(); 348 $dirs = phpDocumentor_ConfigFileList($configdir); 349 $path = ''; 350 $sel = ' selected'; 351 if (!empty($_REQUEST['altuserdir'])) $path = $configdir . PATH_DELIMITER; 352 else $sel = ''; 353 foreach($dirs as $configfile) 354 { 355 print '<option value="' .$path.$configfile.'"' .$sel.'>' .$configfile.".ini</option>\n" ; 356 $sel = ''; 357 } 358 ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1175 of 1382

359 </select> 360 <input type="SUBMIT" value="Go" name="submitButton"> 361 </td> 362 </tr> 363 <tr> 364 <td colspan="2"> 365 Normally, phpDocumentor uses the form values from this form to set up parsing. In version 1.2, phpDocumentor allows you to "save" form values in configuration files so that you can replicate common complicated documentation tasks with only one time. Just choose a config file below or create a new one and refresh this page to choose it. 366 </td> 367 </tr> 368 </table> 369 </div> 370 371 <div class="tab-page" id="tab_files"> 372 <h2 class="tab">Files</h2> 373 <table cellspacing="0" cellpadding="3" border="0"> 374 <tr> 375 <td align="right" valign="top" nowrap="nowrap"> 376 <b>Files<br />to parse</b> 377 <br /> 378 <a href="javascript:addFile(document.dataForm.setting_filename)" title="Add the file in the help box"> 379 <?php 380 echo showImage( 'images/rc-gui-install-24.png', '24', '24' ); 381 ?></a> 382 </td> 383 <td valign="top"> 384 <textarea rows="5" cols="60" name="setting_filename" class="text"></textarea> 385 </td> 386 <td valign="top" class="small"> 387 This is a group of comma-separated names of php files or tutorials that will be processed by phpDocumentor. 388 </td> 389 </tr> 390 <tr> 391 <td align="right" valign="top" nowrap="nowrap"> 392 <b>Directory<br />to parse</b> 393 <br /> 394 <a href="javascript:addFile(document.dataForm.setting_directory)" title="Add the file in the help box"> 395 <?php 396 echo showImage( 'images/rc-gui-install-24.png', '24', '24' ); 397 ?></a> 398 </td> 399 <td valign="top"> 400 <textarea rows="5" cols="60" name="setting_directory" class="text" title=""></textarea> 401 </td> 402 <td valign="top" class="small"> 403 This is a group of comma-separated directories where php files or tutorials are found that will be processed by phpDocumentor. phpDocumentor automatically parses subdirectories 404 </td> 405 </tr> 406 <tr> 407 <td align="right" valign="top" nowrap="nowrap"> 408 <b>Files<br />to ignore</b> 409 <br /> 410 <a href="javascript:addFile(document.dataForm.setting_ignore)" title="Add the file in the help box"> 411 <?php 412 echo showImage( 'images/rc-gui-install-24.png', '24', '24' ); 413 ?></a> 414 </td> 415 <td valign="top"> 416 <textarea rows="5" cols="60" class="text" name="setting_ignore"></textarea> 417 </td> 418 <td valign="top" class="small"> 419 A list of files (full path or filename), and patterns to ignore. Patterns may use wildcards * and ?. To ignore all subdirectories named "test" for example, using "test/" To ignore all files and directories with test in their name use "*test*" 420 </td> 421 </tr> 422 <tr> 423 <td align="right" valign="top" nowrap="nowrap"> 424 <b>Packages<br />to parse</b>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1176 of 1382

425 </td> 426 <td valign="top"> 427 <textarea rows="4" cols="60" class="text" name="setting_packageoutput"></textarea> 428 </td> 429 <td valign="top" class="small"> 430 The parameter packages is a group of comma separated names of abstract packages that will be processed by phpDocumentor. All package names must be separated by commas. 431 </td> 432 </tr> 433 </table> 434 </div> 435 436 437 <div class="tab-page" id="tab_output"> 438 <h2 class="tab">Output</h2> 439 <table cellspacing="0" cellpadding="3" border="0"> 440 <tr> 441 <td align="right" valign="top" nowrap="nowrap"> 442 <b>Target</b> 443 <br /> 444 <a href="javascript:addFile(document.dataForm.setting_target)" title="Add the file in the help box"> 445 <?php 446 echo showImage( 'images/rc-gui-install-24.png', '24', '24' ); 447 ?></a> 448 </td> 449 <td valign="top"> 450 <input type="text" name="setting_target" size="60" class="text" /> 451 </td> 452 <td valign="top" class="small"> 453 Target is the directory where the output produced by phpDocumentor will reside. 454 </td> 455 </tr> 456 <tr> 457 <td align="right" valign="top" nowrap="nowrap"> 458 <b>Output<br />Format</b> 459 </td> 460 <td valign="top"> 461 <textarea cols="60" rows="3" name="setting_output" class="text">HTML:Smarty:default</textarea> 462 <br /> 463 Output type:Converter name:template name 464 <br /> 465 <?php 466 echo htmlArraySelect( $converters, 'ConverterSetting', 'size="1" class="text" onchange="swapImage(this.options[this.options.selectedIndex].value);"' , 'HTML:Smarty:default' ); 467 ?> 468 <br /> 469 <a href="javascript:addConverter(document.dataForm.setting_output)"> 470 Add the converter in the help box 471 </a> 472 <br /> 473 <br /> 474 <img name="screenshot" src="images/ss_HTML_Smarty_default.png" width="200" height="200" border="2" alt="Screen Shot"> 475 </td> 476 <td valign="top" class="small"> 477 Outputformat may be HTML, XML, PDF, or CHM (case-sensitive) in version 1.2. 478 <br />There is only one Converter for both CHM and PDF:<br /><i>default</i>. 479 <br />There are 2 HTML Converters:<br /><i>frames</i> or <i>Smarty</i>. 480 <br /><b>frames templates</b> may be any of: 481 <br /> 482 <i>default, earthli, l0l33t, phpdoc.de, phphtmllib, phpedit, DOM/default, DOM/earthli, DOM/l0l33t, DOM/phphtmllib, or DOM/phpdoc.de</i>. 483 <br /> 484 <b>Smarty templates</b> may be any of: 485 <br /> 486 <i>default, HandS, or PHP</i> 487 <br /> 488 <strong>XML:DocBook/peardoc2:default</strong> is the only choice for XML in 1.2.2 489 </td>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1177 of 1382

490 </tr> 491 </table> 492 </div> 493 494 <div class="tab-page" id="tab_options"> 495 <h2 class="tab">Options</h2> 496 <table cellspacing="0" cellpadding="3" border="0"> 497 <tr> 498 <td align="right" nowrap="nowrap"> 499 <b>Generated Documentation Title</b> 500 </td> 501 <td> 502 <input type="text" name="setting_title" size="40" value="Generated Documentation" class="text"> 503 </td> 504 <td class="small"> 505 Choose a title for the generated documentation 506 </td> 507 </tr> 508 <tr> 509 <td nowrap="nowrap"> 510 <b>Default Package Name</b> 511 </td> 512 <td> 513 <input type="TEXT" name="setting_defaultpackagename" size="40" value="default" class="text" /> 514 </td> 515 <td class="small"> 516 Choose a name for the default package 517 </td> 518 </tr> 519 <tr> 520 <td nowrap="nowrap"> 521 <b>Default Category Name</b> 522 </td> 523 <td> 524 <input type="TEXT" name="setting_defaultcategoryname" size="40" value="default" class="text" /> 525 </td> 526 <td class="small"> 527 Choose a name for the default category. This is only used by the peardoc2 converter 528 </td> 529 </tr> 530 <tr> 531 <td nowrap="nowrap"> 532 <b>Custom Tags</b> 533 </td> 534 <td> 535 <input type="text" name="setting_customtags" size="40" class="text" /> 536 </td> 537 <td class="small"> 538 Custom Tags is a comma-separated list of tags you want phpDocumentor to include as valid tags in this parse. An example would be 'value, size' to allow @value and @size tags. 539 </td> 540 </tr> 541 <tr> 542 <td nowrap="nowrap"> 543 <b>Parse @access private and @internal/{@internal}}</b> 544 </td> 545 <td nowrap="nowrap"> 546 <input type="checkbox" name="setting_parseprivate" value="on" /> 547 </td> 548 <td class="small"> 549 The parameter Parse @access private tells phpDocumentor whether to parse elements with an '@access private' tag in their docblock. In addition, it will turn on parsing of @internal tags and inline {@internal}} sections 550 </td> 551 </tr> 552 <tr> 553 <td nowrap="nowrap"> 554 <b>Generate Highlighted Source Code</b> 555 </td> 556 <td nowrap="nowrap"> 557 <input type="checkbox" name="setting_sourcecode" value="on" /> 558 </td> 559 <td class="small">

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1178 of 1382

560 The parameter Generate Highlighted Source Code tells phpDocumentor whether to generate highlighted XRef source code similar to PHP-XRef output. 561 </td> 562 </tr> 563 <tr> 564 <td nowrap="nowrap"> 565 <b>JavaDoc-compliant<br />Description parsing.</b> 566 </td> 567 <td> 568 <input type="checkbox" name="setting_javadocdesc" value="on" /> 569 </td> 570 <td class="small"> 571 Normally, phpDocumentor uses several rules to determine the short description. This switch asks phpDocumentor to simply search for the first period (.) and use it to delineate the short description. In addition, the short description will not be separated from the long description. 572 </td> 573 </tr> 574 <tr> 575 <td nowrap="nowrap"> 576 <b>PEAR package repository parsing</b> 577 </td> 578 <td> 579 <input type="checkbox" name="setting_pear" value="on" /> 580 </td> 581 <td class="small"> 582 PEAR package repositories have specific requirements: 583 <ol> 584 <li>Every package is in a directory with the same name.</li> 585 <li>All private data members and methods begin with an underscore (function _privfunction()).</li> 586 <li>_Classname() is a destructor</li> 587 </ol> 588 This option recognizes these facts and uses them to make assumptions about packaging and access levels. Note that with PHP 5, the destructor option will be obsolete. 589 </td> 590 </tr> 591 </table> 592 </div> 593 594 <div class="tab-page" id="tab_credits"> 595 <h2 class="tab">Credits</h2> 596 phpDocumentor written by Joshua Eichorn 597 <br />Web Interface originally written by Juan Pablo Morales, enhanced by Greg Beaver and super-charged by Andrew Eddie 598 <p> 599 Joshua Eichorn <a href="mailto:[email protected]">[email protected]</a> 600 <br>Juan Pablo Morales <a href= 601 "mailto:[email protected]">[email protected]</a> 602 <br>Gregory Beaver <a href= 603 "mailto:[email protected]">[email protected]</a> 604 <br>Andrew Eddie <a href= 605 "mailto:[email protected]">[email protected]</a> 606 </p> 607 <p> 608 If you have any problems with phpDocumentor, please visit the website: 609 <a href='http://phpdoc.org'>phpdoc.org</a>, or 610 <a href="http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PhpDocumentor&status =Open"> 611 submit a bug at PEAR</a>. 612 </p> 613 <!-- Created: Tue Jun 26 18:52:40 MEST 2001 --> 614 <!-- hhmts start --> 615 <pre> 616 Last modified: $Date: 2007-04-19 15:20:57 -0500 (Thu, 19 Apr 2007) $ 617 Revision: $Revision: 234145 $ 618 </pre> 619 </div> 620 <div class="tab-page" id="tab_links"> 621 <h2 class="tab">Links</h2> 622 <ul> 623 <li><a target="_top" href="http://www.phpdoc.org/manual.php">phpDocumentor manual</a> - Learn how to use phpDocumentor to document your PHP source code</li> 624 <li><a target="_top"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1179 of 1382

href="http://pear.php.net/package/PhpDocumentor/">phpDocumentor homepage</a> on PEAR</li> 625 <li><a target="_top" href="http://phpdocu.sourceforge.net/">phpDocumentor homepage</a> on SourceForge</li> 626 <li><a target="_top" href="http://freshmeat.net/projects/phpdocu">Freshmeat record</a> - subscribe here</li> 627 </ul> 628 </div> 629 </div> 630 <input type="hidden" name="interface" value="web"> 631 <input type="hidden" name="dataform" value="true"> 632 633 </form> 634 635 <script type="text/javascript"> 636 637 tp1.addTabPage( document.getElementById( "tab_intro" ) ); 638 tp1.addTabPage( document.getElementById( "tab_config" ) ); 639 tp1.addTabPage( document.getElementById( "tab_files" ) ); 640 tp1.addTabPage( document.getElementById( "tab_output" ) ); 641 tp1.addTabPage( document.getElementById( "tab_options" ) ); 642 tp1.addTabPage( document.getElementById( "tab_credits" ) ); 643 tp1.addTabPage( document.getElementById( "tab_links" ) ); 644 setupAllTabs(); 645 </script> 646 647 </body> 648 </html>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1180 of 1382

File Source for top.php


Documentation for this file is available at top.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <?php /** * phpDocumentor :: docBuilder Web Interface * * Advanced Web Interface to phpDocumentor * * PHP versions 4 and 5 * * Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package phpDocumentor * @author Andrew Eddie * @author Greg Beaver <[email protected]> * @copyright 2003-2006 Andrew Eddie, Greg Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: top.php 212211 2006-04-30 22:18:14Z cellog $ * @filesource * @see phpdoc.php */ if ('@DATA-DIR@' != '@'.'DATA-DIR@') { include_once( "PhpDocumentor/phpDocumentor/common.inc.php" ); } else { $path = dirname(dirname(__FILE__)); include_once( " $path/phpDocumentor/common.inc.php" ); } // // +------------------------------------------------------------------------+ // | phpDocumentor :: docBuilder Web Interface | // +------------------------------------------------------------------------+ // | Copyright (c) 2003 Andrew Eddie, Greg Beaver | // +------------------------------------------------------------------------+ // | This source file is subject to version 3.00 of the PHP License, | // | that is available at http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // ?> <html> <head> <title> Form to submit to phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> </title> <style type="text/css"> body, td, th { font-family: verdana,sans-serif; font-size: 10pt;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1181 of 1382

68 } 69 .title { 70 font-size: 12pt; 71 } 72 </style> 73 </head> 74 75 <body bgcolor="#0099cc" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> 76 77 <table width="100%" cellspacing="0" cellpadding="0"> 78 <tr> 79 <td bgcolor="#0099cc" height="35" width="100" nowrap="nowrap"> 80 <img src="../poweredbyphpdoc.gif" alt="" width="88" height="31" border="0" alt="" /> 81 </td> 82 <td bgcolor="#0099cc" width="100%"> 83 <span class="title"><strong>docBuilder</strong> :: phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> Web Interface</span> 84 </td> 85 </tr> 86 </table> 87 88 </body> 89 </html>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1182 of 1382

File Source for new_phpdoc.php


Documentation for this file is available at new_phpdoc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <?php /** * Advanced Web Interface to phpDocumentor * * PHP versions 4 and 5 * * @category ToolsAndUtilities * @package phpDocumentor * @author Juan Pablo Morales <[email protected]> * @author Joshua Eichorn <[email protected]> * @author Gregory Beaver <[email protected]> * @author Chuck Burgess <[email protected]> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://pear.php.net/package/PhpDocumentor * @see phpdoc.php * @filesource * @todo CS cleanup - change package to PhpDocumentor * @deprecated redirects automatically to docbuilder * (see {@link docbuilder/index.html}) */ ?> <html> <head> <title>PhpDocumentor (deprecated web interface)</title> <META HTTP-EQUIV="Refresh" CONTENT="5; URL=docbuilder/"/> </head> <body> This PhpDocumentor web interface is deprecated... you will be redirected to the DocBuilder interface. </body> </html>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1183 of 1382

File Source for phpdoc.php


Documentation for this file is available at phpdoc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <?php /** * Original Web Interface to phpDocumentor * * PHP versions 4 and 5 * * @category ToolsAndUtilities * @package phpDocumentor * @author Juan Pablo Morales <[email protected]> * @author Joshua Eichorn <[email protected]> * @author Gregory Beaver <[email protected]> * @author Chuck Burgess <[email protected]> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://pear.php.net/package/PhpDocumentor * @filesource * @todo CS cleanup - change package to PhpDocumentor * @deprecated redirects automatically to docbuilder * (see {@link docbuilder/index.html}) */ ?> <html> <head> <title>PhpDocumentor (deprecated web interface)</title> <META HTTP-EQUIV="Refresh" CONTENT="5; URL=docbuilder/"/> </head> <body> This PhpDocumentor web interface is deprecated... you will be redirected to the DocBuilder interface. </body> </html>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1184 of 1382

File Source for Classes.inc


Documentation for this file is available at Classes.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Intermediate class parsing structure. * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2001-2007 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Greg Beaver <[email protected]> * @copyright 2001-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: Classes.inc 243933 2007-10-10 01:18:25Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserDocBlock, parserInclude, parserPage, parserClass * @see parserDefine, parserFunction, parserMethod, parserVar * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor */ /** * Intermediate class parsing structure. * * The {@link phpDocumentor_IntermediateParser} class uses this class and its * cousin, {@link ProceduralPages} to organize all parsed source code elements. * Data is fed to each immediately after it is parsed, and at conversion time, * everything is organized. * * The Classes class is responsible for all inheritance, including resolving * name conflicts between classes, determining which classes extend other * classes, and is responsible for all inheritance of documentation. * {@internal * This structure parses classes, vars and methods by file, and then iterates * over the class tree to set up inheritance. The {@link Inherit()} * method is the meat of the class, and processes the class trees from root to * branch, ensuring that parsing order is unimportant.}}} * * @category ToolsAndUtilities * @package phpDocumentor * @author Greg Beaver <[email protected]> * @copyright 2001-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1185 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

* @todo CS cleanup - change package to PhpDocumentor */ class Classes { /**#@+ * @access private */ /** * file being parsed, used in every add function to match up elements with * the file that contains them * * This variable is used during parsing to associate class elements added * to the data structures that contain them with the file they reside in * @see addClass(), addMethod(), addVar(), nextFile() * @var string */ var $curfile; /** * class being parsed, used to match up methods and vars with their parent * class * * This variable is used during parsing to associate class elements added * to the data structures that contain them with the file they reside in * @see addMethod(), addVar() * @var string */ var $curclass; /** * Used when a definite match is made between a parent class and a child * class * * This variable is used in post-parsing. * * Format:<pre> * array( * parent => array( * parentfile => array( * child => childfile * ) * ) * )</pre> * @var array */ var $definitechild; /** * array of parsed classes organized by the name of the file that contains * the class. * * Format:<pre> * array( * filename => array( * classname => {@link parserClass} * ) * )</pre> * @var array */ var $classesbyfile = array(); /** * array of file names organized by classes that are in the file. * * This structure is designed to handle name conflicts. Two files can * contain classes with the same name, and this array will record both * filenames to help control linking and inheritance errors * * Format:<pre> * array( * classname => array( * name of file containing classname, * name of file 2 containing classname, * ... * ) * )</pre> * @var array */ var $classesbynamefile = array(); /** * array of parsed methods organized by the file that contains them. * * Format:<pre>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1186 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

* array( * filename => array( * classname => array( * {@link parserMethod} 1, * {@link parserMethod} 2, * ... * ) * ) * )</pre> * @var array */ var $methodsbyfile = array(); /** * array of parsed vars organized by the file that contains them. * * Format:<pre> * array( * filename => array( * classname => array( * {@link parserVar} 1, * {@link parserVar} 2, * ... * ) * ) * )</pre> * @var array */ var $varsbyfile = array(); /** * array of parsed class constants organized by the file that contains them. * * Format:<pre> * array( * filename => array( * classname => array( * {@link parserConst} 1, * {@link parserConst} 2, * ... * ) * ) * )</pre> * @var array */ var $constsbyfile = array(); /** * keeps track of extend declarations by file, used to find inheritance * * Format:<pre> * array( * filename => array( * classname => parentclassname * ) * )</pre> * @var array */ var $extendsbyfile = array(); /** * Keeps track of child classes by file. * Since phpDocumentor can document collections of files that contain name * conflicts (PHP would give a fatal error), it * is impossible to assume a class that declares "extends foo" necessarily * extends the class foo in file X. It could be an * extended class of class foo in file Y. Because of this, phpDocumentor * relies on packaging to resolve the name conflict * This array keeps track of the packages of a child class * * Format:<pre> * array( * parentclassname => array( * filename => array( * childclassname => array( * packagename, * packagename * ) * ) * ) * )</pre> * @var array */ var $classchildrenbyfile = array();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1187 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

/** * Keeps track of class packages found in a file. * This is used in {@link getParentClass()} to determine the number of * packages in a file, in order to resolve inheritance issues * Format:<pre> * array( * filename => array( * packagename1, * packagename2, * ... * ) * )</pre> * @var array */ var $classpackagebyfile = array(); /** * a tree of class inheritance by name. * * Format:<pre> * array( * childname => parentname, * childname1 => parentname1, * rootname => 0, * ... * )</pre> * @var array * @see Converter::generateSortedClassTreeFromClass() */ var $classparents = array(); /** * Keeps track of package and subpackage for each class name, organized * by package * * Format:<pre> * array( * classname => array( * path => array( * package, * subpackage * ), * path2 => array( * package, * subpackage * ), * ... * ) * )</pre> * @var array */ var $classpathpackages = array(); /** * used to delete duplicates in the same package to avoid documentation errors * * Specifically used in {@link Converter::checkKillClass()} */ var $killclass = array(); /** * array of methods by package and class * * format:<pre> * array(packagename => * array(classname => * array(methodname1 => {@link parserMethod} class, * methodname2 => {@link parserMethod} class,...) * ) * ) * )</pre> * @var array * @see Converter */ var $methods = array(); /** * array of class variables by package and class * * format:<pre> * array(packagename => * array(classname => * array(variablename1 => {@link parserVar} class, * variablename2 => {@link parserVar} class,...

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1188 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

* * ) * )</pre> * @var array * @see Converter */ var $vars = array();

/** * array of class variables by package and class * * format:<pre> * array(packagename => * array(classname => * array(constname1 => {@link parserConst} class, * constname2 => {@link parserConst} class,... * ) * ) * )</pre> * @var array * @see Converter */ var $consts = array(); /** * Reverse class_packages_by_file, used to prevent duplicates * @var array Format: array(packagename => 1) */ var $revcpbf = array(); /** * All classes with no parents (no extends clause) are tracked in this array * by the file that contains them. * * Format:<pre> * array( * classname => array( * name of file1 that contains root classname, * name of file2 that contains root classname, * ... * ) * )</pre> * @var array */ var $roots = array(); /** * All classes with a parent that was not parsed are included in this array * * Format:<pre> * array( * classname => array( * name of file1 that contains root classname, * name of file2 that contains root classname, * ... * ) * )</pre> * @var array */ var $specialRoots = array(); /** * array of all files that contain classes with the same name * @var array Format: (classname => array(path1, path2,...)) */ var $potentialclassconflicts = array(); /** * array of all inter-package name conflicts of classes * * This array allows documentation of PHP namespace conflicts that would * occur should a user try to include these files in the same file * @var array Format: (classname => array(path1, path2,...)) */ var $classconflicts = array(); /**#@-*/ /** * While parsing, add a class to the list of parsed classes * * sets up the {@link $classesbyfile, $classesbynamefile, $extendsbyfile}, * {@link $classchildrenbyfile, $roots} arrays, and sets {@link $curclass} * * @param parserClass &$element element is a {@link parserClass}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1189 of 1382

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466

* * @return void * @uses addPackageToFile() marks the current class's package as being * present in a file */ function addClass(& $element) { $this-> curclass = $element-> getName(); $element-> curfile = $this-> curfile; if (isset($this-> classesbyfile[$this-> curfile][$this-> curclass])) { addWarning(PDERROR_ELEMENT_IGNORED, 'class', $this-> curclass, $this-> curfile); $this-> curclass = false; return; } $this-> classesbyfile [$this-> curfile][$this-> curclass] = $element; $this-> classesbynamefile[$this-> curclass][] = $this-> curfile; $this-> extendsbyfile[$this-> curfile][$this-> curclass] = $element-> getExtends(); $this-> classchildrenbyfile[$element-> getExtends()] [$this-> curfile][$this-> curclass][] = $element-> docblock-> package; if ($element-> docblock-> getExplicitPackage()) $this-> addPackageToFile($element-> docblock-> package); if (!$element-> getExtends()) { $this-> roots[$this-> curclass][] = $this-> curfile; } } /** * While parsing, add a method to the list of parsed methods * * sets up the {@link $methodsbyfile} array using {@link $curfile} and * {@link $curclass} * * @param parserMethod &$element element is a {@link parserMethod} * * @return void */ function addMethod(& $element) { if (!$this-> curclass) return; $this-> methodsbyfile[$this-> curfile][$this-> curclass][] = $element; } /** * While parsing, add a variable to the list of parsed variables * * sets up the {@link $varsbyfile} array using {@link $curfile} * and {@link $curclass} * * @param parserVar &$element element is a {@link parserVar} * * @return void */ function addVar(& $element) { if (!$this-> curclass) return; $this-> varsbyfile[$this-> curfile][$this-> curclass][] = $element; } /** * While parsing, add a variable to the list of parsed variables * * sets up the {@link $constsbyfile} array using {@link $curfile} * and {@link $curclass} * * @param parserConst &$element element is a {@link parserConst} * * @return void */ function addConst(& $element)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1190 of 1382

467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546

{ if (!$this-> curclass) return; $this-> constsbyfile[$this-> curfile][$this-> } /** * Prepare to parse a new file * * sets {@link $curfile} to $file and {@link $curclass} * to false (no class being parsed) * * @param string $file file currently being parsed * * @return void */ function nextFile($file) { $this-> curfile = $file; $this-> curclass = false; } /** * Mark a package as being used in a class * * {@source } * * @param string $package package name * * @return void */ function addPackageToFile($package) { if (!isset($this-> revcpbf[$this-> curfile][$package])) $this-> classpackagebyfile[$this-> curfile][] = $package; $this-> revcpbf[$this-> curfile][$package] = 1; } /** * Find the parent class of $class, and set up structures to note this fact * * Modifies the {@link parserClass} element in {@link $classesbyfile} to use * the parent's package, and inherit methods/vars * * @param string $class child class to find parent class * @param string $file file child class is located in * * @return void * @uses $definitechild if a match is made between a parent class and parameter * $class in file $file, then definitechild is set here * @uses getParentClass() to find the parent class */ function setClassParent($class,$file) { if (is_array($par = $this-> getParentClass($class, $file))) { // (for debugging) // phpDocumentor_out("$file class $class extends " // . $par[1] ." file ". $par[0] . "\n"); $this-> $this-> } else { $this-> } } /** * Main processing engine for setting up class inheritance. * * This function uses {@link $roots} to traverse the inheritance tree via * {@link processChild()} and returns the data structures * phpDocumentor_IntermediateParser needs to convert parsed data * to output using {@link phpDocumentor_IntermediateParser::Convert()} * * @param phpDocumentor_IntermediateParser &$render the renderer object * * @return void * @uses processChild() set up inheritance * @todo CS Cleanup - rename to "inherit" for CamelCaps naming standard */ function Inherit(& $render) classesbyfile[$file][$class]-> setParent($par[1], $par[0], $this); definitechild[$par[1]][$par[0]][$class] = $file; classesbyfile[$file][$class]-> setParentNoClass($par); curclass][] = $element;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1191 of 1382

547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626

{ phpDocumentor_out("\nProcessing Class Inheritance\n\n" ); flush(); phpDocumentor_out("\nProcessing Root Trees\n\n" ); flush(); foreach ($this-> roots as $class => $files) { for ($i=0; $i< count($files); $i++) { $this-> processChild($render, $class, $files[$i]); } } if (0) foreach ($this-> classesbyfile as $i => $j) { foreach ($j as $k => $m) { var_dump($i, $k); if ($i == 'iConverter') { var_dump($j); } } } phpDocumentor_out("\nProcessing leftover classes " . "(classes that extend root classes not found in the same package)\n" flush(); foreach ($this-> classesbyfile as $i => $j) { foreach ($j as $k => $m) { $this-> processChild($render, $k, $i, true); } } phpDocumentor_out("done processing leftover classes\n" ); flush(); $this-> setupClassConflicts(); } /** * Transfers actual conflicts from {@link $potentialClassconflicts} to * {@link $classconflicts} * * @return void * @access private * @uses $potentialclassconflicts transfers values to {@link $classconflicts} */ function setupClassConflicts() { foreach ($this-> potentialclassconflicts as $class => $paths) { if (count($paths) - 1) { //conflict $package = array(); foreach ($paths as $path) { // create a list of conflicting classes in each package if (isset($this-> classpathpackages[$class][$path])) $package[$this-> classpathpackages[$class][$path][0]][] = $path; } foreach ($package as $pathpackages) { /* * if at least 2 functions exist in the same package, * delete all but the first one and add warnings */ if (count($pathpackages) - 1) { for ($i=1; $i < count($pathpackages); $i++) { if (isset($this-> classesbyfile[$pathpackages[$i]])) { addWarning(PDERROR_ELEMENT_IGNORED, 'class', $class, $pathpackages[$i]); $this-> killClass($class, $pathpackages[$i]); $oth = array_flip($paths); unset($paths[$oth[$pathpackages[$i]]]); } } } } $this-> classconflicts[$class] = $paths; } } } /** * If a package contains two classes with the same name, this function finds * that conflict * * Returns the {@link $classconflicts} entry for class $class, minus its own path * * @param mixed $class the class name to search for *

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1192 of 1382

627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706

* @return mixed returns false if no conflicts, * or an array of paths containing conflicts */ function getConflicts($class) { if (!isset($this-> classconflicts[$class])) return false; $a = array(); foreach ($this-> classconflicts[$class] as $conflict) { $a[$this-> classesbyfile[$conflict][$class]-> docblock-> = $this-> classesbyfile[$conflict][$class]; } return $a; } /** * sets up {@link $killclass} for use by Converter::checkKillClass() * * @param mixed $class the class * @param mixed $path the path * * @return void * @access private */ function killClass($class,$path) { $this-> killclass[$class][$path] = true; }

package]

/** * This function recursively climbs up the class tree, setting inherited * information like package and adds the elements to * {@link phpDocumentor_IntermediateParser}. * * Using structures defined in {@link Classes}, * the function first sets package information, * and then seeks out child classes. * It uses 3 tests to determine whether a class is a child class. * <ol> * <li>child class is in the same file as the parent class * and extends parent class * </li> * <li>child class is in a different file and specifies * the parent's @package in its docblock * </li> * <li>child class is in a different file and is in a * different @package, with one possible parent class * </li> * </ol> * * @param phpDocumentor_IntermediateParser &$render the renderer object * @param string $class class to process * @param string $file name of file $class * is located in * @param boolean $furb flag used privately * to control informational * output while parsing * (used when processing * leftover classes in * {@link Inherit()} * * @return void * @global string default package, usually "default" */ function processChild(& $render,$class,$file,$furb = false) { global $phpDocumentor_DefaultPackageName; if (isset($this-> classesbyfile[$file][$class]-> processed)) return; $this-> potentialclassconflicts[$class][] = $file; if ($furb) phpDocumentor_out(" Processing $class in file $file\n" ); flush(); $this-> classesbyfile[$file][$class]-> processed = true; $db = $this-> classesbyfile[$file][$class]; $render-> addUses($db, $file); if (!$render-> parsePrivate) { /* * if this class has an @access private, * and parse private is disabled, remove it

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1193 of 1382

707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786

*/ if ($db-> docblock-> hasaccess) { $aaa = $db-> docblock-> getKeyword('access'); if (is_object($aaa) && $aaa-> getString() == 'private') { if (isset($this-> varsbyfile[$file]) && isset( $this-> varsbyfile[$file][$class])) { unset($this-> varsbyfile[$file][$class]); } if (isset($this-> methodsbyfile[$file]) && isset( $this-> methodsbyfile[$file][$class])) { unset($this-> methodsbyfile[$file][$class]); } if (isset($this-> constsbyfile[$file]) && isset( $this-> constsbyfile[$file][$class])) { unset($this-> constsbyfile[$file][$class]); } $this-> classesbyfile[$file][$class]-> ignore = true; // if this is a root class, remove it from the roots array if (isset($this-> roots[$class])) { foreach ($this-> roots[$class] as $i => $files) { // find the file key and unset if ($files == $file) unset($this-> roots[$class][$i]); } } /* * if this is a child, remove it from the list * of child classes of its parent */ if ($db-> getExtends()) unset($this-> classchildrenbyfile[$db-> getExtends()][$file]); return; } } } if ($render-> packageoutput) { if (!in_array($db-> docblock-> package, $render-> packageoutput)) { if (isset($this-> varsbyfile[$file]) && isset( $this-> varsbyfile[$file][$class])) { unset($this-> varsbyfile[$file][$class]); } if (isset($this-> methodsbyfile[$file]) && isset( $this-> methodsbyfile[$file][$class])) { unset($this-> methodsbyfile[$file][$class]); } if (isset($this-> constsbyfile[$file]) && isset( $this-> constsbyfile[$file][$class])) { unset($this-> constsbyfile[$file][$class]); } $this-> classesbyfile[$file][$class]-> ignore = true; if (isset($this-> roots[$class])) { foreach ($this-> roots[$class] as $i => $files) { if ($files == $file) unset($this-> roots[$class][$i]); } } if ($db-> getExtends()) unset($this-> classchildrenbyfile[$db-> getExtends()][$file]); return; } } $this-> setClassParent($class, $file); $db = $this-> classesbyfile[$file][$class]; if ($furb && ! is_array($db-> parent)) { // debug("furb adding $class $file to roots"); $this-> specialRoots[$db-> parent][] = array($class, $file); } // fix for 591396 if (!$db-> docblock-> getExplicitPackage()) { $a = $render-> proceduralpages-> pagepackages[$file]; if ($a[0] != $phpDocumentor_DefaultPackageName) { // inherit page package $this-> classesbyfile[$file][$class]-> docblock-> package = $a[0]; } } if ($this-> classesbyfile[$file][$class]-> docblock-> package == $render-> proceduralpages-> pagepackages[$file][0]) { if ($this-> classesbyfile[$file][$class]-> docblock-> subpackage == '') { $this-> classesbyfile[$file][$class]-> docblock-> subpackage = $render-> proceduralpages-> pagepackages[$file][1]; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1194 of 1382

787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 $vr; 848 849 850 851 852 853 854 855 856 857 858 $vr; 859 860 861 862 863 864

} $db = $this-> classesbyfile[$file][$class]; $render-> addPackageParent($db); $render-> addPageIfNecessary($file, $db); if ($access = $db-> docblock-> getKeyword('access')) { if (!is_string($access) && is_object($access)) $access = $access-> getString(); if (!is_string($access)) $access = 'public'; if (($access == 'private') && (! $render-> parsePrivate)) { if (isset($this-> varsbyfile[$file]) && isset( $this-> varsbyfile[$file][$class])) { foreach ($this-> varsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> addKeyword('access', 'private'); $this-> varsbyfile[$file][$class][$i] = $vr; } } if (isset($this-> methodsbyfile[$file]) && isset( $this-> methodsbyfile[$file][$class])) { foreach ($this-> methodsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> addKeyword('access', 'private'); $this-> methodsbyfile[$file][$class][$i] = $vr; } } if (isset($this-> constsbyfile[$file]) && isset( $this-> constsbyfile[$file][$class])) { foreach ($this-> constsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> addKeyword('access', 'private'); $this-> constsbyfile[$file][$class][$i] = $vr; } } } } $this-> classpathpackages[$class][$file] = array($db-> docblock-> package,$db-> docblock-> subpackage); if ($db-> docblock-> getExplicitPackage()) { $render-> proceduralpages-> addClassPackageToFile($file, $db-> docblock-> package, $db-> docblock-> subpackage); } $render-> addElementToPage($db, $file); if (isset($this-> varsbyfile[$file]) && isset( $this-> varsbyfile[$file][$class])) { foreach ($this-> varsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> package = $db-> docblock-> package; $vr-> docblock-> subpackage = $db-> docblock-> subpackage; $render-> addElementToPage($vr, $file); $render-> addUses($vr, $file); $this-> varsbyfile[$file][$class][$i] = $vr; $this-> vars[$db-> docblock-> package][$class][$vr-> getName()] = $vr; } } if (isset($this-> methodsbyfile[$file]) && isset( $this-> methodsbyfile[$file][$class])) { foreach ($this-> methodsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> package = $db-> docblock-> package; $vr-> docblock-> subpackage = $db-> docblock-> subpackage; $render-> addElementToPage($vr, $file); $render-> addUses($vr, $file); $this-> methodsbyfile[$file][$class][$i] = $vr; $this-> methods[$db-> docblock-> package][$class][$vr-> getName()] = } } if (isset($this-> constsbyfile[$file]) && isset( $this-> constsbyfile[$file][$class])) { foreach ($this-> constsbyfile[$file][$class] as $i => $vr) { $vr-> docblock-> package = $db-> docblock-> package; $vr-> docblock-> subpackage = $db-> docblock-> subpackage; $render-> addElementToPage($vr, $file); $render-> addUses($vr, $file); $this-> constsbyfile[$file][$class][$i] = $vr; $this-> methods[$db-> docblock-> package][$class][$vr-> getName()] = } } $this-> classpackages[$class][] = array($db-> docblock-> package,$db-> if (is_array($db-> parent)) $this-> classparents[$db-> docblock->

docblock->

subpackage); parent[1];

package][$class] = $db->

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1195 of 1382

865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944

else $this-> classparents[$db-> if (is_array($db-> parent)) { $z = $this-> getClass($db->

docblock->

package][$class] = $db-> parent[0]);

getExtends();

parent[1], $db->

$this-> classchildren[$z-> docblock-> package][$db-> parent[1]][] = $db; } if (isset($this-> classchildrenbyfile[$class])) { foreach ($this-> classchildrenbyfile[$class] as $childfile => $other) { // test 1, inherits in same file (must be same package) if ($childfile == $file) { foreach ($other as $child => $packages) { // debug("parent $class same file $child"); $this-> processChild($render, $child, $childfile); $x = $this-> getClass($child, $childfile); if ($x-> docblock-> package != $GLOBALS['phpDocumentor_DefaultPackageName']) { // child package need root for class trees if ($x-> docblock-> package != $db-> docblock-> package) { // debug("adding $child in $childfile 1"); $this-> roots[$child][] = $childfile; } } } } else { // test 2, different file, same package foreach ($other as $child => $packages) { for ($j=0; $j< count($packages); $j++) { if ($this-> classesbyfile[$file][$class]-> docblock-> package == $packages[$j]) { $this-> processChild($render, $child, $childfile); // debug("$childfile diff file $child, parent $class, // same package ".$packages[$j]); } else { /* * test 3, different file, different package, * only 1 parent is possible */ if (isset($this-> classesbynamefile[$child])) { // 1 possible parent if (count($this-> classesbynamefile[$class]) == 1) { // debug("$childfile diff file $child, // diff package, // 1 possible parent root $class"); $this-> processChild($render, $child, $childfile); $x = $this-> getClass($child, $childfile); if ($x-> docblock-> package != $GLOBALS ['phpDocumentor_DefaultPackageName']) { // child package need root //for class trees if ($x-> docblock-> package != $db-> docblock-> package) { // debug("adding roots // $child in $childfile 2"); $this-> roots[$child][] = $childfile; } } } } } } } } } } } /** * Get the parserClass representation of a class from its name and file * * @param string $class classname * @param string $file file classname is located in * * @return parserClass */ function & getClass($class, $file) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1196 of 1382

945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024

// debug("getClass called with class $class file $file"); return $this-> classesbyfile[$file][$class]; } /** * Used by {@link parserData::getClasses()} * to retrieve classes defined in file $path * * retrieves the array entry from {@link $classesbyfile} for $path * * @param string $path full path to filename * * @return mixed returns false if no classes defined in the file, * otherwise returns an array of {@link parserClass}es */ function getClassesInPath($path) { if (!isset($this-> classesbyfile[$path])) return false; return $this-> classesbyfile[$path]; } /** * called by {@link parserClass::hasMethods()}. Should not be directly called * * @param string $file file classname is located in * @param string $class classname * * @return bool * @access private */ function hasMethods($file, $class) { return isset($this-> methodsbyfile[$file][$class]); } /** * called by {@link parserClass::hasConsts()}. * Should not be directly called * * @param string $file file classname is located in * @param string $class classname * * @return bool * @access private */ function hasConsts($file,$class) { return isset($this-> constsbyfile[$file][$class]); } /** * called by {@link parserClass::hasVars()}. Should not be directly called * * @param string $file file classname is located in * @param string $class classname * * @return bool * @access private */ function hasVars($file, $class) { return isset($this-> varsbyfile[$file][$class]); } /** * called by {@link parserClass::hasMethod()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name method name * * @return bool * @access private */ function hasMethod($class, $file, $name) { if (!$this-> hasMethods($file, $class)) return false; for ($i=0; $i< count($this-> methodsbyfile[$file][$class]); $i++) { if ($this-> methodsbyfile[$file][$class][$i]-> getName() == $name) return true;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1197 of 1382

1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104

} return false; } /** * called by {@link parserClass::hasVar()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name var name * * @return bool * @access private */ function hasVar($class, $file, $name) { if (!$this-> hasVars($file, $class)) return false; for ($i=0; $i< count($this-> varsbyfile[$file][$class]); $i++) { if ($this-> varsbyfile[$file][$class][$i]-> getName() == $name) return true; } return false; } /** * called by {@link parserClass::hasConst()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name constant name * * @return bool * @access private */ function hasConst($class, $file, $name) { if (!$this-> hasConsts($file, $class)) return false; for ($i=0; $i< count($this-> constsbyfile[$file][$class]); $i++) { if ($this-> constsbyfile[$file][$class][$i]-> getName() == $name) return true; } return false; } /** * called by {@link parserClass::getMethods()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * * @return mixed * @access private */ function & getMethods($class, $file) { if (!isset($this-> methodsbyfile[$file][$class])) { $flag = false; return $flag; } return $this-> methodsbyfile[$file][$class]; } /** * called by {@link parserClass::getVars()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * * @return mixed * @access private */ function & getVars($class, $file) { if (!isset($this-> varsbyfile[$file][$class])) { $flag = false; return $flag; } return $this-> varsbyfile[$file][$class]; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1198 of 1382

1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184

/** * called by {@link parserClass::getConsts()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * * @return mixed * @access private */ function & getConsts($class, $file) { if (!isset($this-> constsbyfile[$file][$class])) { $flag = false; return $flag; } return $this-> constsbyfile[$file][$class]; } /** * called by {@link parserClass::getMethod()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name method name * * @return mixed * @access private */ function getMethod($class, $file, $name) { if (!$this-> hasMethod($class, $file, $name)) return false; for ($i=0; $i< count($this-> methodsbyfile[$file][$class]); $i++) { if ($this-> methodsbyfile[$file][$class][$i]-> getName() == $name) return $this-> methodsbyfile[$file][$class][$i]; } } /** * called by {@link parserClass::getVar()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name var name * * @return mixed * @access private */ function getVar($class, $file, $name) { if (!$this-> hasVar($class, $file, $name)) return false; for ($i=0; $i< count($this-> varsbyfile[$file][$class]); $i++) { if ($this-> varsbyfile[$file][$class][$i]-> getName() == $name) return $this-> varsbyfile[$file][$class][$i]; } } /** * called by {@link parserClass::getConst()}. Should not be directly called * * @param string $class classname * @param string $file file classname is located in * @param string $name const name * * @return mixed * @access private */ function getConst($class, $file, $name) { if (!$this-> hasConst($class, $file, $name)) return false; for ($i=0; $i< count($this-> constsbyfile[$file][$class]); $i++) { if ($this-> constsbyfile[$file][$class][$i]-> getName() == $name) return $this-> constsbyfile[$file][$class][$i]; } } /** * Search for a class in a package * * @param string $class classname * @param string $package package classname is in

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1199 of 1382

1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264

* * @return mixed returns false if no class in $package, * otherwise returns a {@link parserClass} */ function & getClassByPackage($class, $package) { if (!isset($this-> classesbynamefile[$class])) { // removed, too many warnings, not very useful // addWarning(PDERROR_CLASS_NOT_IN_PACKAGE,$class,$package); $flag = false; return $flag; } for ($i=0; $i < count($this-> classesbynamefile[$class]); $i++) { $cls = $this-> classesbyfile[$this-> classesbynamefile[$class][$i]][$class]; $pkg = $cls-> getPackage(); if ($pkg == $package) return $cls; } // addWarning(PDERROR_CLASS_NOT_IN_PACKAGE,$class,$package); $flag = false; return $flag; } /** * Find the parent class of a class in file $file * uses 3 tests to find the parent classname: * <ol> * <li>only one class with the parent classname</li> * <li>more than one class, but only one in the same file as the child</li> * <li>only one parent class in the same package as the child</li> * </ol> * * @param string $class classname * @param string $file file classname is located in * * @return mixed false if no parent class, * a string if no parent class found by that name, * and an array(file parentclass is in, parentclassname) */ function getParentClass($class,$file) { if (!isset($this-> classesbyfile[$file][$class])) { return false; } $element = $this-> classesbyfile[$file][$class]; if (!($ex = $element-> getExtends())) return false; // first check to see if there is one and only one // class with the parent class's name if (isset($this-> classesbynamefile[$ex])) { if (count($this-> classesbynamefile[$ex]) == 1) { if ($this-> classesbyfile [$this-> classesbynamefile[$ex][0]][$ex]-> ignore) { return $ex; } return array($this-> classesbynamefile[$ex][0],$ex); } else { // next check to see if there is a parent class in the same file if (isset($this-> classesbyfile[$file][$ex])) { if ($this-> classesbyfile[$file][$ex]-> ignore) { return $ex; } return array($file,$ex); } // next check to see if there is only one package // used in the file, try to resolve it that way if (isset($this-> classpackagebyfile[$file])) { if (count($this-> classpackagebyfile[$file]) == 1) { for ($i=0;$i< count($this-> classesbynamefile[$ex]);$i++) { if ($this-> classesbyfile [$this-> classesbynamefile[$ex][$i]][$ex]-> getPackage() == $this-> classpackagebyfile[$file][0]) { if ($this-> classesbyfile [$this-> classesbynamefile[$ex][$i]][$ex]-> ignore) return $ex; return array($this-> classesbynamefile[$ex][$i],$ex); } }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1200 of 1382

1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344

} } // name conflict addWarning(PDERROR_INHERITANCE_CONFLICT, $class, $file, $ex); return $ex; } } else { if (class_exists('ReflectionClass') && class_exists($ex)) { $r = new ReflectionClass($ex); if ($r-> isInternal()) { return $ex; // no warning } } addWarning(PDERROR_PARENT_NOT_FOUND, $class, $ex); return $ex; } } /** * Get a list of all root classes indexed by package. Used to generate * class trees by {@link Converter} * * @param boolean $all [since phpDocumentor 1.3.0RC6] determines whether to * return class trees that extend non-parsed classes * * @return array array(package => array(rootclassname, rootclassname,...),...) */ function getRoots($all = false) { $roots = array(); $temproots = $this-> roots; if (!$all) { foreach ($this-> specialRoots as $package => $root) { foreach ($root as $parent => $info) { $temproots[$info[0]][] = $info[1]; } } } foreach ($temproots as $class => $files) { if (count($files)) { foreach ($files as $i => $boofou) { $x = $this-> getClass($class, $files[$i]); $roots[$x-> } } } foreach ($roots as $package => $root) { usort($roots[$package], "strnatcasecmp" ); } if ($all) { $specialRoots = array(); foreach ($this-> specialRoots as $parent => $classinfo) { if (count($classinfo)) { foreach ($classinfo as $i => $info) { $x = $this-> getClass($info[0], $info[1]); $specialRoots[$x-> } } } foreach ($specialRoots as $package => $root) { uksort($specialRoots[$package], "strnatcasecmp" ); foreach ($specialRoots[$package] as $parent => $classes) { usort($specialRoots[$package][$parent], 'strnatcasecmp'); } } return array('special' => $specialRoots, 'normal' => $roots); } return $roots; } /** * Get all classes confirmed in parsing * to be descended class $parclass in file $file * * @param string $parclass name of parent class * @param string $file file parent class is found in * * @return mixed either false if no children, or array of format getPackage()][$parent][] = $info[0]; getPackage()][] = $class;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1201 of 1382

1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356

* array(childname => childfile,childname2 => childfile2,...) * @see parserClass::getChildClassList() * @uses $definitechild */ function getDefiniteChildren($parclass, $file) { if (isset($this-> definitechild[$parclass][$file])) return $this-> definitechild[$parclass][$file]; return false; } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1202 of 1382

File Source for clone.inc.php


Documentation for this file is available at clone.inc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 <?php /** * Object clone method * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2001-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Greg Beaver <[email protected]> * @copyright 2001-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: clone.inc.php 243202 2007-09-30 02:08:08Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor */ /** * Clone an object in PHP 4 * * @param object $obj the object to be cloned * * @return object the new clone * @todo CS cleanup - rename function to PhpDocumentor_clone */ function phpDocumentor_clone($obj) { return $obj; } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1203 of 1382

File Source for clone5.inc.php


Documentation for this file is available at clone5.inc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 <?php /** * Object clone method * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2001-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Greg Beaver <[email protected]> * @copyright 2001-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: clone5.inc.php 243202 2007-09-30 02:08:08Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor */ /** * Clone an object in PHP 5 * * @param object $obj the object to be cloned * * @return object the new clone * @ignore * @todo CS cleanup - rename function to PhpDocumentor_clone */ function phpDocumentor_clone($obj) { return clone $obj; } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1204 of 1382

File Source for common.inc.php


Documentation for this file is available at common.inc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Common information needed by all portions of the application * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2001-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Greg Beaver <[email protected]> * @copyright 2001-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: common.inc.php 288074 2009-09-05 02:16:26Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserDocBlock, parserInclude, parserPage, parserClass * @see parserDefine, parserFunction, parserMethod, parserVar * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename constant to TOKENIZER_EXT */ /* phpDocumentor version */ if ('@PEAR-DIR@' != '@'.'PEAR-DIR@') { /** @ignore */ define("PHPDOCUMENTOR_VER" } else { define("PHPDOCUMENTOR_VER" } /* phpDocumentor URL */ define("PHPDOCUMENTOR_WEBSITE"

, "@VER@" , "1.4.3"

); );

, "http://www.phpdoc.org"

);

// set the correct path delimiter define('SMART_PATH_DELIMITER', DIRECTORY_SEPARATOR); define('tokenizer_ext', extension_loaded('tokenizer') && version_compare(phpversion(), "4.3.0" , ">=" ));

// we just replace all the \ with / so that we can just operate on / define('PATH_DELIMITER', '/'); // set the correct path delimiter define('PHPDOCUMENTOR_WINDOWS', substr(PHP_OS, 0, 3) == 'WIN'); define('_IN_PHP5', phpversion() == '5.0.0RC1-dev' || phpversion() == '5.0.0RC2-dev'

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1205 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 0) { 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146

|| version_compare(phpversion(), '5.0.0', 'ge')); // determine which "clone" class to set, based on PHP major version $cloneClassDir = 'PhpDocumentor' . DIRECTORY_SEPARATOR . 'phpDocumentor'; $cloneClassFile = 'clone.inc.php'; if ('@VER@' == '@'.'VER@') { // we're _not_ in a PEAR installation $cloneClassDir = dirname(__FILE__); } if (_IN_PHP5) { // we _are_ in PHP5 $cloneClassFile = 'clone5.inc.php'; } require_once $cloneClassDir . DIRECTORY_SEPARATOR . $cloneClassFile; // make arg arrays available if (isset($_SERVER['argv'])) { $argv = $_SERVER['argv']; $argc = $_SERVER['argc']; } /** * used in phpdoc.php and new_phpdoc.php * * @param string $directory a directory string * * @return array an array of directory contents * @todo CS cleanup - rename function to PhpDocumentor_ConfigFileList */ function phpDocumentor_ConfigFileList($directory) { $ret = array(); if (@is_dir($directory)) { $ret = array(); // thanks to Jason E Sweat ([email protected]) for fix $d = @dir($directory); while ($d && $entry=$d-> $getentry = false; if (strcmp($entry, "." read()) { ) != 0 && strcmp($entry, ".." ) !=

if (substr($entry, 0, 1) != "." ) $getentry = true; } if ($getentry == true) { if (strpos($entry, '.ini')) if (is_file($directory . PATH_DELIMITER . $entry)) { $ret[] = str_replace('.ini', '', $entry); } } } if ($d) $d-> } else { } return $ret; } /** * Parse an .ini file * * Works like {@link parse_ini_file}, except it will take a section like: * * <pre> * [MYVAR] * value1 * value2 * value3 * </pre> * * and return an associative array(MYVAR => array(value1, value2, value3)) * * @param string $filename full path to the ini file * @param bool $process_sections add an associative index * for each section [in brackets] * * @return array * @todo CS cleanup - rename function to PhpDocumentor_parse_ini_file */ function phpDocumentor_parse_ini_file($filename, $process_sections = false) close();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1206 of 1382

147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 '"' 168 169 170 171 172 173 174 { 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224

{ $ini_array = array(); $sec_name = "" ; $lines = @file($filename); if (!$lines) return $lines; foreach ($lines as $line) { // code by Greg Beaver, ignore comments if ($line[0] == ';') continue; $line = trim($line); if ($line == "" ) { continue; } if ($line[0] == "[" && $line[strlen($line) - 1] == "]" ) { $sec_name = substr($line, 1, strlen($line) - 2); } else { if (strpos($line, "=" )) { $pos = strpos($line, "=" ); $property = trim(substr($line, 0, $pos)); // code by Greg Beaver if (substr($property, 0, 1) == '"' && substr($property, -1) == ) { $property = stripcslashes(substr($property, 1, count($property) - 2)); } $value = trim(substr($line, $pos + 1)); if ($value == 'false') $value = false; if ($value == 'true') $value = true; if (substr($value, 0, 1) == '"' &&

substr($value, -1) == '"'

$value = stripcslashes(substr($value, 1, count($value) - 2)); } // done additions if ($process_sections) { if ($sec_name != '') $ini_array[$sec_name][$property] = $value; else $ini_array[$property] = $value; } else { $ini_array[$property] = $value; } } else { // code by Greg Beaver if (trim($line[0]) == ';') continue; if ($process_sections) { $ini_array[$sec_name][] = trim($line); } // done additions } } } return $ini_array; } /** * construct an "array_key_exists()" method * if the runtime PHP version doesn't have one * * @todo CS Cleanup - can't avoid "prefixed by package" error * @todo depend on PHP_Compat for this? */ if (!function_exists('array_key_exists')) { /** * Determines if a given key exists in a given array * * @param mixed $key key to search for * @param array $search the array of keys to search * * @return bool whether or not the key was found * @ignore */ function array_key_exists($key, $search) { foreach ($search as $keys => $nul) { if ($key == $keys) return true; } return false; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1207 of 1382

225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304

} /** * construct an "is_a()" method * if the runtime PHP version doesn't have one * * @todo CS Cleanup - can't avoid "prefixed by package" error * @todo depend on PHP_Compat for this? */ if (!function_exists('is_a')) { /** * Determines if one item "is" an object of the other item * * @param string $classname the class in question * @param string $classquery the "is it a" class * * @return bool whether or not the class "is" one * @ignore */ function is_a($classname, $classquery) { $father = get_parent_class($classname); if (strtolower($father) == strtolower($classquery)) { return true; } elseif (!empty($father)) { return is_a($father, $classquery); } else { return false; } } } /** * Debugging output * * @param string $s the "debug message" string to echo out * * @return void * @todo CS Cleanup - can't avoid "prefixed by package" error */ function debug($s) { echo " $s\n" ; } /** * Returns a formatted var_dump for debugging purposes. * * @param string $s string to display * @param mixed $v unlimited number of variables to display with var_dump() * * @return void */ function fancy_debug($s,$v) { if (isset($GLOBALS['dont_debug']) && $GLOBALS['dont_debug']) return; debug($s."\n\n</pre><blockquote><pre>" ); var_dump($v); if (func_num_args()> 2) { for ($i=2;$i< func_num_args();$i++) { $a = func_get_arg($i); // debug(" "); var_dump($a); } } debug("</pre></blockquote><pre>\n\n" ); } /** * Returns a lower-cased version of get_class for PHP 5 * * get_class() returns case as declared in the file in PHP 5 * * @param object $object the object to get the classname for * * @return string the class name of the given object * @todo CS cleanup - rename function to PhpDocumentor_get_class */ function phpDocumentor_get_class($object)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1208 of 1382

305 306 307 308 309 310 311 312

{ if (is_object($object)) { return strtolower(get_class($object)); } return false; } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1209 of 1382

File Source for EventStack.inc


Documentation for this file is available at EventStack.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * An Event Stack for inter-program communication, particularly for parsing * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2000-2007 Joshua Eichorn * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Joshua Eichorn <[email protected]> * @copyright 2000-2007 Joshua Eichorn * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: EventStack.inc 243937 2007-10-10 02:27:42Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 0.1 * @todo CS cleanup - change package to PhpDocumentor */ /** * An event Stack * * @category ToolsAndUtilities * @package phpDocumentor * @author Joshua Eichorn <[email protected]> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor */ class EventStack { /** * The stack * @var array */ var $stack = array(PARSER_EVENT_NOEVENTS); /** * The number of events in the stack * @var integer */ var $num = 0; /** * Push an event onto the stack

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1210 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

* * @param int $event All events must be constants * * @return void */ function pushEvent($event) { $this-> num = array_push($this-> stack, $event) - 1; } /** * Pop an event from the stack * * @return int An event */ function popEvent() { $this-> num--; return array_pop($this-> stack); } /** * Get the current event * * @return int An event */ function getEvent() { return $this-> stack[$this-> } }

num];

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1211 of 1382

File Source for IntermediateParser.inc


Documentation for this file is available at IntermediateParser.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * The phpDocumentor_IntermediateParser Class * * The Intermediary Data Parser (intermediate between Parse and Converter) * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package phpDocumentor * @author Gregory Beaver <[email protected]> * @copyright 2002-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: IntermediateParser.inc 247821 2007-12-09 06:11:35Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.1 */ /** The phpDocumentor_IntermediateParser Class * * This class performs the work of organizing raw data from the parser in the * format of descendants of the {@link parserElement} class. This is also where * processing of package pages occurs, in * {@link phpDocumentor_IntermediateParser::handleClass()} for class-level * packages and {@link phpDocumentor_IntermediateParser::handleDocBlock()} for * page-level packages. * * Most of the work of this parser goes to matching up * DocBlocks with the elements that they are documenting. Since DocBlocks are * passed before the element they document, the last DocBlock is stored in * {@link phpDocumentor_IntermediateParser::$last} and then placed into the * $docblock parameter of the parserElement * descendant object. * @author Gregory Beaver * @version $Id: IntermediateParser.inc 247821 2007-12-09 06:11:35Z ashnazg $ * @copyright 2002 Gregory Beaver * @package phpDocumentor */ class phpDocumentor_IntermediateParser { /** * @var parserDocBlock */ var $last; /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1212 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

* type of the last parser Element handled * * This is used in handleDocBlock to determine whether a DocBlock is a * page-level DocBlock in conjunction with the {@link parserData::$clean} * var. A page-level DocBlock is alwaysthe first DocBlock in a file, and * must be followed by another DocBlock. The first test is handled by * parserData::$clean, which is set to false on the first encounter of an * element, and the second test is handled by this variable, which must be * equal to "docblock" * @see handleDocBlock() * @var string */ var $lasttype = ''; /** * Name of the class currently being parsed. * It is only used (and only valid) when phpDocumentor_IntermediateParser is * parsing a class * @var string */ var $cur_class = ''; /** * type of the current parser Element being handled * * This is used by {@link HandleEvent()} to set the {@link $lasttype} var, * which is used to detect page-level DocBlocks * @var string */ var $type = ''; /** * set in {@link Setup.inc.php} to the value of the parseprivate commandline * option. If this option is true, elements with an @access private tag * will be parsed and displayed * @tutorial phpDocumentor.howto.pkg#using.command-line.parseprivate * @var boolean */ var $parsePrivate = false; /** * this variable is used to prevent parsing of elements with an @ignore tag * @see $packageoutput * @see $parsePrivate */ var $private_class = false; /** * used to set the output directory * @see setTargetDir() */ var $targetDir; /** * used to set the template base directory * @see setTemplateBase() */ var $templateBase; /** * array of parsed package pages * * used by {@link Convert()} to convert all package pages into output * @var array */ var $package_pages = array(); /** * @var array array of all {@link parserData} containing page information */ var $pages = array(); /** * Put away a page that has been @ignored or @access private if * !{@link $parsePrivate} * * When a page has @access private in its DocBlock, it is placed here * instead of in {@link $pages}, to allow for proper Class parsing. Since * classes and pages are parsed as if they were separate, this array allows * public classes on private pages to retrieve information needed about the * page that holds the class and to {@link addPageIfNecessary()} to the

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1213 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

* $pages array * @var array */ var $privatepages = array(); /** * Keeps track of packages of classes that have parent classes in another * package. Used in automatic linking. * * This array is updated by {@link addPackageParent()}, which is called in * {@link Classes::processChild()} to keep track of classes that descend * from classes in different packages. In other words, if class foo is in * package one, and class bar is in package two, an entry * $package_parents['two'] = 'one' will be made. * @var array Format: packagename => parentpackagename * @see Converter::getLink() */ var $package_parents = array(); /** * Used to determine the category for tutorials. * * <b>WARNING:</b> If more than one category exists, the last category * encountered will overwrite the previous and will raise a big warning * @var array Format: packagename => categoryname */ var $packagecategories = array(); /** * list of all packages encountered while documenting. Used in automatic * linking. * * Converter::getLink() first checks if an ambiguous link is found in the * current package. If not, it then checks in parent packages, and if still * not found, uses this array to check in the rest of the packages before * giving up * @var array Format: array(packagename => 1, packagename => 1,...) * @see Converter::getLink() */ var $all_packages = array(); /** * array of packages to parser and output documentation for, if not all * packages should be documented * * Format:<br /> * array(package1,package2,...)<br /> * or false if not set * * Use this option to limit output similar to ignoring files. If you have * some temporary files that you don't want to specify by name but don't * want included in output, set a package name for all the elements in your * project, and set packageoutput to that name. the default package will be * ignored. Parsing speed does not improve. If you want to ignore files * for speed reasons, use the ignore command-line option * @tutorial phpDocumentor.howto.pkg#using.command-line.packageoutput * @see Io * @var false|array */ var $packageoutput = false; /** * the functions which handle output from the {@link Parser} * @see handleEvent(), handleDocBlock(), handlePage(), handleClass() * @see handleDefine(), handleFunction(), handleMethod(), handleVar() * @see handlePackagePage(), handleInclude(), handleTutorial() */ var $event_handlers = array( 'docblock' => 'handleDocBlock', 'page' => 'handlePage', 'class' => 'handleClass', 'define' => 'handleDefine', 'function' => 'handleFunction', 'method' => 'handleMethod', 'var' => 'handleVar', 'const' => 'handleConst', 'packagepage' => 'handlePackagePage', 'include' => 'handleInclude', 'global' => 'handleGlobal', 'tutorial' => 'handleTutorial', );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1214 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

/** * $data contains parsed structures for the current page being parsed * * In version 1.1+, $data is only used to store the current page information. * All handling of documented elements is handled by the * {@link ProceduralPages} and {@link Classes} classes. * @var parserData */ var $data; /** * set in {@link Setup.inc.php} to the value of the quitemode commandline * option. * * If this option is true, informative output while parsing will not be * displayed (documentation is unaffected) * @var boolean * @tutorial phpDocumentor.howto.pkg#using.command-line.quiet */ var $quietMode = false; /** * set in {@link Setup.inc.php} to the value of the undocumentedElementWarnings commandline * option. * * If this option is true, warnings about certain elements (classes, methods) * that are not documented with DocBlocks will be shown while parsing, * and will also be displayed in the errors.html page * (other documentation is unaffected) * @var boolean * @tutorial phpDocumentor.howto.pkg#using.command-line.undocumentedelements */ var $undocumentedElementWarnings = false; /** * used to keep track of inheritance at the smartest level possible for a * dumb computer * @var Classes */ var $classes = false; /** * used to keep track of all elements in a procedural page. * conflicts with elegance * @since 1.1 * @var ProceduralPages */ var $proceduralpages = false; Handles name

/** * an array of template names indexed by converter name * * For example, if the default HTMLframesConverter is using the DOM/l0l33t * template, the array will be * <code>$converters['frames'] = 'DOM/l0l33t'</code> * @var array Format: array(Convertername1 => templatename) * @see Converter */ var $converters = false; /** * @var string Title of generated documentation, passed to Converters */ var $title = ''; var $uses = array(); var $db_template; /** * Stores parsed CHANGELOG/INSTALL/README files * @var array Format: array(CHANGELOG => contents, * INSTALL => contents, * README => contents) */ var $ric = array(); /** * Flag used to determine whether the last docblock * was a page-level docblock.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1215 of 1382

308 * @var boolean 309 * @access private 310 */ 311 var $_lastDocBlockWasPageLevel = false; 312 313 /** 314 * Flag used to determine whether the Page-level 315 * DocBlock was declared in old or new style 316 * @var boolean 317 * @access private 318 */ 319 var $_oldPageLevel = false; 320 321 /** 322 * sets up basic data structures 323 * @param string Title of generated documentation, passed to Converters 324 * @see $title, $data, $classes, $proceduralpages 325 */ 326 function phpDocumentor_IntermediateParser($title='Generated Documentation') 327 { 328 $this-> title = $title; 329 $this-> data = new parserData; 330 $this-> classes = new Classes; 331 $this-> proceduralpages = new ProceduralPages; 332 } 333 334 /** 335 * Retrieve the relative path. If the path contains "pear/" it will 336 * be used as the base, otherwise the Program_Root string will be used. 337 * @global array uses 'Program_Root' option to replace it with '' for 338 * retrieving the source location of a file 339 * @param string path to file 340 * @return string 341 * @see $sourceLocation 342 * @access private 343 */ 344 function _getSourceLocation($sl, $sourceloc) 345 { 346 global $_phpDocumentor_options; 347 if (empty($sl)) return false; 348 $sl = str_replace('\\','/',$sl); 349 if (strpos($sl,'pear/')) 350 { 351 $sl = substr($sl,strpos($sl,'pear/') + 5); 352 if (dirname($sl) == '.') 353 { 354 return 'PEAR'; 355 } 356 return dirname($sl); 357 } else 358 { 359 if (strpos(str_replace($_phpDocumentor_options['Program_Root'] . PATH_DELIMITER,'',$sourceloc),PATH_DELIMITER) === false) 360 return ''; 361 return dirname(str_replace($_phpDocumentor_options['Program_Root'] . PATH_DELIMITER,'',$sourceloc)); 362 } 363 } 364 365 /** 366 * Guess the package/subpackage based on subdirectory if the --pear option 367 * 368 * A file in pear/dir/file.php will be in package "dir." A file in 369 * pear/dir/subdir/file.php will be in package "dir," subpackage "subdir." 370 * @param string full path of file 371 * @param template-ready source location Program_Root/dir/file.php 372 * @global array uses the 'pear' option to determine whether to guess based 373 * on subdirectory 374 * @tutorial phpDocumentor.howto.pkg#using.command-line.pear 375 */ 376 function _guessPackage($path, $sourceloc) 377 { 378 global $_phpDocumentor_setting; 379 if ($_phpDocumentor_setting['pear']) 380 { 381 $subpath = explode(PATH_DELIMITER, $this-> _getSourceLocation($path, $sourceloc)); 382 if (!empty($subpath[0])) 383 { // can only have package and subpackage in this version 384 $package = $subpath[0];

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1216 of 1382

385 $subpackage = ''; 386 if (isset($subpath[1])) $subpackage = $subpath[1]; 387 return array($package,$subpackage); 388 } else return array($this-> package, $this-> subpackage); 389 } else return array($this-> package, $this-> subpackage); 390 } 391 392 /** 393 * handles post-parsing of include/require/include_once/require_once 394 * 395 * This function sets {@link $data}->clean to false to tell the 396 * phpDocumentor_IntermediateParser that a page-level DocBlock can't be 397 * found after this point on this page. It then sets the package 398 * to be the same as the page, and adds itself to the 399 * {@link ProceduralPages} class 400 * @param integer $event Event number from {@link Parser.inc} 401 * @param parserInclude $data 402 */ 403 function handleInclude($event,$data) 404 { 405 if ($this-> _lastDocBlockWasPageLevel) 406 { 407 addWarning(PDERROR_DOCBLOCK_CONFLICT, $data-> getName(), $data-> getValue()); 408 if (!$this-> _oldPageLevel) 409 { 410 unset($this-> last); 411 } 412 } 413 $this-> _lastDocBlockWasPageLevel = false; 414 $this-> data-> clean = false; 415 // page was @ignored 416 if ($this-> private_page) 417 { 418 unset($this-> last); 419 return; 420 } 421 if (empty($this-> last)) 422 { 423 if (isset($this-> db_template)) 424 { 425 // use the docblock template 426 $this-> last = phpDocumentor_clone($this-> db_template); 427 } 428 else 429 { 430 // we don't have a docblock, create an empty one to get rid of errors 431 $this-> last = new parserDocblock(); 432 } 433 } 434 // $this->last->setLineNumber($data->getLineNumber()); 435 if ($this-> last-> getKeyword('ignore')) 436 { 437 $this-> last = false; 438 return; 439 // addWarning(PDERROR_IGNORE_TAG_IGNORED,'include',$data->getName().'('.$data>getValue().')'); 440 } 441 442 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'include'); 443 $data-> setDocBlock($this-> last); 444 $this-> proceduralpages-> addInclude($data); 445 $this-> last = false; 446 } 447 448 /** 449 * handles post-parsing of global variables 450 * 451 * This function sets {@link $data}->clean to false to tell the 452 * phpDocumentor_IntermediateParser that a page-level DocBlock can't be 453 * found after this point on this page. It then sets the package 454 * to be the same as the page, and adds itself to the 455 * {@link ProceduralPages} class 456 * @param integer $event Event number from {@link Parser.inc} 457 * @param parserGlobal $data 458 */ 459 function handleGlobal($event,$data) 460 { 461 if ($this-> _lastDocBlockWasPageLevel) 462 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1217 of 1382

463 addWarning(PDERROR_DOCBLOCK_CONFLICT, 'global variable', $data-> getName()); 464 if (!$this-> _oldPageLevel) 465 { 466 unset($this-> last); 467 } 468 } 469 $this-> _lastDocBlockWasPageLevel = false; 470 $this-> data-> clean = false; 471 if ($this-> private_page) 472 { 473 unset($this-> last); 474 return; 475 } 476 if (empty($this-> last)) 477 { 478 if (isset($this-> db_template)) 479 { 480 // use the docblock template 481 $this-> last = phpDocumentor_clone($this-> db_template); 482 } 483 else 484 { 485 // we don't have a docblock, create an empty one to get rid of errors 486 $this-> last = new parserDocblock(); 487 } 488 } 489 // $this->last->setLineNumber($data->getLineNumber()); 490 if ($this-> last-> getKeyword('ignore')) 491 { 492 addWarning(PDERROR_IGNORE_TAG_IGNORED,'global variable - just don\'t document the',$data-> getName()); 493 $this-> last = false; 494 return; 495 } 496 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'global'); 497 $data-> setDocBlock($this-> last); 498 if ($data-> docblock-> getKeyword('name')) 499 { 500 $a = $data-> docblock-> getKeyword('name'); 501 if (is_object($a)) $a = $a-> value; 502 $data-> setName($a); 503 } 504 $this-> proceduralpages-> addGlobal($data); 505 $this-> last = false; 506 } 507 508 /** 509 * handles post-parsing of Package-level documentation pages. 510 * 511 * sets the {@link $package_pages}[$data->package] to $data 512 * @param integer $event Event number from {@link Parser.inc} 513 * @param parserPackagePage $data 514 */ 515 function handlePackagePage($event,$data) 516 { 517 $this-> package_pages[$data-> package] = & $data; 518 $this-> last = false; 519 } 520 521 /** 522 * handle post-parsing of Tutorials. 523 * 524 * This adds the parsed tutorial to the tutorial tree 525 * @uses $tutorials sets the value of tutorials to parameter $data 526 * @param integer $event Event Number 527 * @param parserTutorial $data 528 * @since 1.2 529 */ 530 function handleTutorial($event,$data) 531 { 532 if (isset($this-> packagecategories[$data-> package])) 533 { 534 $data-> category = $this-> packagecategories[$data-> package]; 535 } else 536 { 537 $data-> category = $GLOBALS['phpDocumentor_DefaultCategoryName']; 538 } 539 $this-> tutorials[$data-> package][$data-> subpackage][$data> tutorial_type][$data-> name] = $data;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1218 of 1382

540 } 541 542 /** 543 * handles post-parsing of class vars 544 * 545 * This function sets up a @var tag if none is found, and aligns $data's 546 * $path var and packages to match the parent object 547 * @param integer $event Event number from {@link Parser.inc} 548 * @param parserVar $data 549 */ 550 function handleVar($event,$data) 551 { 552 global $_phpDocumentor_setting; 553 if ($this-> private_class) 554 { 555 unset($this-> last); 556 return; 557 } 558 if (empty($this-> last)) 559 { 560 if (isset($this-> db_template)) 561 { 562 // use the docblock template 563 $this-> last = phpDocumentor_clone($this-> db_template); 564 } 565 else 566 { 567 // we don't have a docblock, create an empty one to get rid of errors 568 $this-> last = new parserDocblock(); 569 } 570 } 571 // $this->last->setLineNumber($data->getLineNumber()); 572 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'var'); 573 $this-> last-> updateModifiers($data-> getModifiers()); 574 575 if ($this-> last-> getKeyword('ignore')) 576 { 577 $this-> last = false; 578 return; 579 // addWarning(PDERROR_IGNORE_TAG_IGNORED,'var',$this->cur_class.'::'.$data>getName()); 580 } 581 if (!$this-> last-> var) 582 { 583 $this-> last-> addVar('mixed',new parserStringWithInlineTags); 584 } 585 586 if ($_phpDocumentor_setting['pear']) 587 { 588 if (strpos($data-> getName(), '_') == 1 && ! $this-> last> getKeyword('access')) 589 { 590 addWarning(PDERROR_PRIVATE_ASSUMED,'class variable',$data-> class.'::'.$data> getName()); 591 $this-> last-> addKeyword('access','private'); 592 $data-> setDocBlock($this-> last); 593 } 594 } 595 $data-> setDocBlock($this-> last); 596 $data-> path = $this-> data-> parent-> path; 597 $this-> classes-> addVar($data); 598 $this-> last = false; 599 } 600 601 /** 602 * handles post-parsing of class constants 603 * 604 * This function aligns $data's 605 * $path var and packages to match the parent object 606 * @param integer $event Event number from {@link Parser.inc} 607 * @param parserVar $data 608 */ 609 function handleConst($event,$data) 610 { 611 global $_phpDocumentor_setting; 612 if ($this-> private_class) 613 { 614 unset($this-> last); 615 return;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1219 of 1382

616 } 617 if (empty($this-> last)) 618 { 619 if (isset($this-> db_template)) 620 { 621 // use the docblock template 622 $this-> last = phpDocumentor_clone($this-> db_template); 623 } 624 else 625 { 626 // we don't have a docblock, create an empty one to get rid of errors 627 $this-> last = new parserDocblock(); 628 } 629 } 630 // $this->last->setLineNumber($data->getLineNumber()); 631 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'const'); 632 633 if ($this-> last-> getKeyword('ignore')) 634 { 635 $this-> last = false; 636 return; 637 // addWarning(PDERROR_IGNORE_TAG_IGNORED,'var',$this->cur_class.'::'.$data>getName()); 638 } 639 $data-> setDocBlock($this-> last); 640 $data-> path = $this-> data-> parent-> path; 641 $this-> classes-> addConst($data); 642 $this-> last = false; 643 } 644 645 /** 646 * handles post-parsing of class methods 647 * 648 * This function first aligns $data's path and package to match the parent 649 * object, and also aligns the docblock's @param, @global, and @staticvar 650 * tags with the information parsed from the method source code. It also 651 * checks to see if the method is a constructor and sets the $isConstructor 652 * flag. If source code has been parsed by a {@}source} tag, the source is 653 * added to its docblock 654 * 655 * Finally, it adds the method to the {@link Classes} class. 656 * @param integer $event Event number from {@link Parser.inc} 657 * @param parserMethod $data 658 */ 659 function handleMethod($event,$data) 660 { 661 global $_phpDocumentor_setting; 662 if ($this-> private_class) 663 { 664 unset($this-> last); 665 return; 666 } 667 668 if (empty($this-> last)) 669 { 670 if ($this-> undocumentedElementWarnings) 671 { 672 addWarning(PDERROR_UNDOCUMENTED_ELEMENT,'Method',$data-> getName(),'method'); 673 } 674 if (isset($this-> db_template)) 675 { 676 // use the docblock template 677 $this-> last = phpDocumentor_clone($this-> db_template); 678 } 679 else 680 { 681 // we don't have a docblock, create an empty one to get rid of errors 682 $this-> last = new parserDocblock(); 683 } 684 } 685 // $this->last->setLineNumber($data->getLineNumber()); 686 if ($this-> last-> getKeyword('ignore')) 687 { 688 $this-> last = false; 689 return; 690 // addWarning(PDERROR_IGNORE_TAG_IGNORED,'method',$this->cur_class.'::'.$data>getName()); 691 } 692 $this-> last-> overridePackage($this-> category,$this-> package,$this-

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1220 of 1382

> subpackage,$data-> getName(),'method'); 693 if ($data-> hasSource()) 694 { 695 $this-> last-> setSource($data-> getSource(), $data-> getClass()); 696 } 697 foreach($data-> listParams() as $key => $param) 698 { 699 $update_params[$key] = $param; 700 } 701 foreach($data-> listGlobals() as $param) 702 { 703 $update_globals[] = $param[1]; 704 } 705 foreach($data-> listStatics() as $param) 706 { 707 $update_statics[] = $param[0]; 708 } 709 if (isset($update_params)) 710 $this-> last-> updateParams($update_params); 711 if (isset($update_globals)) 712 $this-> last-> updateGlobals($update_globals); 713 if (isset($update_statics)) 714 $this-> last-> updateStatics($update_statics); 715 $this-> last-> updateModifiers($data-> getModifiers()); 716 unset($update_params); 717 unset($update_globals); 718 unset($update_statics); 719 720 if ($data-> getName() == $this-> cur_class) $data-> setConstructor(); 721 if ($data-> getName() == '__construct') { 722 $data-> setConstructor(); 723 } 724 if ($data-> getName() == '__destruct') { 725 $data-> setDestructor(); 726 } 727 728 if ($_phpDocumentor_setting['pear']) 729 { 730 if (strpos($data-> getName(), '_') === 0 && substr($data-> getName(), 1) == $data-> class) 731 { // is destructor 732 $data-> setDestructor(); 733 } elseif (strpos($data-> getName(), '_') === 0 && ! $this-> last> getKeyword('access')) 734 { 735 if (strpos($data-> getName(), '__') !== 0) { 736 addWarning(PDERROR_PRIVATE_ASSUMED,'method',$data-> class.'::'.$data> getName().'()'); 737 $this-> last-> addKeyword('access','private'); 738 $data-> setDocBlock($this-> last); 739 } 740 } 741 } 742 $data-> setDocBlock($this-> last); 743 $data-> path = $this-> data-> parent-> path; 744 $this-> classes-> addMethod($data); 745 $this-> last = false; 746 } 747 748 /** 749 * handles post-parsing of functions 750 * 751 * This function sets {@link $data}->clean to false to tell the 752 * phpDocumentor_IntermediateParser that a page-level DocBlock can't be 753 * found after this point on this page. It then sets the package to be the 754 * same as the page, aligns the docblock's @param, @global, and @staticvar 755 * tags with the information parsed from the function source code. 756 * 757 * If source code has been parsed by a {@}source} tag, the source is added 758 * to its docblock, and then the parserFunction adds itself to the 759 * {@link ProceduralPages} class 760 * @param integer $event Event number from {@link Parser.inc} 761 * @param parserFunction $data 762 */ 763 function handleFunction($event,$data) 764 { 765 if ($this-> _lastDocBlockWasPageLevel) 766 { 767 addWarning(PDERROR_DOCBLOCK_CONFLICT, 'function', $data-> getName()); 768 if (!$this-> _oldPageLevel)

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1221 of 1382

769 { 770 unset($this-> last); 771 } 772 } 773 $this-> _lastDocBlockWasPageLevel = false; 774 $this-> data-> clean = false; 775 if ($this-> private_page) 776 { 777 unset($this-> last); 778 return; 779 } 780 781 if (empty($this-> last)) 782 { 783 if (isset($this-> db_template)) 784 { 785 // use the docblock template 786 $this-> last = phpDocumentor_clone($this-> db_template); 787 } 788 else 789 { 790 // we don't have a docblock, create an empty one to get rid of errors 791 $this-> last = new parserDocblock(); 792 } 793 } 794 // $this->last->setLineNumber($data->getLineNumber()); 795 if ($this-> last-> getKeyword('ignore')) 796 { 797 unset($this-> last); 798 return; 799 } 800 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'function'); 801 802 foreach($data-> listParams() as $key => $param) 803 { 804 $update_params[$key] = $param; 805 } 806 foreach($data-> listGlobals() as $param) 807 { 808 $update_globals[] = $param[1]; 809 } 810 foreach($data-> listStatics() as $param) 811 { 812 $update_statics[] = $param[0]; 813 } 814 if (isset($update_params)) 815 $this-> last-> updateParams($update_params); 816 if (isset($update_globals)) 817 $this-> last-> updateGlobals($update_globals); 818 if (isset($update_statics)) 819 $this-> last-> updateStatics($update_statics); 820 unset($update_params); 821 unset($update_globals); 822 unset($update_statics); 823 824 if ($data-> hasSource()) 825 { 826 $this-> last-> setSource($data-> getSource()); 827 } 828 if (count($this-> last-> params) == 1 && ! count($data-> listParams())) 829 { 830 // if the function has no parameters, and 1 @param, add it to the list as optional, default value is description from @param 831 $pars = $this-> last-> listParams(); 832 $data-> addParam($pars[0]['var'],$pars[0]['data']-> getString()); 833 } 834 $data-> setDocBlock($this-> last); 835 $this-> proceduralpages-> addFunction($data); 836 $this-> last = false; 837 } 838 839 /** 840 * handles post-parsing of defines 841 * 842 * This function sets {@link $data}->clean to false to tell the 843 * phpDocumentor_IntermediateParser that a page-level DocBlock can't be 844 * found after this point on this page. It then sets the package to be the 845 * same as the page and adds itself to the {@link ProceduralPages} class 846 * @param integer $event Event number from {@link Parser.inc}

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1222 of 1382

847 * @param parserDefine $data 848 */ 849 function handleDefine($event,$data) 850 { 851 if ($this-> _lastDocBlockWasPageLevel) 852 { 853 addWarning(PDERROR_DOCBLOCK_CONFLICT, 'define', $data-> getName()); 854 if (!$this-> _oldPageLevel) 855 { 856 unset($this-> last); 857 } 858 } 859 $this-> _lastDocBlockWasPageLevel = false; 860 $this-> data-> clean = false; 861 if ($this-> private_page) 862 { 863 unset($this-> last); 864 return; 865 } 866 if (empty($this-> last)) 867 { 868 if (isset($this-> db_template)) 869 { 870 // use the docblock template 871 $this-> last = phpDocumentor_clone($this-> db_template); 872 } 873 else 874 { 875 // we don't have a docblock, create an empty one to get rid of errors 876 $this-> last = new parserDocblock(); 877 } 878 } 879 // $this->last->setLineNumber($data->getLineNumber()); 880 if ($this-> last-> getKeyword('ignore')) 881 { 882 unset($this-> last); 883 return; 884 } 885 886 $this-> last-> overridePackage($this-> category,$this-> package,$this> subpackage,$data-> getName(),'define'); 887 $data-> setDocBlock($this-> last); 888 $this-> proceduralpages-> addDefine($data); 889 $this-> last = false; 890 } 891 892 /** 893 * handles post-parsing of classes 894 * 895 * This function sets {@link $data}->clean to false to tell the 896 * phpDocumentor_IntermediateParser that a page-level DocBlock can't be 897 * found after this point on this page. It sets {@link $cur_class} to its 898 * name, and if an @ignore tag is found in the DocBlock, it sets 899 * {@link $private_class} to true, to prevent post-parsing of any of the 900 * class's vars or methods. Then it checks for the existence of a package 901 * page for the class's package 902 * @param integer $event Event number from {@link Parser.inc} 903 * @param parserClass $data 904 */ 905 function handleClass($event,$data) 906 { 907 global $_phpDocumentor_setting; 908 if ($data-> isInterface()) 909 { 910 $objectType = 'interface'; 911 } 912 else 913 { 914 $objectType = 'class'; 915 } 916 if ($this-> _lastDocBlockWasPageLevel) 917 { 918 if (!$this-> _oldPageLevel) 919 { 920 addWarning(PDERROR_DOCBLOCK_GOES_CLASS, $data-> getName()); 921 $doc = new parserDocBlock; 922 $doc-> category = $this-> category; 923 $doc-> package = $this-> package; 924 $doc-> subpackage = $this-> subpackage; 925 if ($_phpDocumentor_setting['sourcecode']) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1223 of 1382

926 927 > 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 > > 955 > 956 957 958 959 960 > > 961 > 962 963 964 965 > 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 > 988 989 990 991 992 993 994 995 996

parent->

data-> source); } $this-> data-> setDocBlock($doc); unset($doc); if ($this-> last) { $this-> last-> cantSource(); } }

$doc-> $doc->

canSource(); addFileSource($this->

parent->

path, $this->

data-

} $this-> _lastDocBlockWasPageLevel = false; $this-> data-> clean = false; if (empty($this-> last)) { if ($this-> undocumentedElementWarnings) { addWarning(PDERROR_UNDOCUMENTED_ELEMENT,'Class',$data-> getName(),'Class'); } if (isset($this-> db_template)) { // use the docblock template $this-> last = phpDocumentor_clone($this-> db_template); } else { // we don't have a docblock, create an empty one to get rid of errors $this-> last = new parserDocblock(); } list($this-> last-> package, $this-> last-> subpackage) = $this_guessPackage($this-> data-> parent-> path, $this-> data-> parentgetSourceLocation('dummy')); addWarning(PDERROR_NO_PACKAGE_TAG,$objectType,$data-> getName(),$this-> lastpackage); } else { if (!$this-> last-> getExplicitPackage()) { list($this-> last-> package, $this-> last-> subpackage) = $this_guessPackage($this-> data-> parent-> path, $this-> data-> parentgetSourceLocation('dummy')); addWarning(PDERROR_NO_PACKAGE_TAG,$objectType,$data-> getName(),$thislast-> package); } else { if (isset($this-> packagecategories[$this-> package]) && $this-> packagecategories[$this-> package] != $thiscategory) addWarning(PDERROR_PACKAGECAT_SET,$this-> package, $this-> packagecategories[$this-> package], $this-> category); $this-> packagecategories[$this-> package] = $this-> category; } } $this-> last-> updateModifiers($data-> getModifiers()); // $this->last->setLineNumber($data->getLineNumber()); $data-> setDocBlock($this-> last); $this-> cur_class = $name = $data-> getName(); if ($this-> last-> getKeyword('ignore')) { $this-> private_class = true; unset($this-> last); return; } $data-> path = $this-> data-> parent-> path; $this-> classes-> addClass($data); $this-> private_class = false; if ($this-> last-> package) { $this-> parsePackagePage($this-> last-> package, $this-> data-> parentgetPath()); } $this-> last = false; } /** * handles post-parsing of procedural pages * * this event is called at the start of a new page, before the Parser knows * whether the page will contain any procedural pages or not

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1224 of 1382

997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076

* @param integer $event Event number from {@link Parser.inc} * @param parserPage $data */ function handlePage($event,$data) { $type = 'page'; $this-> private_page = false; $this-> data = new parserData; $data-> category = $this-> category = $GLOBALS['phpDocumentor_DefaultCategoryName']; $this-> package = $GLOBALS['phpDocumentor_DefaultPackageName']; $this-> subpackage = ''; $this-> proceduralpages-> addPage($data); $this-> data-> setParent($data); $this-> pages[$data-> getPath()] = $this-> data; $this-> classes-> nextFile($data-> getPath()); $this-> packageoutput = $data-> getPackageOutput(); } /** * handles post-parsing of DocBlocks * * This function sets {@link $last} to the DocBlock represented by $data, to * allow the next documentable element passed to * phpDocumentor_IntermediateParser to link the DocBlock into its $docblock * property. This function also checks for two special cases of DocBlocks: * <ol> * <li>First DocBlock in the file contains a @package tag</li> * <li>First DocBlock in the file is immediately followed by another * DocBlock</li> * </ol> * In both cases, the function extracts this tag and uses it as the * page-level package. If the @package tag is in the DocBlock of an * element (function, global variable, whatever) that isn't a page-level * DocBlock, a warning will be raised to notify the author that a @package * tag belongs in a page-level DocBlock. * * <b>New</b> in version 1.2.2, if the first DocBlock in a file contains * a @package tag, it is a page-level DocBlock. * * If the DocBlock is page-level, it is processed with * {@link _processPageLevelDocBlock} * * Finally, the function replaces the old parserPage in * {@link parserData::$data}->parent with the new one containing information * from the DocBlock by calling {@link addPage()}, and checks for * package-level docs. * @param integer $event Event number from {@link Parser.inc} * @param parserDocBlock $data */ function handleDocBlock($event,$data) { $type = 'docblock'; $data-> postProcess(); // Zend desc support if ($tdesc = $data-> getKeyword('desc')) { $data-> setShortDesc($tdesc); unset($data-> tags['desc']); } $this-> _lastDocBlockWasPageLevel = false; // 1st docblock in file, check for @package if ($this-> data-> isClean() && !isset( $this-> last)) { if ($data-> getExplicitPackage()) { // new with 1.2.2: // if the first docblock in a file // contains a @package tag, then it is // a page-level docblock $this-> _processPageLevelDocBlock($data); $this-> _lastDocBlockWasPageLevel = true; $this-> all_packages[$data-> package] = 1; $this-> last = $data; return; } $doc = new parserDocBlock; $doc-> category = $this-> category; $doc-> package = $this-> package; $doc-> subpackage = $this-> subpackage; $this-> data-> setDocBlock($doc);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1225 of 1382

1077 $this-> proceduralpages-> addPagePackage($this-> data-> parent> getPath(),$this-> package,$this-> subpackage); 1078 unset($doc); 1079 } 1080 // 2nd docblock in a row, and it's at the top of the file, page-level docblock 1081 if ($this-> lasttype == "docblock" && $this-> data-> isClean()) 1082 { 1083 $this-> _processPageLevelDocBlock($this-> last); 1084 $this-> _oldPageLevel = true; 1085 $this-> _lastDocBlockWasPageLevel = false; 1086 } 1087 $this-> all_packages[$data-> package] = 1; 1088 $this-> last = $data; 1089 } 1090 1091 /** 1092 * Process a Page-level DocBlock 1093 * 1094 * First, it checks for an @ignore tag, 1095 * and if found, calls {@link ProceduralPages::ignorePage()}. An @ignore 1096 * tag in a page-level DocBlock will ignore all functions, defines, global 1097 * variables, and includes. It will not ignore classes! The function next 1098 * checks for an @access private, and if --parseprivate is off, performs the 1099 * same actions as @ignore. 1100 * Next, it checks for the @name tag, which is used to rename the page. 1101 * This is also a PEAR compatibility issue, and may not be very useful in 1102 * the long run. Documentation is best when it refers to real entities in 1103 * the package, and not to aliases. 1104 * @access private 1105 */ 1106 function _processPageLevelDocBlock($data) 1107 { 1108 global $_phpDocumentor_setting; 1109 // can only have 1 package-level docblock, others are ignored 1110 if (!$this-> data-> isClean()) 1111 { 1112 return; 1113 } 1114 $this-> data-> clean = false; 1115 $this-> data-> explicitDocBlock(); 1116 $data-> canSource(); 1117 if ($_phpDocumentor_setting['sourcecode']) 1118 { 1119 $data-> addFileSource($this-> data-> parent-> path, $this-> data> parent-> source); 1120 } 1121 if (!$data-> getExplicitPackage()) 1122 { 1123 list($data-> package,$data-> subpackage) = $this-> _guessPackage($this> data-> parent-> getPath(), $this-> data-> parent-> getSourceLocation('dummy')); 1124 addWarning(PDERROR_NO_PACKAGE_TAG,'file',$this-> data-> parent> getPath(),$this-> last-> package); 1125 } 1126 if (isset($this-> packagecategories[$this-> package]) 1127 && $this-> packagecategories[$this-> package] != $data-> category) 1128 addWarning(PDERROR_PACKAGECAT_SET,$this-> package, 1129 $this-> packagecategories[$this-> package], 1130 $data-> category); 1131 $this-> packagecategories[$this-> package] = $data-> category; 1132 $this-> category = $this-> data-> parent-> category = $data-> category; 1133 $this-> packagecategories[$this-> package] = $this-> category; 1134 $this-> subpackage = $this-> data-> parent-> subpackage = $data-> subpackage; 1135 $this-> data-> setDocBlock($data); 1136 if ($data-> getKeyword('ignore')) 1137 { 1138 $this-> proceduralpages-> ignorePage($this-> data-> parent); 1139 $this-> private_page = true; 1140 unset($this-> last); 1141 $this-> privatepages[$this-> data-> parent-> getPath()] = $this-> data; 1142 unset($this-> pages[$this-> data-> parent-> getPath()]); 1143 return; 1144 } 1145 $this-> package = $this-> data-> parent-> package = $data-> package; 1146 $this-> subpackage = $this-> data-> parent-> subpackage = $data-> subpackage; 1147 $this-> proceduralpages-> addPagePackage($this-> data-> parent> getPath(),$this-> package,$this-> subpackage); 1148 if ($access = $data-> getKeyword('access')) 1149 { 1150 if (is_object($access) && ( $access-> getString() == 'private') && (!$this-> parsePrivate))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1226 of 1382

1151 { 1152 $this-> proceduralpages-> ignorePage($this-> data-> parent); 1153 $this-> private_page = true; 1154 unset($this-> last); 1155 $this-> privatepages[$this-> data-> parent-> getPath()] = $this> data; 1156 unset($this-> pages[$this-> data-> parent-> getPath()]); 1157 return; 1158 } 1159 } 1160 if ($data-> getKeyword('name')) 1161 { 1162 $a = $data-> getKeyword('name'); 1163 if (is_object($a)) $a = $a-> value; 1164 $this-> data-> parent-> setFile($a); 1165 $this-> proceduralpages-> setName($a); 1166 } 1167 $this-> addPage($this-> data-> parent, $this-> data-> parent-> getPath()); 1168 if ($this-> package) 1169 { 1170 $this-> parsePackagePage($this-> package, $this-> data-> parent> getPath()); 1171 } 1172 } 1173 1174 /** 1175 * Backward-compatibility only, use the new tutorials for more power 1176 * @tutorial tutorials.pkg 1177 * @param string package name of package file to parse 1178 * @param string directory of file that contains package name 1179 */ 1180 function parsePackagePage($package, $path) 1181 { 1182 if (!isset($this-> package_pages[$package])) 1183 { 1184 if (file_exists(dirname($path) . SMART_PATH_DELIMITER . $package . '.html')) 1185 { 1186 if ($this-> quietMode === false) 1187 { 1188 phpDocumentor_out("Reading package-level file " .$package . '.html'); 1189 flush(); 1190 } 1191 $fp = fopen(dirname($path) . SMART_PATH_DELIMITER . $package . '.html',"r" ); 1192 $ret = fread($fp,filesize(dirname($path) . SMART_PATH_DELIMITER . $package . '.html')); 1193 fclose($fp); 1194 unset($fp); 1195 if ($this-> quietMode === false) 1196 { 1197 phpDocumentor_out(" -- Parsing File\n" ); 1198 flush(); 1199 } 1200 $pageParser = new ppageParser; 1201 $tempp = $this-> package; 1202 $lp = $this-> last; 1203 $pageParser-> subscribe('*',$this); 1204 $pageParser-> parse($ret,false,$package); 1205 $this-> package = $tempp; 1206 $this-> last = $lp; 1207 unset($tempp); 1208 unset($pageParser); 1209 } 1210 } 1211 } 1212 1213 /** 1214 * called via {@link Parser::parse()} and Parser's inherited method 1215 * {@link Publisher::publishEvent()} 1216 * 1217 * $event is one of the PHPDOC constants from Parser.inc. If it is not 1218 * PHPDOCUMENTOR_EVENT_NEWSTATE, then a function name is retrieved from the 1219 * {@link $event_handlers} array and called to handle the $data 1220 * @param integer $event event number from {@link Parser.inc} 1221 * @param mixed $data if $event is {@link PHPDOCUMENTOR_EVENT_NEWSTATE}, $data is a {@link PHP_DOC_EVENT_END_PAGE} or {@link STATE_END_CLASS}, 1222 * otherwise $data is either a {@link parserDocBlock}, {@link parserPage} or descendant of {@link parserElement} 1223 * @global array we use 'sourcecode' to determine whether to highlight the source

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1227 of 1382

1224 * of the current file if it has no file-level docblock 1225 */ 1226 function HandleEvent($event,$data) 1227 { 1228 global $_phpDocumentor_setting; 1229 global $phpDocumentor_DefaultPackageName, $phpDocumentor_DefaultCategoryName; 1230 if (empty($this-> packagecategories)) 1231 $this-> packagecategories[$phpDocumentor_DefaultPackageName] = $phpDocumentor_DefaultCategoryName; 1232 if ($event == PHPDOCUMENTOR_EVENT_NEWSTATE) 1233 { 1234 if ($data == STATE_END_CLASS) 1235 { 1236 } elseif ($data == PHPDOCUMENTOR_EVENT_END_PAGE) 1237 { 1238 if (!$this-> private_page) 1239 { 1240 $this-> all_packages[$this-> package] = 1; 1241 if (!$this-> data-> hasExplicitDocBlock()) 1242 { 1243 $doc = $this-> data-> docblock; 1244 if (!$this-> data-> docblock) 1245 { 1246 $doc = new parserDocBlock; 1247 } 1248 if ($_phpDocumentor_setting['sourcecode']) 1249 { 1250 $doc-> canSource(); 1251 $doc-> addFileSource($this-> data-> parent-> path, $this> data-> parent-> source); 1252 } 1253 list($doc-> package,$doc-> subpackage) = $this> _guessPackage($this-> data-> parent-> getPath(), $this-> data-> parent> getSourceLocation('dummy')); 1254 addWarning(PDERROR_NO_PAGE_LEVELDOCBLOCK,$this-> data-> parent> getPath()); 1255 $this-> data-> setDocBlock($doc); 1256 $this-> proceduralpages-> addPage($this-> data-> parent,$doc> package,$doc-> subpackage); 1257 } 1258 $this-> pages[$this-> data-> parent-> getPath()] = $this-> data; 1259 } 1260 $this-> private_page = false; 1261 $this-> private_class = false; 1262 if (isset($this-> db_template)) 1263 { 1264 addWarning(PDERROR_DB_TEMPLATE_UNTERMINATED); 1265 } 1266 unset($this-> db_template); 1267 unset($this-> last); 1268 } elseif ($data == PHPDOCUMENTOR_EVENT_END_DOCBLOCK_TEMPLATE) 1269 { 1270 unset($this-> db_template); 1271 } 1272 //echo $this->state_lookup[$data] . "\n"; 1273 //echo $data."\n"; 1274 } 1275 else 1276 { 1277 if ($event == PHPDOCUMENTOR_EVENT_README_INSTALL_CHANGELOG) 1278 { 1279 $this-> ric[$data[0]] = $data[1]; 1280 return; 1281 } 1282 if ($event == PHPDOCUMENTOR_EVENT_DOCBLOCK_TEMPLATE) 1283 { 1284 $data-> postProcess(); 1285 $this-> db_template = $data; 1286 $this-> _lastDocBlockWasPageLevel = false; 1287 // 2nd docblock in a row, and it's at the top of the file, page-level docblock 1288 if ($this-> type == "docblock" && $this-> data> isClean()) 1289 { 1290 // can only have 1 package-level docblock, others are ignored 1291 $this-> data-> clean = false; 1292 if ($this-> last-> getKeyword('ignore')) 1293 { 1294 $this-> proceduralpages-> ignorePage($this-> data-> parent); 1295 $this-> private_page = true; 1296 unset($this-> last);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1228 of 1382

1297 $this-> privatepages[$this-> data-> parent-> getPath()] = $this> data; 1298 unset($this-> pages[$this-> data-> parent-> getPath()]); 1299 return; 1300 } 1301 $this-> data-> setDocBlock($this-> last); 1302 $this-> package = $this-> data-> parent-> package = $this-> last> package; 1303 $this-> subpackage = $this-> data-> parent-> subpackage = $this> last-> subpackage; 1304 $this-> proceduralpages-> addPagePackage($this-> data-> parent> getPath(),$this-> package,$this-> subpackage); 1305 if ($access = $this-> last-> getKeyword('access')) 1306 { 1307 if (is_object($access) && ( $access-> getString() == 'private') && (! $this-> parsePrivate)) 1308 { 1309 addWarning(PDERROR_PARSEPRIVATE, $this-> data-> parent> getPath()); 1310 $this-> proceduralpages-> ignorePage($this-> data-> parent); 1311 $this-> private_page = true; 1312 unset($this-> last); 1313 $this-> privatepages[$this-> data-> parent-> getPath()] = $this-> data; 1314 unset($this-> pages[$this-> data-> parent-> getPath()]); 1315 return; 1316 } 1317 } 1318 if ($this-> last-> getKeyword('name')) 1319 { 1320 $a = $this-> last-> getKeyword('name'); 1321 if (is_object($a)) $a = $a-> value; 1322 $this-> data-> parent-> setFile($a); 1323 $this-> proceduralpages-> setName($a); 1324 } 1325 $this-> addPage($this-> data-> parent, $this-> data-> parent> getPath()); 1326 if ($this-> package) 1327 { 1328 $this-> parsePackagePage($this-> package, $this-> data-> parent> getPath()); 1329 } 1330 } 1331 unset($this-> last); 1332 } else 1333 { 1334 $this-> lasttype = $this-> type; 1335 $type = $data-> getType(); 1336 // fancy_debug($type,$data); 1337 if (($type != 'page') && ( $type != 'docblock') && ( $type != 'packagepage') && ( $type != 'tutorial')) 1338 { 1339 $data-> setFile($this-> data-> parent-> getFile()); 1340 } 1341 $this-> type = $type; 1342 //echo $type . "\n"; 1343 1344 if (isset($this-> event_handlers[$type])) 1345 { 1346 $handle = $this-> event_handlers[$type]; 1347 $this-> $handle($event,$data); 1348 } 1349 } 1350 } 1351 } 1352 1353 /** 1354 * Replaces the {@link parserPage} represented by $this->pages[$path] with 1355 * $page 1356 * 1357 * Called by {@link addPageIfNecessary(), handleDocBlock()} and 1358 * {@link ProceduralPages::setupPages()}, this method first checks to see if 1359 * the page has been added. If not, it assumes that the page has either 1360 * been @ignored or set with @access private with --parseprivate off, and 1361 * returns {@link addPrivatePage()}. Otherwise, it sets the pages[$path] to 1362 * be the parserPage $page and sets the package and subpackage to that of 1363 * $page 1364 * @see $pages 1365 * @param parserPage 1366 * @param string full path to the file

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1229 of 1382

1367 */ 1368 function addPage($page, $path) 1369 { 1370 if (!isset($this-> pages[$path])) return $this-> addPrivatePage($page, $path); 1371 $this-> pages[$path]-> setParent($page); 1372 if ($page-> package != $GLOBALS['phpDocumentor_DefaultPackageName']) 1373 { 1374 if (!$this-> pages[$path]-> docblock) 1375 { 1376 $docblock = new parserDocBlock; 1377 $docblock-> package = $page-> package; 1378 $docblock-> subpackage = $page-> subpackage; 1379 $this-> pages[$path]-> docblock = $docblock; 1380 } else 1381 { 1382 $this-> pages[$path]-> docblock-> package = $page-> package; 1383 $this-> pages[$path]-> docblock-> subpackage = $page-> subpackage; 1384 } 1385 } 1386 } 1387 1388 /** 1389 * add a new {@link parserPage} to the $pages array if none is found 1390 * 1391 * This method is used when a page has been @ignored or marked with @access 1392 * private, and a public class is in the page (a class with no @access 1393 * private in its DocBlock). The method first creates a new page in the 1394 * {@link $pages} array and then copies path information, and calls 1395 * {@link addPage()} to set up packages 1396 * @param string full path of page 1397 */ 1398 function addPageIfNecessary($path, & $class) 1399 { 1400 global $_phpDocumentor_setting; 1401 if (!$this-> parsePrivate) 1402 { 1403 if (!isset($this-> pages[$path])) 1404 { 1405 $this-> pages[$path] = new parserData; 1406 $this-> pages[$path]-> docblock = new parserDocBlock; 1407 $this-> pages[$path]-> docblock-> package = $this-> privatepages[$path]> docblock-> package; 1408 $this-> pages[$path]-> docblock-> subpackage = $this> privatepages[$path]-> docblock-> subpackage; 1409 $par = $this-> privatepages[$path]-> parent; 1410 $this-> pages[$path]-> setParent($par); 1411 $this-> proceduralpages-> addPage($par); 1412 } 1413 } 1414 if (!empty($_phpDocumentor_setting['packageoutput'])) 1415 $packages = explode(',',$_phpDocumentor_setting['packageoutput']); 1416 if (!empty($_phpDocumentor_setting['packageoutput']) && 1417 $this-> pages[$path]-> parent-> package != $class-> docblock-> package && 1418 !in_array($this-> pages[$path]-> parent-> package,$packages)) 1419 { 1420 $this-> pages[$path]-> parent-> package = $class-> docblock-> package; 1421 $this-> addPage($this-> pages[$path]-> parent, $path); 1422 $this-> proceduralpages-> addPage($this-> pages[$path]-> parent); 1423 } 1424 } 1425 1426 /** 1427 * Adds a {@link parserPage} element to the {@link parserData} element in 1428 * $this->privatepages[$path] 1429 * 1430 * Performs a similar function to addPage, but adds to the 1431 * {@link $privatePages} array 1432 * @param parserPage $page 1433 * @param string $path full path to the page 1434 * @see addPage() 1435 */ 1436 function addPrivatePage($page, $path) 1437 { 1438 /* 1439 * if privatepages is still empty, 1440 * we need to initialize it with an empty 1441 * path=>ParserData element, so that it has 1442 * a top-level element... otherwise the setParent() call 1443 * below will crap out.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1230 of 1382

1444 */ 1445 if (count($this-> privatepages) == 0) { 1446 $this-> privatepages[$path] = new ParserData(); 1447 } 1448 $this-> privatepages[$path]-> setParent($page); 1449 if (isset($page-> package) && $page-> package != $GLOBALS['phpDocumentor_DefaultPackageName']) 1450 { 1451 if (!$this-> privatepages[$path]-> docblock) 1452 { 1453 $docblock = new parserDocBlock; 1454 $docblock-> package = $page-> package; 1455 $docblock-> subpackage = $page-> subpackage; 1456 $this-> privatepages[$path]-> docblock = $docblock; 1457 } else 1458 { 1459 $this-> privatepages[$path]-> docblock-> package = $page-> package; 1460 $this-> privatepages[$path]-> docblock-> subpackage = $page> subpackage; 1461 } 1462 } 1463 } 1464 1465 /** 1466 * adds a processed descendant of {@link parserElement} to the {@link $pages} 1467 * array or {@link $privatepages} array 1468 * 1469 * This function expects the page to exist in either $pages or $privatepages. It calls the 1470 * {@link parserData::addElement()} method to add $element to the page. 1471 * @param parserElement $element this will actually be a descendant of parserElement 1472 * @param string $path 1473 */ 1474 function addElementToPage($element, $path) 1475 { 1476 if (isset($this-> privatepages[$path])) 1477 { 1478 if (isset($this-> pages[$path])) 1479 { 1480 if ($element-> type == 'class' || $element-> type == 'method' 1481 || $element-> type == 'var' || $element-> type == 'const') 1482 { 1483 $this-> pages[$path]-> addElement($element); 1484 } else 1485 $this-> privatepages[$path]-> addElement($element); 1486 } else 1487 $this-> privatepages[$path]-> addElement($element); 1488 } else 1489 { 1490 if (isset($this-> pages[$path])) 1491 { 1492 $this-> pages[$path]-> addElement($element); 1493 } 1494 } 1495 } 1496 1497 /** 1498 * Add all the @uses tags from $element to the $uses array so that @usedby 1499 * virtual tags can be added 1500 * @uses parserUsesTag::getSeeElement() used to initialize {@link $uses} 1501 * @uses parserUsesTag::getDescription() used to initialize {@link $uses} 1502 * @param parserElement descendant of parserElement 1503 * @param string full path to the file 1504 */ 1505 function addUses($element, $path) 1506 { 1507 if (isset($element-> type) && $element-> type == 'page') 1508 { 1509 $element = $this-> pages[$element-> path]; 1510 } 1511 if (!$this-> parsePrivate && isset( $element-> docblock-> hasaccess) && $element-> docblock-> hasaccess) 1512 { 1513 $a = $element-> docblock-> getKeyword('access'); 1514 if (is_object($a) && $a-> getString() == 'private') return; 1515 } 1516 if (isset($this-> privatepages[$path])) 1517 { 1518 if (isset($this-> pages[$path])) 1519 { 1520 $uses = $element-> docblock-> getKeyword('uses');

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1231 of 1382

1521 if ($uses) 1522 { 1523 if (!is_array($uses)) $uses = array($uses); 1524 foreach($uses as $use) 1525 { 1526 if (!is_object($use)) continue; 1527 $el = $use-> getSeeElement(); 1528 $description = $use-> getDescription(); 1529 $this-> uses[$el][] = array($element, $description); 1530 } 1531 } 1532 } 1533 } else 1534 { 1535 if (isset($this-> pages[$path])) 1536 { 1537 $uses = $element-> docblock-> getKeyword('uses'); 1538 if ($uses) 1539 { 1540 if (!is_array($uses)) $uses = array($uses); 1541 foreach($uses as $use) 1542 { 1543 if (!is_object($use)) continue; 1544 $el = $use-> getSeeElement(); 1545 $description = $use-> getDescription(); 1546 $this-> uses[$el][] = array($element, $description); 1547 } 1548 } 1549 } 1550 } 1551 } 1552 1553 /** 1554 * Add a {@link parserUsedByTag} link to every element referred to by @uses 1555 * @param Converter temporary converter used to retrieve abstract links 1556 * @uses phpDocumentor_IntermediateParser::addUses() indirectly, as 1557 * addUses() sets up $uses, which is iterated over here 1558 * @uses $pages sets up all @usedby tags from here 1559 * @access private 1560 */ 1561 function _setupUsesList(& $converter) 1562 { 1563 ob_start(); 1564 $converter-> _createPkgElements($this-> pages); 1565 ob_end_clean(); 1566 ksort($this-> uses); 1567 foreach($this-> uses as $link => $elements) 1568 { 1569 foreach($elements as $element) 1570 { 1571 if ($element[0]-> type == 'method' || $element[0]-> type == 'var' || 1572 $element[0]-> type == 'const') 1573 { 1574 $converter-> class = $element[0]-> getClass(); 1575 } 1576 if ($element[0]-> type == 'class') 1577 { 1578 $converter-> class = $element[0]-> getName(); 1579 } 1580 $reallink = $converter-> getLink($link,$element[0]-> docblock-> package); 1581 if (is_object($reallink)) 1582 { 1583 // add a used by tag to the docblock of the destination 1584 switch(phpDocumentor_get_class($reallink)) 1585 { 1586 case 'pagelink' : 1587 $this-> pages[$reallink-> path]-> docblock-> addUsedBy( 1588 $element[0]-> getLink($converter, false, true), 1589 $element[1]); 1590 break; 1591 case 'functionlink' : 1592 case 'definelink' : 1593 case 'globallink' : 1594 if (isset($this-> pages[$reallink-> path])) 1595 { 1596 for ($i=0; 1597 $i< count($this-> pages[$reallink-> path]-> elements); 1598 $i++) { 1599 if ($this-> pages[$reallink-> path]-> elements[$i]> type ==

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1232 of 1382

1600 str_replace('link', '', 1601 phpDocumentor_get_class($reallink)) && 1602 $this-> pages[$reallink-> path]-> 1603 elements[$i]-> getName() 1604 == $reallink-> name) { 1605 $this-> pages[$reallink-> path]-> elements[$i]-> 1606 docblock-> addUsedBy( 1607 $element[0]-> getLink($converter,false,true), 1608 $element[1]); 1609 // debug('added @usedby to '.str_replace('link','',phpDocumentor_get_class($reallink)).' '.$reallink->name); 1610 } 1611 } 1612 } 1613 break; 1614 case 'classlink' : 1615 case 'methodlink' : 1616 case 'varlink' : 1617 case 'constlink' : 1618 if (isset($this-> pages[$reallink-> path])) 1619 { 1620 for ($i=0;$i< count($this-> pages[$reallink-> path]> classelements);$i++) 1621 { 1622 if ($this-> pages[$reallink-> path]-> classelements[$i]> type == 1623 str_replace('link','',phpDocumentor_get_class($reallink)) && 1624 $this-> pages[$reallink-> path]-> classelements[$i]> getName() == $reallink-> name && 1625 (!isset($reallink-> class) || 1626 $this-> pages[$reallink-> path]-> classelements[$i]> getClass() == $reallink-> class)) 1627 { 1628 $this-> pages[$reallink-> path]-> classelements[$i]> docblock-> addUsedBy($element[0]-> getLink($converter,false,true), $element[1]); 1629 // debug('added @usedby to '.str_replace('link','',phpDocumentor_get_class($reallink)).' '.$reallink->name); 1630 } 1631 } 1632 } 1633 break; 1634 } 1635 } 1636 } 1637 } 1638 } 1639 1640 /** 1641 * Interface to the Converter 1642 * 1643 * This function simply passes {@link $pages} and {@link package_pages} to 1644 * the walk() method, and then calls the Output() method. Note that 1645 * Output() is not required to do anything, and in fact doesn't in 1646 * HTMLframesConverter. 1647 * @uses Converter::walk() passes {@link $pages} and {@link $package_pages} 1648 * @uses Converter::Output() 1649 */ 1650 function Convert($title, $converter) 1651 { 1652 $converter-> walk($this-> pages, $this-> package_pages); 1653 $converter-> Output($title); 1654 $converter-> cleanup(); 1655 } 1656 1657 /** 1658 * Clean up classes 1659 * 1660 * {@source } 1661 * @access private 1662 * @uses Classes::Inherit() passes $this 1663 */ 1664 function fixClasses() 1665 { 1666 $this-> classes-> Inherit($this); 1667 } 1668 1669 /** 1670 * Clean up Procedural Pages 1671 * {@source }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1233 of 1382

1672 * @access private 1673 * @uses ProceduralPages::setupPages() passes $this 1674 */ 1675 function fixProcPages() 1676 { 1677 $this-> proceduralpages-> setupPages($this); 1678 } 1679 1680 /** 1681 * If the parent class of $class is in a different package, adds it to the 1682 * {@link $package_parents} array 1683 * @param parserClass &$class 1684 */ 1685 function addPackageParent(& $class) 1686 { 1687 if (!is_array($class-> parent)) return; 1688 $par = $this-> classes-> getClass($class-> parent[1], $class-> parent[0]); 1689 if ($class-> docblock-> package == $par-> docblock-> package) return; 1690 $this-> package_parents[$class-> docblock-> package] = $par-> docblock> package; 1691 if (!isset($this-> package_parents[$par-> docblock-> package]) || !$this> package_parents[$par-> docblock-> package]) $this-> package_parents[$par-> docblock> package] = false; 1692 } 1693 1694 /** 1695 * Add a converter name to use to the list of converters 1696 * 1697 * Sets up the {@link $converters} array. 1698 * {@internal 1699 * First, the Converter's file is included, and then, if successful, 1700 * the converter classname is tested for existance. If all is good, 1701 * then the templates are added to the list of converters/templates to use}}} 1702 * @param string $output output format (HTML, PDF, XML). Must be all caps 1703 * @param string $name Converter name (frames, for example, is the name of 1704 * HTMLframesConverter) 1705 * @param string $template template to use, should be a relative path to the 1706 * templates dir (like DOM/default) 1707 */ 1708 function addConverter($output,$name,$template) 1709 { 1710 if ($this-> templateBase) { 1711 $templateBase = str_replace('\\','/', $this-> templateBase) . '/Converters'; 1712 } else { 1713 if ('@PEAR-DIR@' != '@'.'PEAR-DIR@') { 1714 $templateBase = 'PhpDocumentor/phpDocumentor/Converters'; 1715 } else { 1716 $templateBase = str_replace('\\','/',$GLOBALS['_phpDocumentor_install_dir']) . '/phpDocumentor/Converters'; 1717 } 1718 } 1719 if (strpos($name,PATH_DELIMITER)) 1720 { 1721 // include the parent template 1722 $parent = explode(PATH_DELIMITER,$name); 1723 $parent = $parent[0]; 1724 if (!class_exists($output . $parent . 'Converter')) { 1725 $filename = $templateBase . '/' . $output . '/' . $parent . '/' . $output 1726 . $parent . 'Converter.inc'; 1727 if (Io::isIncludeable($filename)) 1728 { 1729 include_once($filename); 1730 } 1731 } 1732 if (!class_exists($output . $parent . 'Converter')) 1733 { 1734 addError(PDERROR_CONVERTER_NOT_FOUND,"parent Converter " .$output . $parent . "Converter of child Converter " .$output . str_replace(PATH_DELIMITER,'',$name) . "Converter" ); 1735 } 1736 } 1737 $filename = $templateBase . 1738 PATH_DELIMITER . $output . PATH_DELIMITER . $name . PATH_DELIMITER . $output . 1739 str_replace(PATH_DELIMITER, '', $name) . "Converter" . ".inc" ; 1740 if (Io::isIncludeable($filename)) 1741 { 1742 include_once($filename); 1743 } 1744 if (class_exists($output . str_replace(PATH_DELIMITER,'',$name) . 'Converter')) 1745 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1234 of 1382

1746 $this-> converters[$output][$output . str_replace(PATH_DELIMITER,'',$name) . "Converter" ][] = $template; 1747 } else 1748 { 1749 addError(PDERROR_CONVERTER_NOT_FOUND,$output . str_replace(PATH_DELIMITER,'',$name) . "Converter" ); 1750 } 1751 } 1752 1753 /** 1754 * does a natural case sort on two {@link parserElement} descendants 1755 * 1756 * @param mixed $a 1757 * @param mixed $b 1758 * @return int 1759 * @see generateElementIndex() 1760 */ 1761 function elementCmp ($a, $b) 1762 { 1763 return strnatcasecmp($a-> getName(), $b-> getName()); 1764 } 1765 1766 /** 1767 * does a natural case sort on two class elements (either 1768 * {@link parserClass, parserMethod} or {@link parserVar} 1769 * 1770 * @param mixed $a 1771 * @param mixed $b 1772 * @return int 1773 * @see generateElementIndex() 1774 */ 1775 function ClasselementCmp ($a, $b) 1776 { 1777 if (phpDocumentor_get_class($a) == 'parserclass') $atest = $a-> name; else $atest = $a-> class; 1778 if (phpDocumentor_get_class($b) == 'parserclass') $btest = $b-> name; else $btest = $b-> class; 1779 1780 if(($c = strnatcasecmp($atest, $btest)) != 0) return $c; 1781 if (phpDocumentor_get_class($a) != 'parserclass') $atest .= $a-> name; 1782 if (phpDocumentor_get_class($b) != 'parserclass') $btest .= $b-> name; 1783 if (phpDocumentor_get_class($a) == 'parsermethod' && phpDocumentor_get_class($b) == 'parsermethod') 1784 { 1785 if ($a-> isConstructor) return -1; 1786 if ($b-> isConstructor) return 1; 1787 if ($a-> isDestructor) return -1; 1788 if ($b-> isDestructor) return 1; 1789 } 1790 return strnatcasecmp($atest,$btest); 1791 } 1792 1793 /** 1794 * call this method once parsing has completed. 1795 * 1796 * This method calls the private methods fixClasses and fixProcPages, both 1797 * of which adjust inheritance and package information based on complicated 1798 * post-parsing rules described in {@link ProceduralPages::setupPages()} 1799 * and {@link Classes::Inherit()}. Then, it sorts elements of the $pages 1800 * array and calls Convert for each Converter in the $converters array 1801 * @see $converters 1802 * @see $pages 1803 * @see Convert() 1804 */ 1805 function Output ($title = "Generated Documentation" ) 1806 { 1807 $GLOBALS['phpDocumentor_errors']-> curfile = false; 1808 $this-> fixClasses(); 1809 $this-> fixProcPages(); 1810 // var_dump($this->uses); 1811 // exit; 1812 phpDocumentor_out("\nSorting page elements..." ); 1813 flush(); 1814 uasort($this-> pages,'pagesort'); 1815 foreach($this-> pages as $i => $page) 1816 { 1817 usort($this-> pages[$i]-> elements,array($this,'elementCmp')); 1818 usort($this-> pages[$i]-> classelements,array($this,'ClasselementCmp')); 1819 } 1820 phpDocumentor_out("done\n" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1235 of 1382

1821 flush(); 1822 $complicatedout = false; 1823 if (is_array($this-> converters)) 1824 { 1825 if (count($this-> converters) > 1) 1826 { 1827 $complicatedout = true; 1828 } 1829 phpDocumentor_out("Formatting @uses list..." ); 1830 flush(); 1831 $a = new __dummyConverter($this-> all_packages, $this-> package_parents, $this> classes, $this-> proceduralpages, $this-> packageoutput, $this-> parsePrivate, $this> quietMode, $this-> targetDir , '', $this-> title); 1832 $this-> _setupUsesList($a); 1833 unset($a); 1834 phpDocumentor_out("done\n\n" ); 1835 flush(); 1836 foreach($this-> converters as $converter => $blah) 1837 { 1838 if (is_array($blah)) 1839 { 1840 if (count($blah) > 1) 1841 { 1842 $complicatedout = true; 1843 } 1844 foreach($blah as $converter => $templates) 1845 { 1846 foreach($templates as $template) 1847 { 1848 $extraout = ''; 1849 if ($complicatedout) 1850 { 1851 $extraout = SMART_PATH_DELIMITER . $converter; 1852 } 1853 if (count($templates) > 1) 1854 { 1855 $extraout .= SMART_PATH_DELIMITER . str_replace(PATH_DELIMITER, SMART_PATH_DELIMITER, substr($template,0,strlen($template) - 1)); 1856 } 1857 $a = new $converter($this-> all_packages, $this> package_parents, $this-> classes, $this-> proceduralpages, $this-> packageoutput, $this> parsePrivate, $this-> quietMode, $this-> targetDir . $extraout, $template, $this-> title); 1858 if (isset($this-> templateBase)) 1859 { 1860 $a-> setTemplateBase($this-> templateBase, $template); 1861 } 1862 $a-> ric = $this-> ric; 1863 $a-> packagecategories = $this-> packagecategories; 1864 if (isset($this-> tutorials)) $a-> setTutorials($this> tutorials); 1865 $this-> Convert($title, $a); 1866 unset($a); 1867 } 1868 } 1869 } 1870 } 1871 } else 1872 { 1873 addErrorDie(PDERROR_NO_CONVERTERS); 1874 } 1875 } 1876 1877 /** 1878 * Sets the output directory 1879 * 1880 * @param string $dir the output directory 1881 */ 1882 function setTargetDir($dir) 1883 { 1884 $this-> targetDir = $dir; 1885 } 1886 1887 /** 1888 * Sets the template base directory 1889 * 1890 * @param string $dir the template base directory 1891 * @tutorial phpDocumentor.howto.pkg#using.command-line.templatebase 1892 */ 1893 function setTemplateBase($dir) 1894 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1236 of 1382

1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940

$this-> }

templateBase = $dir;

/** * set parsing information output mode (quiet or verbose) * * If set to false, no parsing information (parsing /php/file/thisfile.php, * Converting etc.) will be displayed. * Useful for cron jobs * @param bool $quietMode */ function setQuietMode($quietMode) { $this-> quietMode = $quietMode; } /** * show warnings for undocumented elements * * If set to false, no warnings will be shown for undocumented elements. * Useful for identifying classes and methods that haven't yet been documented. * @param bool $undocumentedElementWarnings */ function setUndocumentedElementWarningsMode($undocumentedElementWarnings) { $this-> undocumentedElementWarnings = $undocumentedElementWarnings; } /** * set display of elements marked with @access private * * If set to true, elements will be displayed * @param bool $parse */ function setParsePrivate($parse) { $this-> parsePrivate = $parse; } } /** @access private */ function pagesort($a, $b) { return strnatcasecmp($a-> } ?>

parent->

file,$b->

parent->

file);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1237 of 1382

File Source for Io.inc


Documentation for this file is available at Io.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * File and input handling routines * * This class parses command-line options, and works with files to * generate lists of files to parse based on the ignore/include options * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2000-2006 Joshua Eichorn, Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package phpDocumentor * @author Joshua Eichorn <[email protected]> * @author Gregory Beaver <[email protected]> * @copyright 2000-2006 Joshua Eichorn, Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: Io.inc 286921 2009-08-08 05:01:24Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 0.1 */ /** * Class to handle file and user io opperations * * @author Joshua Eichorn <[email protected]> * @author Gregory Beaver <[email protected]> * @version $Id: Io.inc 286921 2009-08-08 05:01:24Z ashnazg $ * @package phpDocumentor */ class Io { /** * Holds all the options that are avaible to the cmd line interface * and to the different web interfaces */ var $phpDocOptions; /** * Format: array(array(regexp-ready string to search for whole path, * regexp-ready string to search for basename of ignore strings),...) * @var false|array */ var $ignore; /** * A specific array of values that boolean-based arguments can understand, * aided by the {@link decideOnOrOff()} helper method. *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1238 of 1382

68 * Use lowercase letters always, to simplify string comparisons 69 * @var array 70 */ 71 var $valid_booleans = array 72 ( 73 '', ' ', 'on', 'y', 'yes', 'true', '1', 74 'off', 'n', 'no', 'false', '0' 75 76 ); 77 78 /** 79 * creates an array $this->phpDocOptions and sets program options in it. 80 * Array is in the format of: 81 * <pre> 82 * [filename][tag][] = "f"; 83 * [filename][tag][] = "-file"; 84 * [filename][desc] "name of file to parse" 85 * </pre> 86 */ 87 function Io() 88 { 89 $this-> phpDocOptions['filename']['tag'] = array( "-f" , "-filename" ); 90 $this-> phpDocOptions['filename']['desc'] = "name of file(s) to parse ',' file1,file2. Can contain complete path and * ? wildcards" ; 91 $this-> phpDocOptions['filename']['type'] = "path" ; 92 93 $this-> phpDocOptions['directory']['tag'] = array( "-d" , "-directory" ); 94 $this-> phpDocOptions['directory']['desc'] = "name of a directory(s) to parse directory1,directory2" ; 95 $this-> phpDocOptions['directory']['type'] = "path" ; 96 97 $this-> phpDocOptions['examplesdir']['tag'] = array( "-ed" , "-examplesdir" ); 98 $this-> phpDocOptions['examplesdir']['desc'] = "full path of the directory to look for example files from @example tags" ; 99 $this-> phpDocOptions['examplesdir']['type'] = "path" ; 100 101 $this-> phpDocOptions['templatebase']['tag'] = array( "-tb" , "-templatebase" ); 102 $this-> phpDocOptions['templatebase']['desc'] = "base location of all templates for this parse." ; 103 $this-> phpDocOptions['templatebase']['type'] = "path" ; 104 105 $this-> phpDocOptions['target']['tag'] = array("-t" , "--target" ); 106 $this-> phpDocOptions['target']['desc'] = "path where to save the generated files" ; 107 $this-> phpDocOptions['target']['type'] = "path" ; 108 109 $this-> phpDocOptions['ignore']['tag'] = array("-i" , "--ignore" ); 110 $this-> phpDocOptions['ignore']['desc'] = "file(s) that will be ignored, multiple separated by ','. Wildcards * and ? are ok" ; 111 $this-> phpDocOptions['ignore']['type'] = "path" ; 112 113 $this-> phpDocOptions['ignoresymlinks']['tag'] = array("-is" , "-ignoresymlinks" ); 114 $this-> phpDocOptions['ignoresymlinks']['desc'] = "ignore symlinks to other files or directories, default is off" ; 115 $this-> phpDocOptions['ignoresymlinks']['type'] = "set" ; 116 $this-> phpDocOptions['ignoresymlinks']['validvalues'] = $this-> valid_booleans; 117 118 $this-> phpDocOptions['ignoretags']['tag'] = array("-it" , "--ignoretags" ); 119 $this-> phpDocOptions['ignoretags']['desc'] = "tags to ignore for this parse. @package, @subpackage, @access and @ignore may not be ignored." ; 120 $this-> phpDocOptions['ignoretags']['type'] = "value" ; 121 122 $this-> phpDocOptions['hidden']['tag'] = array("-dh" , "--hidden" ); 123 $this-> phpDocOptions['hidden']['desc'] = "set equal to on (-dh on) to descend into hidden directories (directories starting with '.'), default is off" ; 124 $this-> phpDocOptions['hidden']['type'] = "set" ; 125 $this-> phpDocOptions['hidden']['validvalues'] = $this-> valid_booleans; 126 127 $this-> phpDocOptions['quiet']['tag'] = array("-q" , "--quiet" ); 128 $this-> phpDocOptions['quiet']['desc'] = "do not display parsing/conversion messages. Useful for cron jobs on/off default off" ; 129 $this-> phpDocOptions['quiet']['type'] = "set" ; 130 $this-> phpDocOptions['quiet']['validvalues'] = $this-> valid_booleans; 131

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1239 of 1382

132 $this-> phpDocOptions['undocumentedelements']['tag'] = array("-ue" , "-undocumentedelements" ); 133 $this-> phpDocOptions['undocumentedelements']['desc'] = "Control whether or not warnings will be shown for undocumented elements. Useful for identifying classes and methods that haven't yet been documented on/off default off" ; 134 $this-> phpDocOptions['undocumentedelements']['type'] = "set" ; 135 $this-> phpDocOptions['undocumentedelements']['validvalues'] = $this> valid_booleans; 136 137 $this-> phpDocOptions['title']['tag'] = array("-ti" ,"--title" ); 138 $this-> phpDocOptions['title']['desc'] = "title of generated documentation, default is 'Generated Documentation'" ; 139 $this-> phpDocOptions['title']['type'] = "value" ; 140 141 $this-> phpDocOptions['help']['tag'] = array("-h" , "--help" ); 142 $this-> phpDocOptions['help']['desc'] = " show this help message" ; 143 144 $this-> phpDocOptions['useconfig']['tag'] = array("-c" ,"-useconfig" ); 145 $this-> phpDocOptions['useconfig']['desc'] = "Use a Config file in the users/ subdirectory for all command-line options" ; 146 $this-> phpDocOptions['useconfig']['type'] = "value" ; 147 148 $this-> phpDocOptions['parseprivate']['tag'] = array("-pp" ,"-parseprivate" ); 149 $this-> phpDocOptions['parseprivate']['desc'] = "parse @internal and elements marked private with @access. Use on/off, default off" ; 150 $this-> phpDocOptions['parseprivate']['type'] = "set" ; 151 $this-> phpDocOptions['parseprivate']['validvalues'] = array('on', 'off'); 152 153 $this-> phpDocOptions['packageoutput']['tag'] = array("-po" ,"-packageoutput" ); 154 $this-> phpDocOptions['packageoutput']['desc'] = "output documentation only for selected packages. Use a comma-delimited list" ; 155 $this-> phpDocOptions['packageoutput']['type'] = "value" ; 156 157 $this-> phpDocOptions['defaultpackagename']['tag'] = array("-dn" ,"-defaultpackagename" ); 158 $this-> phpDocOptions['defaultpackagename']['desc'] = "name to use for the default package. If not specified, uses 'default'" ; 159 $this-> phpDocOptions['defaultpackagename']['type'] = "value" ; 160 161 $this-> phpDocOptions['defaultcategoryname']['tag'] = array("-dc" ,"-defaultcategoryname" ); 162 $this-> phpDocOptions['defaultcategoryname']['desc'] = "name to use for the default category. If not specified, uses 'default'" ; 163 $this-> phpDocOptions['defaultcategoryname']['type'] = "value" ; 164 165 $this-> phpDocOptions['output']['tag'] = array("-o" ,"--output" ); 166 $this-> phpDocOptions['output']['desc'] = "output information to use separated by ','. Format: output:converter:templatedir like \"HTML:frames:phpedit\"" ; 167 $this-> phpDocOptions['output']['type'] = "value" ; 168 169 $this-> phpDocOptions['converterparams']['tag'] = array("-cp" ,"-converterparams" ); 170 $this-> phpDocOptions['converterparams']['desc'] = "dynamic parameters for a converter, separate values with commas" ; 171 $this-> phpDocOptions['converterparams']['type'] = "value" ; 172 173 $this-> phpDocOptions['customtags']['tag'] = array("-ct" ,"-customtags" ); 174 $this-> phpDocOptions['customtags']['desc'] = "custom tags, will be recognized and put in tags[] instead of unknowntags[]" ; 175 $this-> phpDocOptions['customtags']['type'] = "value" ; 176 177 $this-> phpDocOptions['sourcecode']['tag'] = array("-s" ,"-sourcecode" ); 178 $this-> phpDocOptions['sourcecode']['desc'] = "generate highlighted sourcecode for every parsed file (PHP 4.3.0+ only) on/off default off" ; 179 $this-> phpDocOptions['sourcecode']['type'] = "set" ; 180 $this-> phpDocOptions['sourcecode']['validvalues'] = array('on', 'off'); 181 182 $this-> phpDocOptions['javadocdesc']['tag'] = array("-j" ,"-javadocdesc" ); 183 $this-> phpDocOptions['javadocdesc']['desc'] = "JavaDoc-compliant description parsing. Use on/off, default off (more flexibility)" ; 184 $this-> phpDocOptions['javadocdesc']['type'] = "set" ; 185 $this-> phpDocOptions['javadocdesc']['validvalues'] = array('on', 'off'); 186 187 $this-> phpDocOptions['pear']['tag'] = array("-p" ,"--pear" );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1240 of 1382

188 $this-> phpDocOptions['pear']['desc'] = "Parse a PEAR-style repository (package is directory, _members are @access private) on/off default off" ; 189 $this-> phpDocOptions['pear']['type'] = "set" ; 190 $this-> phpDocOptions['pear']['validvalues'] = array('on', 'off'); 191 192 $this-> phpDocOptions['readmeinstallchangelog']['tag'] = array("ric" ,"--readmeinstallchangelog" ); 193 $this-> phpDocOptions['readmeinstallchangelog']['desc'] = "Specify custom filenames to parse like README, INSTALL or CHANGELOG files" ; 194 $this-> phpDocOptions['readmeinstallchangelog']['type'] = "value" ; 195 196 $this-> phpDocOptions['general']['message'] ="You can have multiple directories and multiple files, as well as a combination of both options" ; 197 } 198 199 200 /** 201 * create the help message for display on the command-line 202 * @return string a string containing a help message 203 */ 204 function displayHelpMsg() 205 { 206 unset($ret); 207 $ret = "\n" ; 208 foreach($this-> phpDocOptions as $data) 209 { 210 unset($tag); 211 $tag = "" ; 212 if (isset($data['tag'])) 213 { 214 if (is_array($data['tag'])) { 215 foreach($data['tag'] as $param) { 216 $tag .= " $param " ; 217 } 218 } 219 $taglen = 34; 220 $outputwidth = 79; 221 $tagspace = str_repeat(" " ,$taglen); 222 $tmp = " " .trim($tag).$tagspace; 223 $tmp = substr($tmp,0,$taglen); 224 $d = wordwrap(ltrim($data['desc']),($outputwidth-$taglen)); 225 $dt = explode("\n" ,$d); 226 $dt[0] = $tmp .$dt[0]; 227 for($i=1;$i< count($dt);$i++) 228 { 229 $dt[$i] = $tagspace.$dt[$i]; 230 } 231 $ret .= implode("\n" ,$dt)."\n\n" ; 232 233 } 234 } 235 $ret .= "\n" .wordwrap($data['message'],$outputwidth)."\n" ; 236 return $ret; 237 } 238 239 /** 240 * calls {@link file_exists()} for each value in include_path, 241 * then calls {@link is_readable()} when it finds the file 242 * @param string 243 * @return boolean 244 */ 245 function isIncludeable($filename) 246 { 247 $test = realpath($filename); 248 if ($test && is_readable($test)) { 249 return true; // for absolute paths 250 } 251 $ip = get_include_path(); 252 if (PHPDOCUMENTOR_WINDOWS) 253 { 254 $ip = explode(';', $ip); 255 } else { 256 $ip = explode(':', $ip); 257 } 258 foreach($ip as $path) 259 { 260 if ($a = realpath($path . DIRECTORY_SEPARATOR . $filename)) 261 { 262 if (is_readable($a)) 263 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1241 of 1382

264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343

return true; } } } return false; } /** * Parses $_SERVER['argv'] and creates a setup array * @return array a setup array * @global array command-line arguments * @todo replace with Console_* ? */ function parseArgv() { global $argv; // defaults for setting $setting['hidden'] = "off" ; $setting['ignoresymlinks'] = 'off'; $setting['template'] = 'templates' . PATH_DELIMITER .'default' . PATH_DELIMITER; $valnext = "junk" ; $data = array(); if(isset($argv) && is_array($argv)) { foreach ($argv as $cmd) { if ($cmd == '--') { continue; } if ($cmd == '-h' || $cmd == '--help') { echo $this-> displayHelpMsg(); die(); } // at first, set the arg value as if we // already know it's formatted normally, e.g. // -q on $setting[$valnext] = $cmd; if (isset($data['type']) && $data['type'] == 'set') {

if ($valnext !== 'junk' && strpos(trim($cmd),'-') === 0) { // if valnext isn't 'junk' (i.e it was an arg option) // then the first arg needs an implicit "" as its value, e.g. // ... -q -pp ... ===> ... -q '' -pp ... $setting[$valnext] = ''; } else if (!in_array(strtolower($cmd), $data['validvalues'], true)) { // the arg value is not a valid value addErrorDie(PDERROR_INVALID_VALUES, $valnext, $cmd, '(' . implode(', ', $data['validvalues']) . ')'); } } foreach( $this-> phpDocOptions as $name => { if (!empty($data['tag'])) { if (in_array($cmd,$data['tag'])) { $valnext = $name; break; } else { $valnext = "junk" ; } } } $data )

if ($valnext == 'junk' && ( strpos(trim($cmd),'-') === 0)) { // this indicates the last arg of the command // is an arg option (-) that was preceded by unrecognized "junk" addErrorDie(PDERROR_UNKNOWN_COMMANDLINE,$cmd); } else if ($valnext != 'junk' && ( strpos(trim($cmd),'-') === 0)) { // this indicates the last arg of the command

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1242 of 1382

344 // is an arg option (-) without an arg value 345 346 // add an empty arg "value" for this arg "option" 347 $setting[$valnext] = ''; 348 } 349 350 351 } 352 } else 353 { 354 echo "Please use php-cli.exe in windows, or set register_argc_argv On" ; 355 die; 356 } 357 /* $setting will always have at least 3 elements 358 [hidden] => off 359 [ignoresymlinks] => 'off' 360 [template] => templates/default 361 */ 362 if (count($setting) < 4) { 363 echo $this-> displayhelpMsg(); 364 die(); 365 } 366 367 return $setting; 368 } 369 370 371 /** 372 * @return array list of files in a directory 373 * @param string $directory full path to the directory you want the list of 374 * @param bool whether to list files that begin with . like .bash_history 375 * @param bool whether to ignore symlinks 376 */ 377 function dirList($orig_directory, $hidden = false, $ignore_symlinks = false) 378 { 379 $directory = realpath($orig_directory); 380 $ret = false; 381 if (! @is_dir($directory)) 382 { 383 die(" directory: '$directory' not found\n" ); 384 } 385 $ret = array(); 386 $d = @dir($directory); // thanks to Jason E Sweat ([email protected]) for fix 387 while($d && ( $entry=$d-> read()) !== false) { 388 if (strcmp($entry,"." ) == 0 || strcmp($entry,".." ) == 0) { 389 continue; 390 } 391 392 // skip hidden files, if we're supposed to 393 if (!$hidden) 394 { 395 if (substr($entry,0,1) == "." ) 396 { 397 phpDocumentor_out("Hidden " . $directory . PATH_DELIMITER . $entry . " Ignored\n" ); 398 continue; 399 } 400 } 401 402 // skip symlink files, if we're supposed to 403 if ($ignore_symlinks) 404 { 405 if (is_link($directory . PATH_DELIMITER . $entry)) 406 { 407 phpDocumentor_out("Symlink " . $directory . PATH_DELIMITER . $entry . " Ignored\n" ); 408 continue; 409 } 410 } 411 412 if (is_file($directory . PATH_DELIMITER . $entry)) { 413 $ret[] = $directory . PATH_DELIMITER . $entry; 414 } 415 if (is_dir($directory . PATH_DELIMITER . $entry)) { 416 $tmp = $this-> dirList($directory . PATH_DELIMITER . $entry, $hidden, $ignore_symlinks); 417 if (is_array($tmp)) { 418 foreach($tmp as $ent) { 419 $ret[] = $ent; 420 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1243 of 1382

421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500

} } } if ($d) $d-> return $ret; } /** * Retrieve common directory (case-insensitive in windows) * * takes the list of files, and returns the subdirectory they share in common, * so in this list: * * <code> * array( * "/dir1/dir2/subdir/dir3/filename.ext", * "/dir1/dir2/subdir/dir4/filename.ext", * "/dir1/dir2/mydir/dir5/filename.ext"); * </code> * * getBase will return "/dir1/dir2" * @param array array of strings */ function getBase($filelist) { $masterPath = false; foreach($filelist as $path) { if (!$masterPath) { $masterPath = str_replace('\\','/',dirname($path)); } else { if (dirname($path) != $masterPath) { $mp = explode(PATH_DELIMITER, $masterPath); $np = explode(PATH_DELIMITER, str_replace('\\', '/', dirname($path))); if (count($np) < count($mp)) { $masterPath = join($np, PATH_DELIMITER); } else { $test = false; $found = false; for($i=0;$i < count($mp) && $i < count($np);$i++) { if (PHPDOCUMENTOR_WINDOWS) { if (strtolower($mp[$i]) != strtolower($np[$i])) $found = $i; } else { if ($mp[$i] != $np[$i]) $found = $i; } } if ($found !== false) { $mp = array_slice($mp,0,$found); $masterPath = join($mp,PATH_DELIMITER); } } } } } return $masterPath; } /** * Retrieve tutorial subdirectories and their contents from the list of * files to parse * @param array array of paths (strings) * @return array array(filelist - tutorials, tutorials) */ function getTutorials($filelist) { $list = $tutorials = array(); foreach($filelist as $file) { if (strpos($file,'tutorials/') !== false) { $tutedir = explode('/',substr($file,strpos($file,'tutorials/'))); close();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1244 of 1382

501 array_shift($tutedir); 502 if (count($tutedir) <= 3) 503 { 504 $res = array(); 505 // kludge - will need to fix for 2.0 506 $res['category'] = $GLOBALS['phpDocumentor_DefaultCategoryName']; 507 $res['package'] = array_shift($tutedir); 508 $res['subpackage'] = ''; 509 if (count($tutedir) > 1) 510 $res['subpackage'] = array_shift($tutedir); 511 $f = array_shift($tutedir); 512 $res['tutename'] = $f; 513 $f = explode('.',$f); 514 $res['tutetype'] = array_pop($f); 515 if ($res['tutetype'] == 'ini') continue; 516 $res['path'] = $file; 517 if (@file_exists($file . '.ini')) 518 { 519 $res['ini'] = phpDocumentor_parse_ini_file($file . '.ini', true); 520 } else 521 { 522 $res['ini'] = false; 523 } 524 $tutorials[] = $res; 525 } 526 } else $list[] = $file; 527 } 528 return array($list,$tutorials); 529 } 530 531 /** 532 * @param string base directory from {@link getBase()} 533 * @param array file list from {@link dirList()} 534 * @return array array(filelist - README/INSTALL/CHANGELOG, 535 * README/INSTALL/CHANGELOG) 536 */ 537 function getReadmeInstallChangelog($base,$filelist) 538 { 539 $list = $ric = array(); 540 $names = $GLOBALS['_phpDocumentor_RIC_files']; 541 foreach($filelist as $file) 542 { 543 if ((dirname($file) == $base) && in_array(strtoupper(basename($file)), $names)) 544 { // be sure to change $this->checkIgnore() if any other files are added here!! 545 $ric[] = $file; 546 } else 547 { 548 $list[] = $file; 549 } 550 } 551 return array($list,$ric); 552 } 553 554 /** 555 * @param string directory 556 * @param string base directory 557 * @param array array of ignored items 558 * @param boolean the "hidden" flag 559 * @param boolean the "ignoresymlinks" flag 560 * @uses dirList 561 * @uses checkIgnore 562 * @uses setup_dirs 563 */ 564 function getDirTree($dir, $base_dir, $ignore = array(), $hidden = false, $ignoresymlinks = false) 565 { 566 $allfiles = $this-> dirList($dir,$hidden,$ignoresymlinks); 567 $struc = array(); 568 foreach($allfiles as $file) 569 { 570 if ($this> checkIgnore(basename($file),dirname(realpath($file)),$ignore,$ignoresymlinks)) continue; 571 if (PHPDOCUMENTOR_WINDOWS) { 572 $path = substr(dirname($file),strlen(str_replace('\\','/',realpath($base_dir)))); 573 } else { 574 $path = substr(dirname($file),strlen(str_replace('\\','/',realpath($base_dir)))+1); 575 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1245 of 1382

576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 PHP File 646 647 648 649 650 651 652 653 654

if (!$path) $path = '/'; $parts = pathinfo($file); if (!isset($parts['extension'])) { $parts['extension'] = ''; } $struc[$path][] = array( 'file' => $parts['basename'], 'ext' => $parts['extension'], 'path' => $file); } uksort($struc,'strnatcasecmp'); foreach($struc as $key => $ind) { usort($ind,'Ioinc_sortfiles'); $struc[$key] = $ind; $save = $key; if ($key != '/') { $key = explode('/',$key); while (count($key)) { array_pop($key); if (isset($struc[join('/',$key)])) { $struc[join('/',$key)][substr($save,strlen(join('/',$key)) + 1)] = $ind; unset($struc[$save]); } } } } foreach($struc as $key => $ind) { if ($key != '/') { if (count(explode('/',$key)) == 1) { $struc['/'][$key] = $struc[$key]; unset($struc[$key]); } } } $tempstruc = $struc; unset($tempstruc['/']); $leftover_dirs = array_keys($tempstruc); $splitdirs = array(); foreach($leftover_dirs as $dir) { $splitdirs[] = explode('/',$dir); } $leftover_dirs = array(); foreach($splitdirs as $dir) { $save = join($dir,'/'); $struc['/'] = setup_dirs($struc['/'], $dir, $tempstruc[$save]); unset($struc[$save]); } @uksort($struc['/'],'Ioinc_mystrucsort'); return $struc; } /** * Reads a file and returns it as a string * Does basic error checking * * file extensions are set in {@link phpdoc.inc} * * @global array PHP File extensions, used to validate that $path is a PHP File * @global array PHP File extensions in a CVS repository, used to validate that $path is a * @param string $path */ function readPhpFile($path, $quietMode = false) { global $_phpDocumentor_cvsphpfile_exts, $_phpDocumentor_phpfile_exts; // tiberiusblue addition $cvsExt = $_phpDocumentor_cvsphpfile_exts; $ext = $_phpDocumentor_phpfile_exts; if (file_exists($path))

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1246 of 1382

655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734

{ if (is_file($path)) { // check extension $tmp = explode("." ,$path); // tiberiusblue addition $tmp2 = $tmp; if (in_array(array_pop($tmp),$ext)) { phpDocumentor_out(" -- Parsing file\n" ); flush(); if (function_exists('file_get_contents')) { return file_get_contents($path); } $fp = fopen($path,"r" ); $ret = fread($fp,filesize($path)); fclose($fp); return $ret; } elseif (in_array(array_pop($tmp2),$cvsExt)) { phpDocumentor_out(" CVS file [EXPERIMENTAL]\n" ); flush(); if (function_exists('file_get_contents')) { $ret = file_get_contents($path); } else { $fp = fopen($path,"r" ); $ret = fread($fp,filesize($path)); fclose($fp); } $ret = strstr($ret,"<?" ); $ret = substr($ret,0,strpos($ret,"@\n" )); $ret = str_replace("@@" ,"@" ,$ret); return $ret; } else { phpDocumentor_out(" -- File not parsed, not a php file\n" flush(); } } else { phpDocumentor_out(" -- Unable to read file, not a file\n" flush(); } } else { phpDocumentor_out(" -- Unable to read file, file does not exist\n" flush(); } } /** * Tell whether to ignore a file or a directory * allows * and ? wildcards * * @author Greg Beaver <[email protected]> * @param string $file just the file name of the file or directory, * in the case of directories this is the last dir * @param string $path the path to consider (should be checked by * realpath() before, and may be relative) * @param array $ignore * @param bool * @param bool Ignore symlinks? * @return bool true if $path should be ignored, false if it should not */ function checkIgnore($file,$path,$ignore,$ignore_no_ext = true,$ignoresymlinks = false) { global $_phpDocumentor_RIC_files; if ($ignoresymlinks && is_link($path . PATH_DELIMITER . $file)) return false;

);

);

);

if (!count($ignore)) return false; if (!isset($this-> ignore)) { $this-> _setupIgnore($ignore); } if (!$this-> ignore) { return false; } if ($ignore_no_ext &&

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1247 of 1382

735 !in_array(strtoupper($file), $_phpDocumentor_RIC_files)) 736 { 737 if (!is_numeric(strpos($file,'.'))) return true; 738 } 739 if (is_array($this-> ignore)) 740 { 741 foreach($this-> ignore as $match) 742 { 743 // match is an array if the ignore parameter was a /path/to/pattern 744 if (is_array($match)) 745 { 746 // check to see if the path matches with a path delimiter appended 747 preg_match('/^' . strtoupper($match[0]).'$/', strtoupper($path) . PATH_DELIMITER,$find); 748 if (!count($find)) 749 { 750 // check to see if it matches without an appended path delimiter 751 preg_match('/^' . strtoupper($match[0]).'$/', strtoupper($path), $find); 752 } 753 if (count($find)) 754 { 755 // check to see if the file matches the file portion of the regex string 756 preg_match('/^' . strtoupper($match[1]).'$/', strtoupper($file), $find); 757 if (count($find)) 758 { 759 return true; 760 } 761 } 762 // check to see if the full path matches the regex 763 preg_match('/^' . strtoupper($match[0]).'$/', 764 strtoupper($path . DIRECTORY_SEPARATOR . $file), $find); 765 if (count($find)) 766 { 767 return true; 768 } 769 } else 770 { 771 // ignore parameter was just a pattern with no path delimiters 772 // check it against the path 773 preg_match('/^' . strtoupper($match).'$/', strtoupper($path), $find); 774 if (count($find)) 775 { 776 return true; 777 } 778 // check it against the file only 779 preg_match('/^' . strtoupper($match).'$/', strtoupper($file), $find); 780 if (count($find)) 781 { 782 return true; 783 } 784 } 785 } 786 } 787 return false; 788 } 789 790 /** 791 * Construct the {@link $ignore} array 792 * @author Greg Beaver <[email protected]> 793 * @param array strings of files/paths/wildcards to ignore 794 * @access protected 795 */ 796 function _setupIgnore($ignore) 797 { 798 $ig = array(); 799 if ( ! is_array($ignore)) 800 { 801 $this-> ignore = false; 802 return; 803 } 804 for($i=0; $i< count($ignore);$i++) 805 { 806 if (empty($ignore[$i])) 807 continue; 808 809 $ignore[$i] = strtr($ignore[$i], '\\', '/'); 810 $ignore[$i] = str_replace('//','/',$ignore[$i]); 811 812 if (!is_numeric(strpos($ignore[$i],PATH_DELIMITER))) 813 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1248 of 1382

814 $ig[] = $this-> getRegExpableSearchString($ignore[$i]); 815 } else 816 { 817 if (basename($ignore[$i]) . PATH_DELIMITER == $ignore[$i]) 818 $ig[] = $this-> getRegExpableSearchString($ignore[$i]); 819 else 820 $ig[] = array($this-> getRegExpableSearchString($ignore[$i]),$this> getRegExpableSearchString(basename($ignore[$i]))); 821 } 822 } 823 if (count($ig)) $this-> ignore = $ig; 824 } 825 826 /** 827 * Converts $s into a string that can be used with preg_match 828 * @param string $s string with wildcards ? and * 829 * @author Greg Beaver <[email protected]> 830 * @return string converts * to .*, ? to ., etc. 831 */ 832 function getRegExpableSearchString($s) 833 { 834 $y = '\/'; 835 if (DIRECTORY_SEPARATOR == '\\') 836 { 837 $y = '\\\\'; 838 } 839 $s = str_replace('/', DIRECTORY_SEPARATOR, $s); 840 $x = strtr($s, array('?' => '.','*' => '.*','.' => '\\.','\\' => '\\\\','/' => '\\/', 841 '[' => '\\[',']' => '\\]','-' => '\\-')); 842 if (strpos($s, DIRECTORY_SEPARATOR) !== false && 843 strrpos($s, DIRECTORY_SEPARATOR) === strlen($s) - 1) 844 { 845 $x = " (?:.*$y$x?.*|$x.*)" ; 846 } 847 return $x; 848 } 849 850 /** 851 * Removes files from the $dir array that do not match the search string in 852 * $match 853 * @param array $dir array of filenames (full path) 854 * @param string $match search string with wildcards 855 * @author Greg Beaver <[email protected]> 856 * @return string|arraylisting of every file in a directory that matches 857 * the search string 858 */ 859 function removeNonMatches($dir, $match) 860 { 861 $match = $this-> getRegExpableSearchString($match); 862 $nodir = false; 863 if (!is_array($dir)) 864 { 865 $dir = array($dir); 866 $nodir = true; 867 } 868 foreach($dir as $i => $file) 869 { 870 preg_match('/^'.$match.'$/',basename($file),$find); 871 if (!count($find)) unset($dir[$i]); 872 } 873 if ($nodir) return $dir[0]; 874 return $dir; 875 } 876 877 /** 878 * Take a filename with wildcards and return all files that match the 879 * wildcards 880 * @param string $file a full path from the -f command-line parameter, with 881 * potential * and ? wildcards. 882 * @return mixed if $file contains wildcards, returns an array of matching 883 * files, otherwise returns false 884 * @author Greg Beaver <[email protected]> 885 * @uses dirList 886 * @uses removeNonMatches 887 */ 888 function getAllFiles($file) 889 { 890 $path = realpath(dirname($file)); 891 $file = basename($file);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1249 of 1382

892 // any wildcards? 893 if (is_numeric(strpos($file,'?')) || is_numeric(strpos($file,'*'))) 894 { 895 $files = $this-> dirList($path); 896 $a = $this-> removeNonMatches($files,$file); 897 return $a; 898 } 899 return false; 900 } 901 } 902 903 /**#@+ 904 * Sorting functions for the file list 905 * @param string 906 * @param string 907 */ 908 function Ioinc_sortfiles($a, $b) 909 { 910 return strnatcasecmp($a['file'],$b['file']); 911 } 912 913 function Ioinc_mystrucsort($a, $b) 914 { 915 if (is_numeric($a) && is_string($b)) return 1; 916 if (is_numeric($b) && is_string($a)) return -1; 917 if (is_numeric($a) && is_numeric($b)) 918 { 919 if ($a > $b) return 1; 920 if ($a < $b) return -1; 921 if ($a == $b) return 0; 922 } 923 return strnatcasecmp($a,$b); 924 } 925 /**#@-*/ 926 927 /** 928 * Recursively add all the subdirectories of $contents to $dir without erasing anything in 929 * $dir 930 * @param array 931 * @param array 932 * @return array processed $dir 933 */ 934 function set_dir($dir,$contents) 935 { 936 while(list($one,$two) = each($contents)) 937 { 938 if (isset($dir[$one])) 939 { 940 $dir[$one] = set_dir($dir[$one],$contents[$one]); 941 } else $dir[$one] = $two; 942 } 943 return $dir; 944 } 945 946 /** 947 * Recursively move contents of $struc into associative array 948 * 949 * The contents of $struc have many indexes like 'dir/subdir/subdir2'. 950 * This function converts them to 951 * array('dir' => array('subdir' => array('subdir2'))) 952 * @param array struc is array('dir' => array of files in dir,'dir/subdir' => array of files in dir/subdir,...) 953 * @param array array form of 'dir/subdir/subdir2' array('dir','subdir','subdir2') 954 * @return array same as struc but with array('dir' => array(file1,file2,'subdir' => array(file1,...))) 955 */ 956 function setup_dirs($struc,$dir,$contents) 957 { 958 if (!count($dir)) 959 { 960 foreach($contents as $dir => $files) 961 { 962 if (is_string($dir)) 963 { 964 if (strpos($dir,'/')) 965 { 966 $test = true; 967 $a = $contents[$dir]; 968 unset($contents[$dir]); 969 $b = explode('/',$dir);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1250 of 1382

970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992

$c = array_shift($b); if (isset($contents[$c])) { $contents[$c] = set_dir($contents[$c],setup_dirs(array(),$b,$a)); } else $contents[$c] = setup_dirs(array(),$b,$a); } } } return $contents; } $me = array_shift($dir); if (!isset($struc[$me])) $struc[$me] = array(); $struc[$me] = setup_dirs($struc[$me],$dir,$contents); return $struc; } if (!function_exists('get_include_path')) { function get_include_path() { return ini_get('include_path'); } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1251 of 1382

File Source for phpdoc.inc


Documentation for this file is available at phpdoc.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 <?php /** * startup file * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2000-2007 Joshua Eichorn, Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @author Joshua Eichorn <[email protected]> * @author Gregory Beaver <[email protected]> * @copyright 2000-2007 Joshua Eichorn, Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: phpdoc.inc 243933 2007-10-10 01:18:25Z ashnazg $ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 0.1 * @filesource * @todo CS cleanup - change package to PhpDocumentor */ // set up include path so we can find all files, no matter what $a = explode('/', str_replace('\\', '/', dirname(realpath(__FILE__)))); array_pop($a); $GLOBALS['_phpDocumentor_install_dir'] = join('/', $a); // add my directory to the include path, and make it first, should fix any errors if (substr(PHP_OS, 0, 3) == 'WIN') ini_set('include_path', $GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path')); else ini_set('include_path', $GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path')); /** * All command-line handling from previous version has moved to here * * Many settings also moved to phpDocumentor.ini */ require_once "phpDocumentor/Setup.inc.php" ; $phpdoc = new phpDocumentor_setup; $phpdoc-> readCommandLineSettings(); $phpdoc-> setupConverters(); $phpdoc-> createDocs(); ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1252 of 1382

File Source for DescHTML.inc


Documentation for this file is available at DescHTML.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * All abstract representations of html tags in DocBlocks are handled by the * classes in this file * * Before version 1.2, phpDocumentor simply passed html to converters, without * much thought, except the {@link adv_htmlentities()} function was provided * along with a list of allowed html. That list is no longer used, in favor * of these classes. * * The PDF Converter output looked wretched in version 1.1.0 because line breaks * in DocBlocks were honored. This meant that output often had just a few words * on every other line! To fix this problem, DocBlock descriptions are now * parsed using the {@link ParserDescParser}, and split into paragraphs. In * addition, html in DocBlocks are parsed into these objects to allow for easy * conversion in destination converters. This design also allows different * conversion for different templates within a converter, which separates * design from logic almost 100% * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2007 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: DescHTML.inc 246329 2007-11-17 03:07:00Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserDocBlock, parserInclude, parserPage, parserClass * @see parserDefine, parserFunction, parserMethod, parserVar * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor */ /** * Used for <<code>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1253 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

* @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserCode */ class parserCode extends parserStringWithInlineTags { /** * performs the conversion of code tags * * @param Converter &$c the converter object * * @return string the converted code block * @uses Converter::ProgramExample() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { if (!isset($this-> value[0])) { return ''; } if (is_string($this-> value[0]) && $this-> value[0]{0} == "\n" $this-> value[0] = substr($this-> value[0], 1); } $linktags = array(); foreach ($this-> value as $val) { if (phpDocumentor_get_class($val) == 'parserlinkinlinetag' || phpDocumentor_get_class($val) == 'parsertutorialinlinetag' ) { $linktags[] = array( $c-> postProcess($val-> Convert($c, false, false)), $val); } } $a = $c-> ProgramExample(rtrim(ltrim(parent::Convert($c, false, false), "\n\r" ))); foreach ($linktags as $tag) { $a = str_replace($tag[0], $tag[1]-> Convert($c, false, false), $a); } return $a; } } /** * Used for <<pre>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserPre */ class parserPre extends parserStringWithInlineTags { /** * performs the conversion of code tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::PreserveWhiteSpace() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> PreserveWhiteSpace(rtrim(ltrim(parent::Convert($c, false, false), "\n\r" ))); } } /** * Used for <<b>> in a description *

) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1254 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

* @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserB */ class parserB extends parserStringWithInlineTags { /** * performs the conversion of bold tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Bolden() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Bolden(parent::Convert($c)); } } /** * Used for <<i>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserI */ class parserI extends parserStringWithInlineTags { /** * performs the conversion of italic tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Italicize() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Italicize(parent::Convert($c)); } } /** * Used for <<var>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserDescVar */ class parserDescVar extends parserStringWithInlineTags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1255 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

{ /** * performs the conversion of variable tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Varize() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Varize(parent::Convert($c)); } } /** * Used for <<samp>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserSamp */ class parserSamp extends parserStringWithInlineTags { /** * performs the conversion of sample tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Sampize() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Sampize(parent::Convert($c)); } } /** * Used for <<kbd>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserKbd */ class parserKbd extends parserStringWithInlineTags { /** * performs the conversion of keyboard tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Kbdize() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Kbdize(parent::Convert($c)); }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1256 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

} /** * Used for <<br>> in a description * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserBr */ class parserBr extends parserStringWithInlineTags { /** * performs the conversion of linebreak tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::Br() * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { return $c-> Br($this-> getString()); } } /** * Used for lists <<ol>> and <<ul>> * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DescHTML * @author Greg Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - rename class to ParserList */ class parserList extends parserStringWithInlineTags { /** * @var boolean */ var $numbered; /** * @var integer */ var $items = 0; /** * Constructor - create a new list * * @param integer $numbered a reference number for the new list */ function parserList($numbered) { $this-> numbered = $numbered; } /** * add an item to a list * * @param parserStringWithInlineTags $item the item to add * * @return void */ function addItem($item) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1257 of 1382

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423

$this-> }

value[$this->

items++] = $item;

/** * add a list * * @param parserList $list the list to add * * @return void */ function addList($list) { $this-> value[$this-> items++] = $list; } /** * performs the conversion of list tags * * @param Converter &$c the converter object * * @return string the converted pre block * @uses Converter::ListItem() enclose each item of the list * @uses Converter::EncloseList() enclose the list * @todo CS cleanup - rename method to convert() */ function Convert(& $c) { $list = ''; foreach ($this-> value as $item) { $list .= $c-> ListItem(trim($item-> Convert($c))); } return $c-> EncloseList($list, $this-> numbered); } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1258 of 1382

File Source for DocBlockTags.inc


Documentation for this file is available at DocBlockTags.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * All abstract representations of DocBlock tags are defined * by the classes in this file * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: DocBlockTags.inc 287889 2009-08-30 07:27:39Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserDocBlock, parserInclude, parserPage, parserClass * @see parserDefine, parserFunction, parserMethod, parserVar * @since separate file since version 1.2 * @todo CS cleanup - change package to PhpDocumentor */ /** * used to represent standard tags like @access, etc. * This class is aware of inline tags, and will automatically handle them * using inherited functions * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserTag extends parserStringWithInlineTags { /** * Type is used by many functions to skip the hassle of * if phpDocumentor_get_class($blah) == 'parserBlah' always '_tag' * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1259 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

*/ var $type = '_tag'; /** * tag name (see, access, etc.) * @var string */ var $keyword = ''; /** * Set up the tag * * {@source } * * @param string $keyword tag name * @param parserStringWithInlineTags $value tag value * @param boolean $noparse whether to parse the $value * for html tags */ function parserTag($keyword, $value, $noparse = false) { $this-> keyword = $keyword; if (!$noparse) { $parser = new parserDescParser; $parser-> subscribe('*', $this); $parser-> parse($value-> value, true, 'parserstringwithinlinetags'); } else { $this-> value = $value; } } /** * Perform the output conversion on this {@link parserTag} * using the {@link Converter output converter} that is passed in * * @param Converter &$converter the converter object * * @return string * @see Converter * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $converter) { if (is_array($this-> value)) { if (count($this-> value) == 1) { reset($this-> value); list(, $val) = each($this-> value); $a = $val-> Convert($converter); return $a; } $result = ''; foreach ($this-> value as $val) { // this is only true if we processed the description // in the constructor if (phpDocumentor_get_class($val) == 'parserstringwithinlinetags') { $result .= $converter-> EncloseParagraph($val-> Convert($converter)); } else { $result .= $val-> Convert($converter); } } return $result; } else { $a = $this-> value-> Convert($converter); return $a; } } /** * Gets a count of the number of paragraphs in this * tag's description. * * Useful in determining whether to enclose the * tag in a paragraph or not. * * @return integer (actually, body is empty, so it doesn't return at all) * @access private * @todo does this need to be implemented? its body is empty */ function _valueParagraphCount()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1260 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

{ } /** * Called by the {@link parserDescParser} when processing a description. * * @param integer $a not used * @param array $desc array of {@link parserStringWithInlineTags} * representing paragraphs in the tag description * * @return void * @see parserTag::parserTag() * @todo CS cleanup - rename to handleEvent for camelCase rule */ function HandleEvent($a,$desc) { $this-> value = $desc; } /** * Returns the text minus any inline tags * * @return string the text minus any inline tags * @see parserStringWithInlineTags::getString() */ function getString() { if (is_array($this-> value)) { $result = ''; foreach ($this-> value as $val) { $result .= $val-> getString(); } return $result; } else { return $this-> value-> getString(); } } } /** * This class represents the @name tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.name.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserNameTag extends parserTag { /** * tag name * @var string */ var $keyword = 'name'; /** * set up the name tag * * @param string $name tag name (not used) * @param string $value tag value */ function parserNameTag($name, $value) { $this-> value = $value; } /** * process this tag through the given output converter * * @param Converter &$c output converter * * @return string converted value of the tag

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1261 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

* @see parserStringWithInlineTags::Convert() * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { return $this-> value; } } /** * This class represents the @access tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.access.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserAccessTag extends parserTag { /** * tag name * @var string */ var $keyword = 'access'; /** * set to true if the returned tag has a value type of private, protected * or public, false otherwise * @var boolean */ var $isvalid = false; /** * checks $value to make sure it is private, protected or public, otherwise * it's not a valid @access tag * * @param parserStringWithInlineTags $value the tag value * * @see $isvalid */ function parserAccessTag($value) { if (!is_string($value)) { if (is_object($value)) { if (method_exists($value, 'getstring')) { $value = $value-> getString(); } } } switch(trim($value)) { case 'private' : case 'public' : case 'protected' : $this-> value = $value; $this-> isvalid = true; break; default : addError(PDERROR_ACCESS_WRONG_PARAM, $value); $this-> value = 'public'; break; } } /** * process this tag through the given output converter * * @param Converter &$converter the output converter * * @return string converted value of the tag * @see parserStringWithInlineTags::Convert() * @todo CS cleanup - rename to convert for camelCase rule */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1262 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

function Convert(& { return $this-> }

$converter) value;

/** * No inline tags are possible, returns 'public', 'protected' or 'private' * * @return string returns the text minus any inline tags */ function getString() { return $this-> value; } } /** * represents the "@return" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.return.pkg * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserReturnTag extends parserTag { /** * always 'return' * @var string */ var $keyword = 'return'; /** * the type a function returns */ var $returnType = 'void'; /** * contains a link to the documentation for a class * passed as a type in @return, @var or @param * * Example: * * <code> * class myclass * { * ... * } * /** @return myclass blahblahblah * ... * </code> * * In this case, $converted_returnType will contain a link to myclass * instead of the string 'myclass' * * @var mixed either the same as $returnType or a link to the docs for a class * @see $returnType */ var $converted_returnType = false; /** * set up the tag * * @param string $returnType returned datatype * @param parserStringWithInlineTags $value tag value */ function parserReturnTag($returnType, $value) { $this-> returnType = $returnType; parent::parserTag('return', $value); }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1263 of 1382

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467

/** * process this tag through the given output converter * (sets up the $converted_returnType) * * @param Converter &$converter the output converter * * @return string converted value of the tag * @see parserStringWithInlineTags::Convert(), $converted_returnType * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $converter) { $my_types = ''; if (strpos($this-> returnType, '|')) { $types = explode('|', $this-> returnType); foreach ($types as $returntype) { $a = $converter-> getLink($returntype); if (is_object($a) && phpDocumentor_get_class($a) == 'classlink') { if (!empty($my_types)) { $my_types .= '|'; } $my_types .= $converter-> returnSee($a, $converter-> type_adjust($returntype)); } else { if (!empty($my_types)) { $my_types .= '|'; } $my_types .= $converter-> type_adjust($returntype); } } $this-> converted_returnType = $my_types; } else { $a = $converter-> getLink($this-> returnType); if (is_object($a) && phpDocumentor_get_class($a) == 'classlink') { $this-> converted_returnType = $converter-> returnSee($a, $converter-> type_adjust($this-> returnType)); } else { $this-> converted_returnType = $converter-> type_adjust($this-> returnType); } } return parserTag::Convert($converter); } } /** * represents the "@property" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.property.pkg * @since 1.4.0a1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserPropertyTag extends parserReturnTag { /** * always 'property' * @var string */ var $keyword = 'property'; /** * the type a property has * @var string */ var $returnType = 'mixed'; /** * set up the property tag * * @param string $returnType the tag value's datatype * @param parserStringWithInlineTags $value the tag value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1264 of 1382

468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547

*/ function parserPropertyTag($returnType, $value) { $this-> returnType = $returnType; parent::parserTag($this-> keyword, $value); } } /** * represents the "@property-read" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.property.pkg * @since 1.4.0a1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserPropertyReadTag extends parserPropertyTag { /** * always 'property-read' * @var string */ var $keyword = 'property-read'; } /** * represents the "@property-write" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.property.pkg * @since 1.4.0a1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserPropertyWriteTag extends parserPropertyTag { /** * always 'property-write' * @var string */ var $keyword = 'property-write'; } /** * represents the "@method" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.method.pkg * @since 1.4.0a1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserMethodTag extends parserPropertyTag { /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1265 of 1382

548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627

* always 'method' * @var string */ var $keyword = 'method'; /** * the return type a method has * @var string */ var $returnType = 'void'; } /** * represents the "@var" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.var.pkg * @since 1.0rc1 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserVarTag extends parserReturnTag { /** * always 'var' * @var string */ var $keyword = 'var'; /** * the type a var has * @var string */ var $returnType = 'mixed'; } /** * represents the "@param" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.param.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserParamTag extends parserVarTag { /** * always 'param' * @var string */ var $keyword = 'param'; } /** * represents the "@staticvar" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.staticvar.pkg

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1266 of 1382

628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707

* @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserStaticvarTag extends parserParamTag { /** * always 'staticvar' * @var string */ var $keyword = 'staticvar'; } /** * represents the "@link" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1 * @tutorial tags.link.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserLinkTag extends parserTag { /** * always 'link' * @var string */ var $keyword = 'link'; /** * sets up the link tag * * @param string $link URL to link to * (might also contain the URL's * description text) */ function parserLinkTag($link) { $start = $val = $link-> getString(); if (strpos($val, ' ')) { $val = explode(' ', $val); $start = array_shift($val); $val = join($val, ' '); } $a = new parserLinkInlineTag($start, $val); $b = new parserStringWithInlineTags; $b-> add($a); $this-> value = $b; } } /** * represents the "@see" tag * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.0rc1 * @tutorial tags.see.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserSeeTag extends parserLinkTag { /** * always 'see'

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1267 of 1382

708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787

* @var string */ var $keyword = 'see'; /** * sets up the see tag * * @param string $name element to link to */ function parserSeeTag($name) { parserTag::parserTag($this-> keyword, $name, true); } /** * process this tag through the given output converter * * @param Converter &$converter the output converter * * @return string converted value of the tag * @see parserStringWithInlineTags::Convert() * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $converter) { if ($this-> value-> hasInlineTag()) { addErrorDie(PDERROR_INLINETAG_IN_SEE); } $a = $converter-> getLink(trim($this-> value-> Convert($converter))); if (is_string($a)) { // feature 564991 if (strpos($a, '://')) { // php function return $converter-> returnLink($a, str_replace('PHP_MANUAL#', '', $this-> value-> Convert($converter))); } return $a; } if (is_object($a)) { return $converter-> returnSee($a); } // getLink parsed a comma-delimited list of linked thingies, // add the commas back in if (is_array($a)) { $b = ''; foreach ($a as $i => $bub) { if (!empty($b)) { $b .= ', '; } if (is_string($a[$i])) { $b .= $a[$i]; } if (is_object($a[$i])) { $b .= $converter-> returnSee($a[$i]); } } return $b; } return false; } } /** * represents the "@see" tag * * Link to a license, instead of including lines and lines of license information * in every file * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.license.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1268 of 1382

788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867

*/ class parserLicenseTag extends parserLinkTag { /** * always 'license' * @var string */ var $keyword = 'license'; /** * set up the license tag * * @param string $name unused? * @param string $link URL to link to */ function parserLicenseTag($name, $link) { $a = explode(' ', $link-> getString()); $url = array_shift($a); $license = join($a, ' '); if (empty($license)) { $license = $url; } $a = new parserLinkInlineTag($url, $license); $b = new parserStringWithInlineTags; $b-> add($a); $this-> value = $b; } } /** * represents the "@uses" tag * * This is exactly like @see except that the element used * has a @useby link to this element added to its docblock * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @tutorial tags.uses.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserUsesTag extends parserSeeTag { /** * Always "uses" * @var string */ var $keyword = 'uses'; /** * @access private */ var $_description; /** * set up the uses tag * * @param string $seeel element to link to * @param parserStringWithInlineTags $description description of how * the element is used */ function parserUsesTag($seeel, $description) { if ($seeel-> hasInlineTag()) { addErrorDie(PDERROR_DUMB_USES); } parent::parserSeeTag($seeel); $this-> _description = $description; } /** * Return a link to documentation for other element,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1269 of 1382

868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947

* and description of how it is used * * Works exactly like {@link parent::Convert()} * except that it also includes a description of * how the element used is used. * * @param Converter &$c the output converter * * @return string link to the uses target * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { $val = $this-> value; $see = parent::Convert($c); $this-> value = $this-> _description; $desc_val = parserTag::Convert($c); if (!empty($desc_val)) { $see .= ' - '.$desc_val; } $this-> value = $val; return $see; } /** * Get the text of the link to the element that is being used * * @return string * @access private */ function getSeeElement() { return $this-> value-> getString(); } /** * Get the description of how the element used is being used. * * @return parserStringWithInlineTags */ function getDescription() { return $this-> _description; } } /** * This is a virtual tag, it is created by @uses to cross-reference the used element * * This is exactly like @uses. * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserUsedByTag extends parserUsesTag { /** * Always "usedby" * @var string */ var $keyword = 'usedby'; /** * @access private */ var $_link; /** * set up the usedby tag * * @param abstractLink $link

link of element that uses this element

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1270 of 1382

948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027

* @param string $description description of how the element is used */ function parserUsedByTag($link, $description) { $this-> value = $description; $this-> _link = $link; } /** * process this tag through the given output converter * * @param Converter &$c the output converter * * @return string * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { $see = $c-> returnSee($this-> _link); $desc_val = parserTag::Convert($c); if (!empty($desc_val)) { $see .= ' - '.$desc_val; } return $see; } } /** * represents "@tutorial" * * This is exactly like @see except that it only links to tutorials * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @tutorial phpDocumentor/tutorials.pkg * @tutorial tags.tutorial.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserTutorialTag extends parserSeeTag { /** * Always "tutorial" * @var string */ var $keyword = 'tutorial'; /** * process this tag through the given output converter * * @param Converter &$converter the output converter * * @return string|bool * @see parserStringWithInlineTags::Convert() * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $converter) { $a = $converter-> getTutorialLink(trim($this-> value-> Convert($converter))); if (is_string($a)) { return $a; } if (is_object($a)) { return $converter-> returnSee($a); } // getLink parsed a comma-delimited list of linked thingies, // add the commas back in if (is_array($a)) { $b = ''; foreach ($a as $i => $bub) { if (!empty($b)) { $b .= ', ';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1271 of 1382

1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107

} if (is_string($a[$i])) { $b .= $a[$i]; } if (is_object($a[$i])) { $b .= $converter-> returnSee($a[$i]); } } return $b; } return false; } } /** * represents "@filesource" * * Use this to create a link to a highlighted phpxref-style source file listing * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @tutorial tags.filesource.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserFileSourceTag extends parserTag { /** * Always "filesource" * @var string */ var $keyword = 'filesource'; /** * @var array */ var $source; /** * @var string */ var $path; /** * Flag variable, controls double writes of file for each converter * @var array * @access private */ var $_converted = array(); /** * Set {@link $source} to $value, and set up path * * @param string $filepath the file's path * @param array $value output from * {@link phpDocumentorTWordParser::getFileSource()} */ function parserFileSourceTag($filepath, $value) { parent::parserTag($this-> keyword, ''); $this-> path = $filepath; $this-> source = $value; } /** * Return a link to the highlighted source and generate the source * * @param Converter &$c the output converter * * @return string output from {@link getSourceLink()} * @uses ConvertSource() generate source code and write it out * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1272 of 1382

1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187

$this-> ConvertSource($c); return $this-> getSourceLink($c); } /** * convert the source code * * @param Converter &$c the output converter * * @return void * @uses phpDocumentor_HighlightParser highlights source code * @uses writeSource() * @todo CS cleanup - rename to convertSource for camelCase rule * @todo what's up with all the "return" statements? * can they _all_ be removed? */ function ConvertSource(& $c) { $this-> writeSource($c, $c-> ProgramExample($this-> source, true, false, false, false, $this-> return; $parser = new phpDocumentor_HighlightParser; $return = ''; $return = $parser-> parse($this-> source, $c, false, false, false, $this-> path); $this-> writeSource($c, $return); } /** * have the output converter write the source code * * @param Converter &$c the output converter * @param string $source highlighted source code * * @return void * @uses Converter::writeSource() export highlighted file source */ function writeSource(& $c, $source) { $c-> writeSource($this-> path, $source); } /** * gets path to the sourcecode file * * @param Converter &$c the output converter * * @return output from getSourceLink() * @uses Converter::getSourceLink() */ function getSourceLink(& $c) { return $c-> getSourceLink($this-> path); } } /** * represents "@example" * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage DocBlockTags * @author Greg Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.example.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserExampleTag extends parserFileSourceTag { /** * always "example" * @var string */ var $keyword = 'example';

path));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1273 of 1382

1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267

/** * Reads and parses the example file indicated * * The example tag takes one parameter: the full path to a php file that * should be parsed and included as an example. * * @param parserStringWithInlineTags $value tag value * @param string $current_path path of file containing * this @example tag * * @uses phpDocumentorTWordParser::getFileSource() uses to parse an example * and retrieve all tokens by line number * @todo does this "x = y = z = false" still work as expected in PHP5? * @todo CS cleanup - rename constant to TOKENIZER_EXT */ function parserExampleTag($value, $current_path) { global $_phpDocumentor_setting; parent::parserTag('example', $value); $path = false; // code thanks to Sam Blum, modified by Greg Beaver $tagValue = $value-> getString(); $path = $isAbsPath = $pathOnly = $fileName = $fileExt = $original_path = $title = false; do { // make sure the format is stuff.ext description if (!preg_match('`(.*)\.(\w*)\s(.*)`', $tagValue, $match)) { // or format is stuff.ext if (!preg_match('`(.*)\.(\w*)\s*$`', $tagValue, $match)) { // Murphy: Some funny path was given $original_path = $tagValue; // used for error output break; // try-block } } if (strlen($match[1]) === 0) { // Murphy: Some funny path was given $original_path = $tagValue; // used for error output break; // try-block } $fileExt = $match[2]; $title = 'example'; if (isset($match[3])) { $title = trim($match[3]); } // Replace windows '\' the path. $pathTmp = str_replace('\\', '/', $match[1]); // Is there a path and a file or is it just a file? if (strpos($pathTmp, '/') === false) { // No path part $pathOnly = ''; $fileName = $pathTmp .'.'. $fileExt; } else { // split the path on the last directory, find the filename $splitPos = strrpos($pathTmp, '/'); $pathOnly = substr($match[1], 0, $splitPos+1); $fileName = substr($match[1], $splitPos+1) .'.'. $fileExt; // Is the path absolute? (i.e. does it start like an absolute path?) if (('/' === $pathTmp[0]) || preg_match('`^\w*:`i', $pathTmp)) { // works for both windows 'C:' and URLs like 'http://' $isAbsPath = true; // Yes } } $original_path = $pathOnly . $fileName; // Now look for the file starting with abs. path. if ($isAbsPath) { // remove any weirdities like /../file.ext $tmp = realpath($original_path); if ($tmp && is_file($tmp)) { $path = $tmp; } // Alway break if abs. path was detected,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1274 of 1382

1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347

// even if file was not found. break; // try-block } // Search for the example file some standard places // 1) Look if the ini-var examplesdir is set and look there ... if (isset($_phpDocumentor_setting['examplesdir'])) { $tmp = realpath($_phpDocumentor_setting['examplesdir'] . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } // 2) Then try to look for an 'example/'-dir // below the *currently* parsed file ... if (!empty($current_path)) { $tmp = realpath(dirname($current_path) . PATH_DELIMITER . 'examples' . PATH_DELIMITER . $fileName); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } // 3) Then try to look for the example file // below the subdir PHPDOCUMENTOR_BASE/examples/ ... if (is_dir(PHPDOCUMENTOR_BASE . PATH_DELIMITER . 'examples')) { $tmp = realpath(PHPDOCUMENTOR_BASE . PATH_DELIMITER . 'examples' . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } $tmp = realpath(PHPDOCUMENTOR_BASE . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } // If we reach this point, nothing was found and $path is false. } while (false); if (!$path) { addWarning(PDERROR_EXAMPLE_NOT_FOUND, $original_path); $this-> _title = 'example not found'; $this-> path = false; } else { $this-> _title = ($title) ? $title : 'example'; // make a unique html-filename but avoid it to get too long. $uniqueFileName = str_replace(array(':', DIRECTORY_SEPARATOR, '/'), array('_', '_', '_'), $path); $uniqueFileName = substr($uniqueFileName, -50) . '_' . md5($path); $this-> path = $uniqueFileName; $f = @fopen($path, 'r'); if ($f) { $example = fread($f, filesize($path)); if (tokenizer_ext) { $obj = new phpDocumentorTWordParser; $obj-> setup($example); $this-> source = $obj-> getFileSource(); $this-> origsource = $example; unset($obj); } else { $this-> source = $example; } } } } /** * convert the source code * * @param Converter &$c the output converter * * @return void * @uses phpDocumentor_HighlightParser highlights source code

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1275 of 1382

1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396

* @uses writeSource() * @todo CS cleanup - rename to convertSource for camelCase rule * @todo what's up with all the "return" statements? * can they _all_ be removed? */ function ConvertSource(& $c) { $this-> writeSource($c, $c-> ProgramExample($this-> source, true, null, null, null, null, $this-> origsource)); return; $parser = new phpDocumentor_HighlightParser; $return = ''; $return = $parser-> parse($this-> source, $c); $this-> writeSource($c, $return); } /** * have the output converter write the source code * * @param Converter &$c the output converter * @param string $source highlighted source code * * @return void * @access private * @uses Converter::writeExample() writes final example out */ function writeSource(& $c, $source) { if ($this-> path) { $c-> writeExample($this-> _title, $this-> path, $source); } } /** * Retrieve a converter-specific link to the example * * @param Converter &$c the output converter * * @return string * @uses Converter::getExampleLink() retrieve the link to the example */ function getSourceLink(& $c) { if (!$this-> path) return $this-> _title; return $c-> getExampleLink($this-> path, $this-> _title); } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1276 of 1382

File Source for Errors.inc


Documentation for this file is available at Errors.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Error handling for phpDocumentor * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2001-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Errors * @author Greg Beaver <[email protected]> * @copyright 2001-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: Errors.inc 253641 2008-02-24 02:35:44Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserDocBlock, parserInclude, parserPage, parserClass * @see parserDefine, parserFunction, parserMethod, parserVar * @since 0.4 * @todo CS cleanup - change package to PhpDocumentor */ /** * warning triggered when inheritance could be from more than one class */ define("PDERROR_MULTIPLE_PARENT" , 1); /** * warning triggered when parent class doesn't exist */ define("PDERROR_PARENT_NOT_FOUND" , 2); /** * warning triggered when an {@inline tag} is not terminated * (no } before the * / ending the comment) */ define("PDERROR_UNTERMINATED_INLINE_TAG" , 3); /** * warning triggered when inheritance could be from more than one class */ define("PDERROR_CLASS_EXISTS" , 4); /** * warning triggered when inheritance could be from more than one class */ define("PDERROR_INHERITANCE_CONFLICT" , 5); /** * warning triggered when a converter is passed to * {@link phpDocumentor_IntermediateParser::addConverter()} that is not a class */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1277 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

define("PDERROR_CONVERTER_NOT_FOUND" , 6); /** * warning triggered when a converter is passed to * {@link phpDocumentor_IntermediateParser::addConverter()} that is not a class */ define("PDERROR_NO_CONVERTERS" , 7); /** * warning triggered when the arguments to @access are neither public nor private */ define("PDERROR_ACCESS_WRONG_PARAM" , 8); /** * warning triggered when there are multiple @access tags in a docblock */ define("PDERROR_MULTIPLE_ACCESS_TAGS" , 9); /** * warning triggered when there are multiple @return tags in a docblock */ define("PDERROR_MULTIPLE_RETURN_TAGS" , 10); /** * warning triggered when there are multiple @var tags in a docblock */ define("PDERROR_MULTIPLE_VAR_TAGS" , 11); /** * warning triggered when there are multiple @package tags in a docblock */ define("PDERROR_MULTIPLE_PACKAGE_TAGS" , 12); /** * warning triggered when there are multiple @subpackage tags in a docblock */ define("PDERROR_MULTIPLE_SUBPACKAGE_TAGS" , 13); /** * warning triggered when the package or subpackage name is illegal */ define("PDERROR_ILLEGAL_PACKAGENAME" , 14); /** * warning triggered when there a @package tag is used in a function, * define, method, var or include */ define("PDERROR_OVERRIDDEN_PACKAGE_TAGS" , 15); /** * warning triggered when there a @subpackage tag is used in a function, * define, method, var or include */ define("PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS" , 16); /** * warning triggered when classes in the same package have the same name */ define("PDERROR_CLASS_CONFLICT" , 17); /** * warning triggered when classes in the same package have the same name */ define("PDERROR_UNKNOWN_TAG" , 18); /** * warning triggered when there are multiple @name tags in a docblock */ define("PDERROR_MULTIPLE_NAME_TAGS" , 19); /** * warning triggered when there are multiple @name tags in a docblock * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE" , 20); /** * warning triggered when there are multiple @name tags in a docblock * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_GLOBAL_NOT_FOUND" , 21); /** * warning triggered when there are multiple @name tags in a docblock * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_MULTIPLE_GLOBAL_TAGS" , 22); /** * warning triggered when there are multiple @name tags in a docblock * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_MALFORMED_GLOBAL_TAG" , 23); /** * warning triggered when an @ignore tag is used in a DocBlock preceding * a method, variable, include, or global variable */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1278 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

define("PDERROR_IGNORE_TAG_IGNORED" , 24); /** * warning triggered when a duplicate element is encountered that will be * ignored by the documentor */ define("PDERROR_ELEMENT_IGNORED" , 25); /** * warning triggered when an entire page is ignored because of @access private */ define("PDERROR_PARSEPRIVATE" , 26); /** * warning triggered when an entire page is ignored because of @access private * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_UNKNOWN_COMMANDLINE" , 27); /** * warning triggered when an entire page is ignored because of @access private * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_NEED_WHITESPACE" , 28); /** * warning triggered when an entire page is ignored because of @access private * @todo I think this description is a copy/paste that was never updated */ define("PDERROR_CLASS_PARENT_NOT_FOUND" , 29); /** * warning triggered when a getClassByPackage is called and can't find the class */ define("PDERROR_CLASS_NOT_IN_PACKAGE" , 30); /** * warning triggered when a { @source } inline tag is used in a docblock not * preceding a function */ define("PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND" , 31); /** * warning triggered when a docblock template is never turned off * with /**#@-* / (no space) */ define("PDERROR_DB_TEMPLATE_UNTERMINATED" , 32); /** * warning triggered when a docblock has an unmatched &lt;ol&gt; or &lt;ul&gt; */ define("PDERROR_UNMATCHED_LIST_TAG" , 33); /** * warning triggered when another tag is nested in &lt;b&gt; * (not allowed in phpDocumentor) */ define("PDERROR_CANT_NEST_IN_B" , 34); /** * warning triggered when a docbook tag is not properly matched */ define("PDERROR_UNMATCHED_TUTORIAL_TAG" , 35); /** * warning triggered when an inline tag is found inside an xml tag name * in a package page */ define("PDERROR_CANT_HAVE_INLINE_IN_TAGNAME" , 36); /** * warning triggered when a tutorial is referenced * via @tutorial/{ @tutorial} and is not found */ define("PDERROR_TUTORIAL_NOT_FOUND" , 37); /** * warning triggered when a tutorial lists itself as a child tutorial */ define("PDERROR_TUTORIAL_IS_OWN_CHILD" , 38); /** * warning triggered when a tutorial's child lists the parent tutorial * as a child tutorial */ define("PDERROR_TUTORIAL_IS_OWN_GRANDPA" , 39); /** * warning triggered when a tutorial's child in the .ini file doesn't exist in the * package and subpackage of the parent */ define("PDERROR_CHILD_TUTORIAL_NOT_FOUND" , 40); /** * warning triggered when a <pdffunction:funcname /> tag is used in the PDF * Converter and no funcname is present (<pdffunction: />) */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1279 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

define("PDERROR_PDFFUNCTION_NO_FUNC" , 41); /** * warning triggered when a <pdffunction:funcname /> tag is used in the PDF * Converter and funcname is not a {@link Cezpdf} method */ define("PDERROR_PDF_METHOD_DOESNT_EXIST" , 42); /** * warning triggered when a <pdffunction:funcname arg=$tempvar/> tag * is used in the PDF * Converter and "tempvar" is not set from the return of a previous pdffunction tag */ define("PDERROR_PDF_TEMPVAR_DOESNT_EXIST" , 43); /** * warning triggered when a subsection's title is asked for, but the subsection * is not found */ define("PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND" , 44); /** * warning triggered when a subsection's title is asked for, but the subsection * is not found */ define("PDERROR_UNTERMINATED_ATTRIB" , 45); /** * warning triggered when no @package tag is used in a page-level * or class-level DocBlock */ define("PDERROR_NO_PACKAGE_TAG" , 46); /** * warning triggered when no @access private tag is used in a * global variable/method/var with _ as first char in name * and --pear was specified */ define("PDERROR_PRIVATE_ASSUMED" , 47); /** * warning triggered when an example's path from @example /path/to/example.php * is not found */ define("PDERROR_EXAMPLE_NOT_FOUND" , 48); /** * warning triggered when an example's path from @example /path/to/example.php * is not found */ define("PDERROR_NO_CONVERTER_HANDLER" , 49); /** * warning triggered when an example's path from @example /path/to/example.php * is not found */ define("PDERROR_INLINETAG_IN_SEE" , 50); /** * warning triggered when an id attribute in a tutorial docbook tag is not * an {@}id} inline tag */ define("PDERROR_ID_MUST_BE_INLINE" , 51); /** * warning triggered when an {@}internal}} tag is not closed */ define("PDERROR_INTERNAL_NOT_CLOSED" , 52); /** * warning triggered when an {@}source} tag is found in a short description */ define("PDERROR_SOURCE_TAG_IGNORED" , 53); /** * warning triggered when a child converter doesn't override * getFormattedClassTrees() */ define("PDERROR_CONVERTER_OVR_GFCT" , 54); /** * warning triggered when a package is already associated with a category, and * a new association is found */ define("PDERROR_PACKAGECAT_SET" , 55); /** * warning triggered when text in a docblock list is not contained in * an <<li>> opening tag */ define("PDERROR_TEXT_OUTSIDE_LI" , 56); /** * warning triggered when a DocBlock html tag is unclosed */ define("PDERROR_UNCLOSED_TAG" , 57);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1280 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

/** * warning triggered by @filesource, if PHP < 4.3.0 */ define("PDERROR_TAG_NOT_HANDLED" , 58); /** * warning triggered by sourcecode="on", if PHP < 4.3.0 */ define("PDERROR_SOURCECODE_IGNORED" , 59); /** * warning triggered by an empty tag */ define("PDERROR_MALFORMED_TAG" , 60); /** * warning triggered by more than 1 @category tag */ define("PDERROR_MULTIPLE_CATEGORY_TAGS" , 61); /** * warning triggered by {@}inheritdoc} in a non-inheritable situation */ define("PDERROR_INHERITDOC_DONT_WORK_HERE" , 62); /** * warning triggered by @example path/to/example with no title */ define("PDERROR_EMPTY_EXAMPLE_TITLE" , 63); /** * warning triggered by non-existent template directory */ define("PDERROR_TEMPLATEDIR_DOESNT_EXIST" , 64); /** * warning triggered by an unterminated entity in a tutorial */ define("PDERROR_UNTERMINATED_ENTITY" , 65); /** * warning triggered by an unterminated entity in a tutorial */ define("PDERROR_BEAUTIFYING_FAILED" , 66); /** * warning triggered by a function with no name * * <pre> * function ($params) * { * } * </pre> * triggers this error */ define("PDERROR_FUNCTION_HAS_NONAME" , 67); /** * warning triggered by a page-level docblock preceding a source element * * <code> * <?php * /** * * Page-level DocBlock * * @package pagepackage * *{@*} * include 'file.php'; * </code> */ define("PDERROR_DOCBLOCK_CONFLICT" , 68); /** * warning triggered when a file does not contain a page-level docblock */ define("PDERROR_NO_PAGE_LEVELDOCBLOCK" , 69); /** * warning triggered when the first docblock in a file with a @package tag * precedes a class. In this case, the class gets the docblock. */ define("PDERROR_DOCBLOCK_GOES_CLASS" , 70); /** * warning triggered in tutorial parsing if there is a missing {@id} inline tag */ define("PDERROR_NO_DOCBOOK_ID" , 71); /** * warning triggered if someone brilliant tries "class X extends X {" */ define("PDERROR_CANNOT_EXTEND_SELF" , 72); /** * warning triggered by improper "@uses {@link blah}" */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1281 of 1382

388 define("PDERROR_DUMB_USES" , 73); 389 /** 390 * warning triggered if <<ul>> is nested inside <<ul>> and not <<li>> 391 */ 392 define("PDERROR_UL_IN_UL" , 74); 393 /** 394 * warning triggered if a command line option does not have a valid value passed in 395 */ 396 define("PDERROR_INVALID_VALUES" , 75); 397 /** 398 * warning triggered when {@}internal}} is nested inside another {@}internal}} 399 */ 400 define("PDERROR_NESTED_INTERNAL" , 76); 401 /** 402 * warning triggered when @todo is used on an include element 403 */ 404 define("PDERROR_NOTODO_INCLUDE" , 77); 405 /** 406 * warning triggered when a class or method hasn't got docblock 407 */ 408 define("PDERROR_UNDOCUMENTED_ELEMENT" , 78); 409 /** 410 * warning triggered when any of {@}property}}, {@}property-read}}, 411 * {@}property-write}}, or {@}method}} tag does not have name 412 */ 413 define("PDERROR_MISSING_PROPERTY_TAG_NAME" , 79); 414 /** 415 * warning triggered when the PHP version being used has dangerous bug/behavior 416 */ 417 define("PDERROR_DANGEROUS_PHP_BUG_EXISTS" , 80); 418 /** 419 * warning triggered when the alias value in an page-level docblock's @name tag 420 * is the same value as the target filename is it supposed to alias 421 */ 422 define("PDERROR_NAME_ALIAS_SAME_AS_TARGET" , 81); 423 /** 424 * warning triggered when the a loop recursion tripwire has been tripped 425 */ 426 define("PDERROR_LOOP_RECURSION_LIMIT_REACHED" , 82); 427 428 /** 429 * Error messages for phpDocumentor parser warnings 430 * @global array $GLOBALS['phpDocumentor_warning_descrip'] 431 * @name $phpDocumentor_warning_descrip 432 */ 433 $GLOBALS['phpDocumentor_warning_descrip'] = 434 array( 435 PDERROR_MULTIPLE_PARENT => 436 'Class %s has multiple possible parents, package inheritance aborted' 437 , 438 PDERROR_PARENT_NOT_FOUND => 439 'Class %s parent %s not found' 440 , 441 PDERROR_INHERITANCE_CONFLICT => 442 'Class %s in file %s has multiple possible parents named %s. ' . 443 'Cannot resolve name conflict,' . "\n" . 444 ' try ignoring a file that contains the conflicting parent class' 445 , 446 PDERROR_UNKNOWN_TAG => 447 'Unknown tag "@%s" used' 448 , 449 PDERROR_IGNORE_TAG_IGNORED => 450 '@ignore tag used for %s element "%s" will be ignored' 451 , 452 PDERROR_ELEMENT_IGNORED => 453 "\n" . 'duplicate %s element "%s" in file %s will be ignored.' . "\n" . 454 'Use an @ignore tag on the original ' . 455 'if you want this case to be documented.' 456 , 457 PDERROR_PARSEPRIVATE => 458 "entire page %s ignored because of @access private." . "\n" 459 "Choose -pp to enable parsing of private elements" 460 , 461 PDERROR_CLASS_PARENT_NOT_FOUND => 462 "class %s in package %s parent not found in @see parent::%s" 463 , 464 PDERROR_CLASS_NOT_IN_PACKAGE => 465 "class %s was not found in package %s"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1282 of 1382

466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545

, PDERROR_DB_TEMPLATE_UNTERMINATED => 'docblock template never terminated with /**#@-*/' , PDERROR_PDF_METHOD_DOESNT_EXIST => '<pdffunction:%s /> called, but pdf method "%s" doesn\'t exist' , PDERROR_TUTORIAL_NOT_FOUND => "tutorial \"%s\" not found, does it exist?" , PDERROR_CHILD_TUTORIAL_NOT_FOUND => 'child tutorial "%s" listed in %s not found ' . 'in parent package "%s" subpackage "%s"' , PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND => 'tutorial %s subsection "%s" doesn\'t exist, ' . 'but its title was asked for' , PDERROR_NO_PACKAGE_TAG => 'no @package tag was used in a DocBlock for %s %s' , PDERROR_PRIVATE_ASSUMED => '%s "%s" is assumed to be @access private because its name ' 'starts with _, but has no @access tag' , PDERROR_EXAMPLE_NOT_FOUND => 'example file "%s" does not exist' , PDERROR_SOURCE_TAG_IGNORED => '{@source} can only be used in the long description, ' . 'not in the short description: "%s"' , PDERROR_PACKAGECAT_SET => 'package %s is already in category %s, ' . 'will now replace with category %s' , PDERROR_SOURCECODE_IGNORED => 'sourcecode command-line option is ignored ' . 'when your PHP build has no tokenizer support' , PDERROR_INHERITDOC_DONT_WORK_HERE => '{@inheritdoc} can only be used in the docblock of a child class' , PDERROR_EMPTY_EXAMPLE_TITLE => 'Example file found at "%s" has no title, using "%s"' , PDERROR_DOCBLOCK_CONFLICT => 'Page-level DocBlock precedes "%s %s", ' . 'use another DocBlock to document the source element' , PDERROR_NO_PAGE_LEVELDOCBLOCK => 'File "%s" has no page-level DocBlock, ' . 'use @package in the first DocBlock to create one' , PDERROR_DOCBLOCK_GOES_CLASS => 'DocBlock would be page-level, but precedes class "%s", ' . 'use another DocBlock to document the file' , PDERROR_NO_DOCBOOK_ID => 'Tutorial section %s "%s" has no id="{@id subsection}" tag ' '({@id} for refentry)' , PDERROR_BEAUTIFYING_FAILED => 'Beautifying failed: %s' , PDERROR_NOTODO_INCLUDE => '@todo on an include element is ignored (line %s, file %s)' , PDERROR_UNDOCUMENTED_ELEMENT => '%s "%s" has no %s-level DocBlock.' , PDERROR_MISSING_PROPERTY_TAG_NAME => '@%s magic tag does not have name, illegal. Ignoring tag "@%s %s %s"' , PDERROR_NAME_ALIAS_SAME_AS_TARGET => '@name value is the same as the filename it is supposed to alias' );

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1283 of 1382

546 //******************************************************** 547 548 549 550 /** 551 * Error messages for phpDocumentor parser errors 552 * @global array $GLOBALS['phpDocumentor_error_descrip'] 553 * @name $phpDocumentor_error_descrip 554 */ 555 $GLOBALS['phpDocumentor_error_descrip'] = 556 array( 557 PDERROR_UNTERMINATED_INLINE_TAG => 558 'Inline tag {@%s} in tag %s is unterminated, "%s"' 559 , 560 PDERROR_CLASS_EXISTS => 561 'Class %s already exists in package "%s"' 562 , 563 PDERROR_CONVERTER_NOT_FOUND => 564 'Converter %s specified by --output command-line option is not a class' 565 , 566 PDERROR_NO_CONVERTERS => 567 'No Converters have been specified by --output command-line option' 568 , 569 PDERROR_ACCESS_WRONG_PARAM => 570 '@access was passed neither "public" nor "private." Was passed: "%s"' 571 , 572 PDERROR_MULTIPLE_ACCESS_TAGS => 573 'DocBlock has multiple @access tags, illegal. ' . 574 'ignoring additional tag "@access %s"' 575 , 576 PDERROR_MULTIPLE_RETURN_TAGS => 577 'DocBlock has multiple @return tags, illegal. ' . 578 'ignoring additional tag "@return %s %s"' 579 , 580 PDERROR_MULTIPLE_VAR_TAGS => 581 'DocBlock has multiple @var tags, illegal. ' . 582 'ignoring additional tag "@var %s %s"' 583 , 584 PDERROR_MULTIPLE_PACKAGE_TAGS => 585 'DocBlock has multiple @package tags, illegal. ' . 586 'ignoring additional tag "@package %s"' 587 , 588 PDERROR_MULTIPLE_SUBPACKAGE_TAGS => 589 'DocBlock has multiple @subpackage tags, illegal. ' . 590 'ignoring additional tag "@subpackage %s"' 591 , 592 PDERROR_ILLEGAL_PACKAGENAME => 593 '@%s tag has illegal %s name "%s"' 594 , 595 PDERROR_OVERRIDDEN_PACKAGE_TAGS => 596 '%s %s\'s DocBlock has @package tag, illegal. ' . 597 'ignoring tag "@package %s"' 598 , 599 PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS => 600 '"%s" %s\'s DocBlock has @subpackage tags, illegal. ' . 601 'ignoring tag "@subpackage %s"' 602 , 603 PDERROR_CLASS_CONFLICT => 604 'class "%s" has multiple declarations in package %s, ' . 605 'in file %s and file %s, documentation will have output errors!' 606 , 607 PDERROR_MULTIPLE_NAME_TAGS => 608 'DocBlock has multiple @name tags, illegal. ' . 609 'ignoring additional tag "@name %s"' 610 , 611 PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE => 612 '-po (packageoutput) option deletes parent file "%s" containing class' . 613 ' "%s."' . "\n" . ' Try using --defaultpackagename (-dn) %s to ' . 614 'include the parent file in the same package as the class' 615 , 616 PDERROR_GLOBAL_NOT_FOUND => 617 'global variable %s specified in @global tag was never found' 618 , 619 PDERROR_MULTIPLE_GLOBAL_TAGS => 620 '@global define tag already used for global variable "%s", ' . 621 'ignoring @global %s' 622 , 623 PDERROR_MALFORMED_GLOBAL_TAG =>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1284 of 1382

624 'incorrect @global syntax. ' . 625 'Should be @global vartype $varname or @global vartype description' 626 , 627 PDERROR_UNKNOWN_COMMANDLINE => 628 'Unknown command-line option "%s" encountered, use phpdoc -h for help' 629 , 630 PDERROR_NEED_WHITESPACE => 631 'phpDocumentor programmer error - wordparser whitespace set to false ' . 632 'in handleDocBlock, notify developers. You should never see this error' 633 , 634 PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND => 635 '{@source} tag used in a docblock that isn\'t preceding a function' 636 , 637 PDERROR_UNMATCHED_LIST_TAG => 638 'unmatched ol or ul tag in DocBlock, parsing will be incorrect' 639 , 640 PDERROR_CANT_NEST_IN_B => 641 'Can\'t nest a code, pre, ul, or ol tag in a b tag in ' . 642 'phpDocumentor DocBlock (%s tag nested)' 643 , 644 PDERROR_UNMATCHED_TUTORIAL_TAG => 645 'While parsing extended documentation, "%s" tag was matched ' . 646 'with "%s" endtag, missing endtag' ."\ntag contents:\"%s\"" 647 , 648 PDERROR_CANT_HAVE_INLINE_IN_TAGNAME => 649 'Can\'t have an inline tag inside a package page XML tag!' 650 , 651 PDERROR_TUTORIAL_IS_OWN_CHILD => 652 'Tutorial %s lists itself as its own child in %s, illegal' 653 , 654 PDERROR_TUTORIAL_IS_OWN_GRANDPA => 655 'Tutorial %s\'s child %s lists %s as its child in %s, illegal' 656 , 657 PDERROR_PDFFUNCTION_NO_FUNC => 658 'Invalid pdffunction syntax: "<pdffunction: />", ' . 659 'should be "<pdffunction:functionname [arg="value"...]/>"' 660 , 661 PDERROR_PDF_TEMPVAR_DOESNT_EXIST => 662 '<pdffunction:%s arg=%s /> called ' . 663 'but temporary variable "%s" doesn\'t exist' 664 , 665 PDERROR_UNTERMINATED_ATTRIB => 666 'Tutorial tag %s attribute %s is unterminated, current value "%s"' 667 , 668 PDERROR_NO_CONVERTER_HANDLER => 669 'Handler for element of type "%s" called, but %s is not a method of %s' 670 , 671 PDERROR_INLINETAG_IN_SEE => 672 'Inline tags are not allowed in a @see tag' 673 , 674 PDERROR_ID_MUST_BE_INLINE => 675 '<%s id="%s"> must be <%s id="{@id %s}">' 676 , 677 PDERROR_INTERNAL_NOT_CLOSED => 678 '{@internal was never terminated with }}' 679 , 680 PDERROR_CONVERTER_OVR_GFCT => 681 'Converter "%s" must override getFormattedClassTrees() but doesn\'t' 682 , 683 PDERROR_TEXT_OUTSIDE_LI => 684 'Text cannot be outside of li tag in a DocBlock list, ' . 685 'parsing will be incorrect' 686 , 687 PDERROR_UNCLOSED_TAG => 688 'Unclosed %s tag in DocBlock, parsing will be incorrect' 689 , 690 PDERROR_TAG_NOT_HANDLED => 691 '"%s" tag is not available in PHP built without tokenizer support, tag ignored' 692 , 693 PDERROR_MALFORMED_TAG => 694 '"%s" tag was used without any parameters, illegal' 695 , 696 PDERROR_MULTIPLE_CATEGORY_TAGS => 697 'package has multiple @category tags, ignoring "@category %s"' 698 , 699 PDERROR_TEMPLATEDIR_DOESNT_EXIST => 700 'template directory "%s" does not exist' 701 ,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1285 of 1382

702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781

PDERROR_UNTERMINATED_ENTITY => 'entity &%s is unterminated' , PDERROR_FUNCTION_HAS_NONAME => 'function has no name (PHP error - test your file before parsing!)' , PDERROR_CANNOT_EXTEND_SELF => 'class %s cannot extend itself - TEST YOUR CODE BEFORE PARSING' , PDERROR_DUMB_USES => '@uses can only link to string data' , PDERROR_UL_IN_UL => 'ul/ol tags cannot be directly nested inside ul/ol, nest inside li' , PDERROR_INVALID_VALUES => 'command %s was passed "%s" but must be one of %s' , PDERROR_NESTED_INTERNAL => '{@internal}} cannot be nested inside {@internal}}' , PDERROR_DANGEROUS_PHP_BUG_EXISTS => 'Dangerous PHP Bug exists in PHP version %s that can be triggered ' . 'by this parse (see PHP Bug #%s and PEAR Bug #%s)' , PDERROR_LOOP_RECURSION_LIMIT_REACHED => 'An internal loop in PhpDocumentor has reached its preset ' . 'recursion limit, preventing a possible infinite loop condition.' ); /** * encapsulates warning information * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Errors * @author Greg Beaver <[email protected]> * @copyright 2001-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor */ class RecordWarning { /** * name of global variable that descriptors for this warning/error is kept * @var string */ var $type = 'phpDocumentor_warning_descrip'; /** * file this error occurred in * @var string */ var $file = false; /** * line number of the file this error occurred in * @var integer */ var $linenum; /** * error string * @var string */ var $data; /** * error number * @see Errors.inc * @var string */ var $num; /** * Constructor * * @param string $file filename this error occurred in ({@link $file}) * @param integer $linenum line number this error occurred on ({@link $linenum}) * @param integer $num Error number defined in {@link Errors.inc} * @param string $data... variable number of strings, up to 4, *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1286 of 1382

782 * @todo CS Cleanup - do I need to add $data to the method signature? 783 * to sprintf based on the error number 784 */ 785 function RecordWarning($file, $linenum, $num) 786 { 787 $this-> file = $file; 788 $this-> linenum = $linenum; 789 $a = array('', '', '', ''); 790 if (func_num_args()> 3) { 791 for ($i=3;$i< func_num_args();$i++) { 792 $a[$i - 3] = func_get_arg($i); 793 } 794 } 795 796 $this-> num = $num; 797 $this-> data = 798 sprintf($GLOBALS[$this-> type][$this-> num], $a[0], $a[1], $a[2], $a[3]); 799 $this-> output(); 800 } 801 802 /** 803 * prints the warning 804 * 805 * @param string $string the warning to print 806 * 807 * @return void 808 */ 809 function output($string = false) 810 { 811 if ($string) { 812 if ($this-> file) { 813 return 814 " WARNING in $this-> file on line $this-> linenum: $this> data\n" ; 815 } else { 816 return " WARNING: $this-> data\n" ; 817 } 818 } 819 if ($this-> file) { 820 phpDocumentor_out(" WARNING in $this-> file " . 821 " on line $this-> linenum: $this-> data\n" ); 822 } else { 823 phpDocumentor_out(" WARNING: $this-> data\n" ); 824 } 825 flush(); 826 } 827 } 828 829 /** 830 * encapsulates error information 831 * 832 * @category ToolsAndUtilities 833 * @package phpDocumentor 834 * @subpackage Errors 835 * @author Greg Beaver <[email protected]> 836 * @copyright 2001-2008 Gregory Beaver 837 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 838 * @version Release: @VER@ 839 * @link http://www.phpdoc.org 840 * @link http://pear.php.net/PhpDocumentor 841 * @todo CS cleanup - change package to PhpDocumentor 842 */ 843 class RecordError extends RecordWarning 844 { 845 /** 846 * name of global variable that descriptors for this warning/error is kept 847 * @var string 848 */ 849 var $type = 'phpDocumentor_error_descrip'; 850 851 /** 852 * prints the error 853 * 854 * @param string $string the error to print 855 * 856 * @return string 857 */ 858 function output($string = false) 859 { 860 if ($string) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1287 of 1382

861 if ($this-> file) { 862 return 863 " \n\tERROR in $this-> file on line $this-> linenum: $this> data\n" 864 ; 865 } else { 866 return " \n\tERROR: $this-> data\n" ; 867 } 868 } 869 if ($this-> file) { 870 phpDocumentor_out(" \n\tERROR in $this-> file " . 871 " on line $this-> linenum: $this-> data\n" ); 872 } else { 873 phpDocumentor_out(" \n\tERROR: $this-> data\n" ); 874 } 875 flush(); 876 } 877 } 878 879 /** 880 * contains all the errors/warnings 881 * 882 * @category ToolsAndUtilities 883 * @package phpDocumentor 884 * @subpackage Errors 885 * @author Greg Beaver <[email protected]> 886 * @copyright 2001-2008 Gregory Beaver 887 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 888 * @version Release: @VER@ 889 * @link http://www.phpdoc.org 890 * @link http://pear.php.net/PhpDocumentor 891 * @todo CS cleanup - change package to PhpDocumentor 892 * @see $errors, $warnings 893 */ 894 class ErrorTracker 895 { 896 /** 897 * array of {@link RecordError}s 898 * @var array 899 */ 900 var $errors = array(); 901 /** 902 * array of {@link RecordWarning}s 903 * @var array 904 */ 905 var $warnings = array(); 906 /** 907 * @var string 908 */ 909 var $curfile = ''; 910 /** 911 * @var integer 912 */ 913 var $linenum = 0; 914 915 /** 916 * index in {@link $errors} of last error triggered 917 * @var integer|false 918 */ 919 var $lasterror = false; 920 921 /** 922 * index in {@link $warnings} of last warning triggered 923 * @var integer|false 924 */ 925 var $lastwarning = false; 926 927 /** 928 * This function subscribes to two events in the Parser 929 * in order to keep track of line number information and file name. 930 * 931 * @param integer $num parser-passed event 932 * (see {@link PHPDOCUMENTOR_EVENT_NEWLINENUM,} 933 * PHPDOCUMENTOR_EVENT_NEWFILE}) 934 * @param mixed $data either a line number if $num is 935 * PHPDOCUMENTOR_EVENT_NEWLINENUM or a file name 936 * if $num is PHPDOCUMENTOR_EVENT_NEWFILE 937 * 938 * @return void 939 */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1288 of 1382

940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019

function handleEvent($num,$data) { switch($num) { case PHPDOCUMENTOR_EVENT_NEWLINENUM : $this-> linenum = $data; break; case PHPDOCUMENTOR_EVENT_NEWFILE : $this-> linenum = 0; $this-> curfile = $data; break; case 1000000635 : // debugging phpDocumentor_out($this-> curfile . ' has ' . $this-> linenum . ' lines' . "\n" flush(); break; } } /** * add a new warning to the {@link $warnings} array * * @param integer $num error number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @todo CS Cleanup - do I need to add $data to the method signature? */ function addWarning($num) { $a = array('', '', '', ''); if (func_num_args()> 1) { for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $this-> warnings[] = new RecordWarning($this-> curfile, $this-> linenum, $num, $a[0], $a[1], $a[2], $a[3]); $this-> lastwarning = count($this-> warnings) - 1; } /** * add a new error to the {@link $errors} array * * @param integer $num error number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @todo CS Cleanup - do I need to add $data to the method signature? */ function addError($num) { $a = array('', '', '', ''); if (func_num_args()> 1) { for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $this-> errors[] = new RecordError($this-> curfile, $this-> linenum, $num, $a[0], $a[1], $a[2], $a[3]); $this-> lasterror = count($this-> errors) - 1; } /** * add a new error to the {@link $errors} array and returns the error string * * @param integer $num error number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @todo CS Cleanup - do I need to add $data to the method signature? */ function addErrorReturn($num) { $a = array('', '', '', ''); if (func_num_args()> 1) {

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1289 of 1382

1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099

for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $this-> errors[] = new RecordError($this-> curfile, $this-> linenum, $num, $a[0], $a[1], $a[2], $a[3], false); $this-> lasterror = count($this-> errors) - 1; } /** * Get sorted array of all warnings in parsing/conversion * * @return array */ function & returnWarnings() { usort($this-> warnings, array($this, "errorsort" return $this-> warnings; }

));

/** * Get sorted array of all non-fatal errors in parsing/conversion * * @return array */ function & returnErrors() { usort($this-> errors, array($this, "errorsort" )); return $this-> errors; } /** * sort two errors * * @param RecordError|RecordWarning$a the first error/warning * @param RecordError|RecordWarning$b the second error/warning * * @return int * @access private */ function errorsort($a, $b) { if (!$a-> file) return -1; if (!$b-> file) return 1; if ($a-> file == $b-> file) { if ($a-> linenum == $b-> linenum) return 0; if ($a-> linenum < $b-> linenum) return -1; return 1; } return strnatcasecmp($a-> file, $b-> file); } /** * Get the error message of the last error * * @return string */ function returnLastError() { return $this-> errors[$this-> lasterror]-> }

output(true);

/** * Get the warning message of the last warning * * @return string */ function returnLastWarning() { return $this-> warnings[$this-> lastwarning]-> } } /** * @global ErrorTracker $GLOBALS['phpDocumentor_errors'] * @name $phpDocumentor_errors */ $GLOBALS['phpDocumentor_errors'] = new ErrorTracker; /**

output(true);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1290 of 1382

1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172

* add an Error * * @param integer $num error number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @see ErrorTracker::addError() * @todo CS Cleanup - do I need to add $data to the method signature? */ function addError($num) { global $phpDocumentor_errors; $a = array('', '', '', ''); if (func_num_args()> 1) { for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $phpDocumentor_errors-> addError($num, $a[0], $a[1], $a[2], $a[3]); } /** * like {@link addError()} but exits parsing * * @param integer $num error number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @global ErrorTracker repository for all errors generated by phpDocumentor * @see ErrorTracker::addError() * @todo CS Cleanup - do I need to add $data to the method signature? */ function addErrorDie($num) { global $phpDocumentor_errors; $a = array('', '', '', ''); if (func_num_args()> 1) { for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $phpDocumentor_errors-> addErrorReturn($num, $a[0], $a[1], $a[2], $a[3]); echo $phpDocumentor_errors-> returnLastError(); die(1); } /** * add a Warning * * @param integer $num warning number from {@link Errors.inc} * @param string $data... up to 4 string parameters to sprintf() * into the error string for error number $num * * @return void * @global ErrorTracker repository for all errors generated by phpDocumentor * @see ErrorTracker::addWarning() * @todo CS Cleanup - do I need to add $data to the method signature? */ function addWarning($num) { global $phpDocumentor_errors; $a = array('', '', '', ''); if (func_num_args()> 1) { for ($i=1;$i< func_num_args();$i++) { $a[$i - 1] = func_get_arg($i); } } $phpDocumentor_errors-> } ?> addWarning($num, $a[0], $a[1], $a[2], $a[3]);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1291 of 1382

File Source for InlineTags.inc


Documentation for this file is available at InlineTags.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * All abstract representations of inline tags are in this file * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: InlineTags.inc 286921 2009-08-08 05:01:24Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since separate file since 1.2 * @todo CS cleanup - change package to PhpDocumentor */ /** * Use this element to represent an {@}inline tag} like {@}link} * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @since 1.0rc1 * @tutorial inlinetags.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserInlineTag extends parserBase { /** * Element type * * Type is used by many functions to skip the hassle of *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1292 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

* <code> * if phpDocumentor_get_class($blah) == 'parserBlah' * </code> * always "inlinetag" * @var string */ var $type = 'inlinetag'; /** * the name of the inline tag (like link) * @var string */ var $inlinetype = ''; /** * sets up the tag * * @param string $type tag type (example: link) * @param string $value tag value (example: what to link to) */ function parserInlineTag($type, $value) { $this-> inlinetype = $type; $this-> value = trim($value); } /** * get length of the tag * * @return integer length of the tag * @todo CS cleanup - rename to strLen for camelCase rule */ function Strlen() { // fix 1203451 if (is_array($this-> value)) { return array_reduce(create_function('$a, $b', 'return $a + strlen($b);')) + count($this-> value); } return strlen($this-> value); } /** * always gets an empty string * * @return string always '', used by {@link Parser::handleDocBlock()} to * calculate the short description of a DocBlock * @see parserStringWithInlineTags::getString() * @see parserStringWithInlineTags::trimmedStrlen() */ function getString() { return ''; } } /** * represents inline links * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @since 1.0rc1 * @tutorial tags.inlinelink.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserLinkInlineTag extends parserInlineTag { /** * text to display in the link, can be different from the link for standard * links like websites * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1293 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

*/ var $linktext = ''; /** * sets up the tag * * @param string $link stored in $value, see {@link parserBase::$value} * @param string $text see {@link $linktext} */ function parserLinkInlineTag($link, $text) { if (strpos($link, ',')) { $link = explode(',', $link); parserInlineTag::parserInlineTag('link', ''); $this-> value = $link; } else { parserInlineTag::parserInlineTag('link', $link); } $this-> linktext = trim($text); } /** * calls the output conversion * * @param Converter &$c converter used to change the abstract link * into text for display * * @return false|stringreturns the converted link or false * if not converted successfully * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { if (is_array($this-> value)) { $ret = ''; foreach ($this-> value as $text) { if (!empty($ret)) { $ret .= ', '; } $ret .= $this-> ConvertPart($c, trim($text)); } return $ret; } else { return $this-> ConvertPart($c, $this-> value); } } /** * convert part of the tag * * @param Converter &$c the output converter * @param string $value the tag value * * @return string * @todo CS cleanup - rename to convertPart for camelCase rule */ function ConvertPart(& $c, $value) { if (strpos($value, '://') || (strpos($value, 'mailto:') === 0)) { if (strpos($value, ' ')) { $value = explode(' ', $value); $link = array_shift($value); $text = join(' ', $value); } else { $link = $value; $text = $this-> linktext; } return $c-> returnLink($link, htmlspecialchars($text)); } else { $savevalue = $value; $descrip = false; if (strpos(trim($value), ' ')) { $v = preg_split('/\s/', trim($value)); if (in_array(strtolower($v[0]), array('object', 'function'))) { if (!isset($v[1]) || (isset($v[1]) && strlen($v[1]) && ! in_array($v[1]{0}, array('$','&' )) && $v[1] != '###commanana####' ) ) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1294 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

$vsave = $v[0]; array_shift($v); $v[0] = $vsave . ' ' . $v[0]; } } $value = $c-> getLink($v[0]); array_shift($v); $descrip = join($v, ' '); $descrip = str_replace('###commanana####', ',', $descrip); } else { $value = $c-> getLink($value); } if (is_string($value)) { // feature 564991 if (strpos($value, '://')) { // php function return $c-> returnLink($value, $descrip ? $descrip : str_replace('PHP_MANUAL#', '', $value)); } return $value; } if (!$descrip) { $descrip = $c-> type_adjust($savevalue); } if (is_object($value)) { return $c-> returnSee($value, $descrip); } return $savevalue; } } } /** * Represents inline links to external tutorial documentation * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlinetutorial.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserTutorialInlineTag extends parserLinkInlineTag { /** * constructor * * @param string $link stored in $value, see {@link parserBase::$value} * @param string $text see {@link $linktext} */ function parserTutorialInlineTag($link,$text) { parserInlineTag::parserInlineTag('tutorial', $link); $this-> linktext = trim($text); } /** * convert part of the tag * * @param Converter &$c converter used to change the abstract link * into text for display * * @return mixed returns the converted link * or false if not converted successfully * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { $descrip = false; if (strpos($this-> value, ',') === false) { if (strpos(trim($this-> value), ' ')) { $v = explode(' ', trim($this-> value));

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1295 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

$value = $c-> getTutorialLink($v[0]); array_shift($v); $descrip = join($v, ' '); } else { $value = $c-> getTutorialLink($this-> value); } } else { $vals = explode(',', $this-> value); $descrip = array(); foreach ($vals as $val) { $val = trim($val); if (strpos($val, ' ')) { $v = explode(' ', $val); $value[] = $c-> getTutorialLink($v[0]); array_shift($v); $descrip[] = join($v, ' '); } else { $value[] = $c-> getTutorialLink($val); $descrip[] = false; } } } if (is_string($value)) { return $value; } if (is_object($value)) { return $c-> returnSee($value, $descrip); } /* * getLink parsed a comma-delimited list of linked thingies, * add the commas back in */ if (is_array($value)) { $a = ''; foreach ($value as $i => $bub) { if (!empty($a)) { $a .= ', '; } if (is_string($value[$i])) { $a .= $value[$i]; } if (is_object($value[$i])) { $a .= $c-> returnSee($value[$i], $descrip[$i]); } } return $a; } return false; } } /** * represents inline source tag, used for function/method source * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlinesource.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserSourceInlineTag extends parserInlineTag { /** * always 'source' * @var string */ var $inlinetype = 'source'; /** * First line of source code to display * @var integer * @see $end

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1296 of 1382

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467

*/ var $start = 1; /** * Last line to display * @var '*'|integerIf '*' then the whole source will be used, otherwise * the {@link $start} to $end line numbers will be displayed */ var $end = '*'; /** * tokenized source organized by line numbers for php 4.3.0+, the old * {@}source} tag used a string * @var string|array */ var $source = false; /**#@+ @access private */ /** @var string|false*/ var $_class; /**#@-*/ /** * constructor * * @param string $value format "start [end]", * where start and end are line numbers * with the end line number optional */ function parserSourceInlineTag($value) { parserInlineTag::parserInlineTag('source', ''); preg_match('/^([0-9]+)\W([0-9]*)$/', trim($value), $match); if (!count($match)) { preg_match('/^([0-9]+)$/', trim($value), $match); if (count($match)) { $this-> start = (int) $match[1]; } } else { $this-> start = (int) $match[1]; $this-> end = (int) $match[2]; } } /** * only used to determine blank lines. * * @return int */ function Strlen() { return 1; } /** * gets the source string * * @return string */ function getString() { return '{@source}'; } /** * sets the source tag's value * * @param string|array$source source code * @param string|bool $class class name if this is a method, * boolean in php 4.3.0, * if this is a method this will be true * * @return void */ function setSource($source, $class = false) { if (is_array($source)) { $this-> _class = $class; $this-> source = $source; } else { $source = strstr($source, 'function'); $pos = strrpos($source, '}'); $this-> source = substr($source, 0, $pos + 1); {@}source} will not be blank, probably

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1297 of 1382

468 } 469 } 470 471 /** 472 * convert the tag 473 * 474 * @param Converter &$c the output converter object 475 * 476 * @return string 477 * @uses stringConvert() in PHP 4.2.3-, this method is used to convert 478 * @uses arrayConvert() in PHP 4.3.0+, this method is used to convert 479 * @todo CS cleanup - rename to convert for camelCase rule 480 */ 481 function Convert(& $c) 482 { 483 if (is_string($this-> source)) { 484 return $this-> stringConvert($c); 485 } 486 return $this-> arrayConvert($c); 487 } 488 489 /** 490 * converter helper used in PHP 4.3.0+ 491 * 492 * @param Converter &$c the output converter object 493 * 494 * @return string 495 * @uses phpDocumentor_HighlightParser Parses the tokenized source 496 */ 497 function arrayConvert(& $c) 498 { 499 $source = $this-> source; 500 if ($this-> end != '*') { 501 $source = array_slice($this-> source, 0, $this-> end + $this-> start - 1); 502 } 503 $start = $this-> start - 1; 504 if ($start < 0) { 505 $start = 0; 506 } 507 return $c-> ProgramExample($source, true, true, $this-> _class, $start); 508 } 509 510 /** 511 * converter helper used in PHP 4.2.3512 * 513 * @param Converter &$c the output converter object 514 * 515 * @return string 516 * @uses Converter::unmangle() remove the extraneous stuff from 517 * {@link highlight_string()} 518 * @deprecated in favor of PHP 4.3.0+ {@link arrayConvert()} 519 */ 520 function stringConvert(& $c) 521 { 522 $source = highlight_string('<?php ' . $this-> source . ' ?>' , true); 523 $source = '<code>' . substr($source, strlen('<code><font color="#000000"> 524 <font color="#0000CC">&lt;?php&nbsp;</font>' ) - 1); 525 $source = str_replace('}&nbsp;</font><font color="#0000CC">?&gt;</font>' , 526 '}</font></code>' , $source); 527 if ($this-> start || ($this-> end != '*')) { 528 $source = explode('<br />' , $source); 529 $start = $this-> start; 530 if ($this-> end != '*') { 531 $source = array_slice($source, $start - 1, $this-> end - $start + 1); 532 } else { 533 $source = array_slice($source, $start - 1); 534 } 535 $source = implode($source, '<br />' ); 536 if ($start > 0) { 537 $source = " <code> $source" ; 538 } 539 if ($this-> end != '*') { 540 $source = " $source</code> " ; 541 } 542 } 543 $source = $c-> unmangle($source, $this-> source); 544 return $source; 545 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1298 of 1382

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625

} /** * Represents the example inline tag, used to display an example file * inside a docblock or tutorial * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlineexample.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserExampleInlineTag extends parserSourceInlineTag { /** * constructor * * @param string $value format "filepath[ start [end]]" * where start and end are line numbers * with the end line number optional * @param string $current_path full path to the current file, * used to check relative directory locations * @param bool $isTutorial if true, then this is in a tutorial * * @return mixed * @todo replace tokenizer_ext constant with TOKENIZER_EXT for CS rule */ function parserExampleInlineTag($value, $current_path, $isTutorial = false) { global $_phpDocumentor_setting; parserInlineTag::parserInlineTag('example', ''); $path = false; $tagValue = trim($value); $path = $isAbsPath = $pathOnly = $fileName = $fileExt = $original_path = $title = false; do { // make sure the format is stuff.ext startline[ endline] if (!preg_match('`(.*)\.(\w*)\s(.*)`', $tagValue, $match)) { // or format is stuff.ext if (!preg_match('`(.*)\.(\w*)\s*$`', $tagValue, $match)) { // Murphy: Some funny path was given $original_path = $tagValue; // used for error output break; // try-block } } if (strlen($match[1]) === 0) { // Murphy: Some funny path was given $original_path = $tagValue; // used for error output break; // try-block } $fileExt = $match[2]; if (isset($match[3])) { $lines = explode(' ', trim($match[3])); $this-> start = (int) $lines[0]; if (isset($lines[1])) { $this-> end = (int) $lines[1]; } } // Replace windows '\' the path. $pathTmp = str_replace('\\', '/', $match[1]); // Is there a path and a file or is it just a file? if (strpos($pathTmp, '/') === false) { // No path part $pathOnly = ''; $fileName = $pathTmp .'.'. $fileExt; } else { // split the path on the last directory, find the filename $splitPos = strrpos($pathTmp, '/'); $pathOnly = substr($match[1], 0, $splitPos+1); $fileName = substr($match[1], $splitPos+1) .'.'. $fileExt;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1299 of 1382

626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705

// Is the path absolute? (i.e. does it start like an absolute path?) if (('/' === $pathTmp[0]) || preg_match('`^\w*:`i', $pathTmp)) { // works for both windows 'C:' and URLs like 'http://' $isAbsPath = true; // Yes } } $original_path = $pathOnly . $fileName; // Now look for the file starting with abs. path. if ($isAbsPath) { // remove any weirdities like /../file.ext $tmp = realpath($original_path); if ($tmp && is_file($tmp)) { $path = $tmp; } /* * Alway break if abs. path was detected, * even if file was not found. */ break; // try-block } // Search for the example file some standard places // 1) Look if the ini-var examplesdir is set and look there ... if (isset($_phpDocumentor_setting['examplesdir'])) { $tmp = realpath($_phpDocumentor_setting['examplesdir'] . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } // 2) Then try to look for an 'example/'-dir // below the *currently* parsed file ... if (!empty($current_path)) { $tmp = realpath(dirname($current_path) . PATH_DELIMITER . 'examples' . PATH_DELIMITER . $fileName); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } // 3) Then try to look for the example file // below the subdir PHPDOCUMENTOR_BASE/examples/ ... if (is_dir(PHPDOCUMENTOR_BASE . PATH_DELIMITER . 'examples')) { $tmp = realpath(PHPDOCUMENTOR_BASE . PATH_DELIMITER . 'examples' . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } } $tmp = realpath(PHPDOCUMENTOR_BASE . PATH_DELIMITER . $original_path); if ($tmp && is_file($tmp)) { $path = $tmp; // Yo! found it :) break; // try-block } // If we reach this point, nothing was found and $path is false. } while (false); if (!$path) { addWarning(PDERROR_EXAMPLE_NOT_FOUND, $original_path); $this-> path = false; } else { $f = @fopen($path, 'r'); if ($f) { $example = fread($f, filesize($path)); if (tokenizer_ext && ! $isTutorial) { $obj = new phpDocumentorTWordParser; $obj-> setup($example); $this-> setSource($obj-> getFileSource()); unset($obj); } else { $this-> setSource($example); } }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1300 of 1382

706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785

} } /** * sets the source * * @param string|array$source source code * @param string|bool $class class name if this is a method, * boolean in php 4.3.0, * if this is a method this will be true * * @return void */ function setSource($source, $class = false) { $this-> _class = $class; $this-> source = $source; } /** * converter helper for PHP 4.3.0+ * * @param Converter &$c output converter * * @return string * @uses phpDocumentor_HighlightParser Parses the tokenized source */ function arrayConvert(& $c) { $source = $this-> source; if ($this-> end != '*') { $source = array_slice($this-> source, 0, $this-> end + $this-> start - 1); } $start = $this-> start - 1; if ($start < 0) { $start = 0; } return $c-> exampleProgramExample($source, true, true, $this-> _class, $start); } /** * Return the source for the example file, enclosed in * a <programlisting> tag to use in a tutorial * * @return string */ function getProgramListing() { $source = explode("\n" , $this-> source); $start = $this-> start; if ($this-> end != '*') { $source = array_slice($source, $start - 1, $this-> } else { $source = array_slice($source, $start - 1); } $source = join("\n" , $source); return "<programlisting role=\"php\"> <![CDATA[\n" . $source . "\n]]>\n</programlisting>" ; } } /** * Represents the inheritdoc inline tag, used by classes/methods/vars to inherit * documentation from the parent class if possible * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlineinheritdoc.pkg

end - $start + 1);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1301 of 1382

786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865

* @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserInheritdocInlineTag extends parserInlineTag { /** * always 'inheritdoc' * @var string */ var $inlinetype = 'inheritdoc'; /** * Does nothing, overrides parent constructor */ function parserInheritdocInlineTag() { } /** * only sets a warning and returns empty * * @return string * @todo CS cleanup - rename to convert for camelCase rule */ function Convert() { addWarning(PDERROR_INHERITDOC_DONT_WORK_HERE); return ''; } } /** * Represents the inline {@}id} tag for tutorials * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlineid.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserIdInlineTag extends parserInlineTag { /** * always 'id' * @var string */ var $inlinetype = 'id'; /** * package of the {@}id} * @var string */ var $package = 'default'; /** * category of the {@}id} * @var string */ var $category = 'default'; /** * subpackage of the {@}id} * @var string */ var $subpackage = ''; /** * full name of the tutorial * @var string */ var $tutorial; /** * section/subsection name * @var string */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1302 of 1382

866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945

var $id; /** * constructor * * @param string $category category name * @param string $package package name * @param string $subpackage subpackage name * @param string $tutorial tutorial name * @param string $id section/subsection name */ function parserIdInlineTag($category,$package,$subpackage,$tutorial,$id = false) { $this-> package = $package; $this-> subpackage = $subpackage; $this-> tutorial = $tutorial; $this-> id = $id; $this-> category = $category; } /** * converter * * @param Converter &$c output converter * * @return string * @uses Converter::getTutorialId() retrieve converter-specific ID * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { if (!$this-> id) { return ''; } return $c-> getTutorialId($this-> package, $this-> subpackage, $this-> tutorial, $this-> id, $this-> category); } } /** * Represents {@}toc} for table of contents generation in tutorials * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage InlineTags * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @see parserStringWithInlineTags * @tutorial tags.inlinetoc.pkg * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class parserTocInlineTag extends parserInlineTag { /** * always 'toc' * @var string */ var $inlinetype = 'toc'; /** * @var array format: * <pre> * array( * array( * 'tagname' => section, * 'link' => returnsee link, * 'id' => anchor name, * 'title' => from title tag * ), * ... * ) * </pre> * @access private */ var $_toc = false;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1303 of 1382

946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025

/** * full path to tutorial, used in conversion * @var string * @access private */ var $_path = false; /** * constructor */ function parserTocInlineTag() { parent::parserInlineTag('toc', ''); } /** * set the TOC * * @param array $toc format: * <pre> * array( * array( * 'tag' => {@link parserXMLDocBookTag}, * 'id' => {@link parserIdInlineTag}, * 'title' => {@link parserXMLDocBookTag title} * ), * ... * ) * </pre> * * @return void */ function setTOC($toc) { $this-> toc = $toc; } /** * set the path * * @param string $path the path * * @return void */ function setPath($path) { $this-> _path = $path; } /** * converter method * * <pre> * array( * 'tagname' => string name of tag, * 'link' => {@link tutorialLink} to the tutorial, * 'id' => converter specific tutorial ID from * {@link Converter::getTutorialId()} * 'title' => title of the tutorial) * </pre> * and returns the results as the table of contents * * @param Converter &$c converter object * * @return mixed * @uses Converter::getTutorialId() retrieve the tutorial ID for * @uses Converter::formatTutorialTOC() passes an array of format: * @todo CS cleanup - rename to convert for camelCase rule */ function Convert(& $c) { $newtoc = array(); if (isset($this-> toc) && is_array($this-> toc)) { foreach ($this-> toc as $i => $toc) { if (isset($toc['title'])) { $toc['tag']-> setTitle($toc['title']); } else { $toc['tag']-> setTitle(new parserStringWithInlineTags); } $newtoc[$i]['tagname'] = $toc['tag']-> name;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1304 of 1382

1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044

$l = new tutorialLink; if (!isset($toc['title'])) { $title = 'section '.$toc['id']-> id; } else { $title = $toc['title']-> Convert($c); } $l-> addLink($toc['id']-> id, $this-> _path, basename($this-> _path), $toc['id']-> package, $toc['id']-> subpackage, strip_tags($title)); $newtoc[$i]['link'] = $c-> returnSee($l); $newtoc[$i]['id'] = $c-> getTutorialId($toc['id']-> package, $toc['id']-> subpackage, basename($this-> _path), $toc['id']-> id, $toc['id']-> category); $newtoc[$i]['title'] = $title; } } return $c-> } } ?> formatTutorialTOC($newtoc);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1305 of 1382

File Source for LinkClasses.inc


Documentation for this file is available at LinkClasses.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Linking to element documentation is performed by the classes in this file. * * abstractLink descendants contain enough information to differentiate every * documentable element, and so can be converted to a link string by * {@link Converter::returnSee()} * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: LinkClasses.inc 253641 2008-02-24 02:35:44Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2.0 * @todo CS cleanup - change package to PhpDocumentor */ /** * linking classes parent * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class abstractLink { /**#@+ * @var string */ var $path; /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1306 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

* phpdoc alias _phpdoc_inc for phpdoc.inc */ var $fileAlias = ''; /** * element type linked to. * can only be a documentable element */ var $type = ''; var $name = ''; var $category = ''; var $package = ''; var $subpackage = ''; /**#@-*/ /** * sets up the link * * @param string $path full path to file containing element * @param string $fileAlias page name, as configured by {@link Parser::parse} * @param string $name element name * @param string $package package element is in * @param string $subpackage subpackage element is in * @param string $category optional category that documentation is in * * @return void */ function addLink($path, $fileAlias, $name, $package, $subpackage, $category = false) { $this-> path = $path; $this-> fileAlias = $fileAlias; $this-> name = $name; $this-> category = $category; $this-> package = $package; $this-> subpackage = $subpackage; } } /** * procedural page link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class pageLink extends abstractLink { /** * @var string */ var $type = 'page'; } /** * function link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class functionLink extends abstractLink { /** * @var string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1307 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

*/ var $type = 'function'; } /** * define link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class defineLink extends abstractLink { /** * @var string */ var $type = 'define'; } /** * global variable link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class globalLink extends abstractLink { /** * @var string */ var $type = 'global'; } /** * class link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class classLink extends abstractLink { /** * @var string */ var $type = 'class'; } /** * method link * * @category * @package * @subpackage * @author

ToolsAndUtilities phpDocumentor Links Gregory Beaver <[email protected]>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1308 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

* @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class methodLink extends abstractLink { /** * @var string */ var $type = 'method'; /** * @var string */ var $class = ''; /** * sets up the link * * @param string $class class name * @param string $path full path to file containing element * @param string $fileAlias page name, as configured by {@link Parser::parse} * @param string $name element name * @param string $package package element is in * @param string $subpackage subpackage element is in * @param string $category optional category that documentation is in * * @return void */ function addLink($class, $path , $fileAlias, $name, $package, $subpackage, $category = false) { $this-> class = $class; abstractLink::addLink($path, $fileAlias, $name, $package, $subpackage, $category); } } /** * class variable link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class varLink extends methodLink { /** * @var string */ var $type = 'var'; } /** * class constant link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class constLink extends methodLink

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1309 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361

{ /** * @var string */ var $type = 'const'; } /** * tutorial link * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Links * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change classname to PhpDocumentor_* */ class tutorialLink extends abstractLink { /**#@+ * @var string */ var $type = 'tutorial'; var $section = ''; var $title = false; /**#@-*/ /** * sets up the link * * @param string $section section/subsection name * @param string $path full path to file containing element * @param string $name page name, as configured by {@link Parser::parse} * @param string $package package element is in * @param string $subpackage subpackage element is in * @param string $title title of tutorial * @param string $category optional category that documentation is in * * @return void */ function addLink($section, $path, $name, $package, $subpackage, $title = false, $category = false) { $this-> section = $section; $this-> title = $title; parent::addLink($path, '', $name, $package, $subpackage, $category); } } ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1310 of 1382

File Source for Beautifier.php


Documentation for this file is available at Beautifier.php
1 <?PHP 2 /** 3 * XML/Beautifier.php 4 * 5 * Format XML files containing unknown entities (like all of peardoc) 6 * 7 * phpDocumentor :: automatic documentation generator 8 * 9 * PHP versions 4 and 5 10 * 11 * Copyright (c) 2004-2006 Gregory Beaver 12 * 13 * LICENSE: 14 * 15 * This library is free software; you can redistribute it 16 * and/or modify it under the terms of the GNU Lesser General 17 * Public License as published by the Free Software Foundation; 18 * either version 2.1 of the License, or (at your option) any 19 * later version. 20 * 21 * This library is distributed in the hope that it will be useful, 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 * Lesser General Public License for more details. 25 * 26 * You should have received a copy of the GNU Lesser General Public 27 * License along with this library; if not, write to the Free Software 28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 29 * 30 * @package phpDocumentor 31 * @subpackage Parsers 32 * @author Greg Beaver <[email protected]> 33 * @copyright 2004-2006 Gregory Beaver 34 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 35 * @version CVS: $Id: Beautifier.php 212211 2006-04-30 22:18:14Z cellog $ 36 * @filesource 37 * @link http://www.phpdoc.org 38 * @link http://pear.php.net/PhpDocumentor 39 * @since 1.3.0 40 */ 41 42 43 /** 44 * This is just like XML_Beautifier, but uses {@link phpDocumentor_XML_Beautifier_Tokenizer} 45 * @package phpDocumentor 46 * @subpackage Parsers 47 * @since 1.3.0 48 */ 49 class phpDocumentor_peardoc2_XML_Beautifier extends XML_Beautifier { 50 51 /** 52 * format a file or URL 53 * 54 * @access public 55 * @param string $file filename 56 * @param mixed $newFile filename for beautified XML file (if none is given, the XML string will be returned.) 57 * if you want overwrite the original file, use XML_BEAUTIFIER_OVERWRITE 58 * @param string $renderer Renderer to use, default is the plain xml renderer 59 * @return mixed XML string of no file should be written, true if file could be written 60 * @throws PEAR_Error 61 * @uses _loadRenderer() to load the desired renderer 62 */ 63 function formatFile($file, $newFile = null, $renderer = "Plain" ) 64 {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1311 of 1382

65 if ($this-> apiVersion() != '1.0') { 66 return $this-> raiseError('API version must be 1.0'); 67 } 68 /** 69 * Split the document into tokens 70 * using the XML_Tokenizer 71 */ 72 require_once dirname(__FILE__) . '/Tokenizer.php'; 73 $tokenizer = new phpDocumentor_XML_Beautifier_Tokenizer(); 74 75 $tokens = $tokenizer-> tokenize( $file, true ); 76 77 if (PEAR::isError($tokens)) { 78 return $tokens; 79 } 80 81 include_once dirname(__FILE__) . '/Plain.php'; 82 $renderer = new PHPDoc_XML_Beautifier_Renderer_Plain($this-> 83 84 $xml = $renderer-> serialize($tokens); 85 86 if ($newFile == null) { 87 return $xml; 88 } 89 90 $fp = @fopen($newFile, "w" ); 91 if (!$fp) { 92 return PEAR::raiseError("Could not write to output file" XML_BEAUTIFIER_ERROR_NO_OUTPUT_FILE); 93 } 94 95 flock($fp, LOCK_EX); 96 fwrite($fp, $xml); 97 flock($fp, LOCK_UN); 98 fclose($fp); 99 return true; } 100 101 /** 102 * format an XML string 103 * 104 * @access public 105 * @param string $string XML 106 * @return string formatted XML string 107 * @throws PEAR_Error 108 */ 109 function formatString($string, $renderer = "Plain" ) 110 { 111 if ($this-> apiVersion() != '1.0') { 112 return $this-> raiseError('API version must be 1.0'); 113 } 114 /** 115 * Split the document into tokens 116 * using the XML_Tokenizer 117 */ 118 require_once dirname(__FILE__) . '/Tokenizer.php'; 119 $tokenizer = new phpDocumentor_XML_Beautifier_Tokenizer(); 120 121 $tokens = $tokenizer-> tokenize( $string, false ); 122 123 if (PEAR::isError($tokens)) { 124 return $tokens; 125 } 126 127 include_once dirname(__FILE__) . '/Plain.php'; 128 $renderer = new PHPDoc_XML_Beautifier_Renderer_Plain($this-> 129 130 $xml = $renderer-> serialize($tokens); 131 132 return $xml; 133 } 134 } 135 ?>

_options);

_options);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1312 of 1382

File Source for Tokenizer.php


Documentation for this file is available at Tokenizer.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * XML/Beautifier.php * * Format XML files containing unknown entities (like all of peardoc) * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2004-2006 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @package phpDocumentor * @subpackage Parsers * @author Greg Beaver <[email protected]> * @copyright 2004-2006 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: Tokenizer.php 238276 2007-06-22 14:58:30Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.3.0 */ /** * From the XML_Beautifier package */ require_once 'XML/Beautifier/Tokenizer.php'; /** * Highlights source code using {@link parse()} * @package phpDocumentor * @subpackage Parsers */ class phpDocumentor_XML_Beautifier_Tokenizer extends XML_Beautifier_Tokenizer { /**#@+ * @access private */ var $_curthing; var $_tag; var $_attrs; var $_attr; /**#@-*/ /** * @var array */ var $eventHandlers = array( PHPDOC_XMLTOKEN_EVENT_NOEVENTS => 'normalHandler', PHPDOC_XMLTOKEN_EVENT_XML => 'parseXMLHandler', PHPDOC_XMLTOKEN_EVENT_PI => 'parsePiHandler',

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1313 of 1382

68 PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE => 'attrHandler', 69 PHPDOC_XMLTOKEN_EVENT_OPENTAG => 'tagHandler', 70 PHPDOC_XMLTOKEN_EVENT_IN_CDATA => 'realcdataHandler', 71 PHPDOC_XMLTOKEN_EVENT_DEF => 'defHandler', 72 PHPDOC_XMLTOKEN_EVENT_CLOSETAG => 'closetagHandler', 73 PHPDOC_XMLTOKEN_EVENT_ENTITY => 'entityHandler', 74 PHPDOC_XMLTOKEN_EVENT_COMMENT => 'commentHandler', 75 PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE => 'stringHandler', 76 PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE => 'stringHandler', 77 PHPDOC_XMLTOKEN_EVENT_CDATA => 'parseCdataHandler', 78 ); 79 80 /** 81 * Parse a new file 82 * 83 * The parse() method is a do...while() loop that retrieves tokens one by 84 * one from the {@link $_event_stack}, and uses the token event array set up 85 * by the class constructor to call event handlers. 86 * 87 * The event handlers each process the tokens passed to them, and use the 88 * {@link _addoutput()} method to append the processed tokens to the 89 * {@link $_line} variable. The word parser calls {@link newLineNum()} 90 * every time a line is reached. 91 * 92 * In addition, the event handlers use special linking functions 93 * {@link _link()} and its cousins (_classlink(), etc.) to create in-code 94 * hyperlinks to the documentation for source code elements that are in the 95 * source code. 96 * 97 * @uses setupStates() initialize parser state variables 98 * @uses configWordParser() pass $parse_data to prepare retrieval of tokens 99 * @param string 100 * @param Converter 101 * @param false|stringfull path to file with @filesource tag, if this 102 * is a @filesource parse 103 * @param false|integerstarting line number from {@}source linenum} 104 * @staticvar integer used for recursion limiting if a handler for 105 * an event is not found 106 * @return bool 107 */ 108 function parseString ($parse_data) 109 { 110 static $endrecur = 0; 111 $parse_data = str_replace(array("\r\n" , "\t" ), array("\n" , ' '), $parse_data); 112 $this-> setupStates($parse_data); 113 114 $this-> configWordParser(PHPDOC_XMLTOKEN_EVENT_NOEVENTS); 115 // initialize variables so E_ALL error_reporting doesn't complain 116 $pevent = 0; 117 $word = 0; 118 $this-> _curthing = ''; 119 120 do 121 { 122 $lpevent = $pevent; 123 $pevent = $this-> _event_stack-> getEvent(); 124 if ($lpevent != $pevent) 125 { 126 $this-> _last_pevent = $lpevent; 127 $this-> configWordParser($pevent); 128 } 129 $this-> _wp-> setWhitespace(true); 130 131 $dbg_linenum = $this-> _wp-> linenum; 132 $dbg_pos = $this-> _wp-> getPos(); 133 $this-> _pv_last_word = $word; 134 $this-> _pv_curline = $this-> _wp-> linenum; 135 $word = $this-> _wp-> getWord(); 136 137 if (PHPDOCUMENTOR_DEBUG == true) 138 { 139 echo "LAST: " ; 140 echo "|" . $this-> _pv_last_word; 141 echo "|\n" ; 142 echo "PEVENT: " . $this-> getParserEventName($pevent) . "\n" ; 143 echo "LASTPEVENT: " . $this-> getParserEventName($this> _last_pevent) . "\n" ; 144 // echo "LINE: ".$this->_line."\n";

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1314 of 1382

145 // 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 reached" 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223

echo "OUTPUT: ".$this->_output."\n"; echo $dbg_linenum.'-'.$dbg_pos . ": " echo '|'.htmlspecialchars($word); echo "|\n" ; echo "-------------------\n\n\n" flush();

; ;

} if (isset($this-> eventHandlers[$pevent])) { $handle = $this-> eventHandlers[$pevent]; $this-> $handle($word, $pevent); } else { echo ('WARNING: possible error, no handler for event number '.$pevent); if ($endrecur++ == 25) { return $this-> raiseError("FATAL ERROR, recursion limit ); } } } while (!($word === false)); return true; } /**#@+ * Event Handlers * * All Event Handlers use {@link checkEventPush()} and * {@link checkEventPop()} to set up the event stack and parser state. * @access private * @param string|array token value * @param integer parser event from {@link Parser.inc} */ /** * Most tokens only need highlighting, and this method handles them */ function normalHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); $this-> _addoutput($pevent); $this-> _curthing = ''; return; } $this-> _curthing .= $word; if ($this-> $this-> $this-> } } /** * handle <!-- comments --> */ function commentHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); return; } $this-> _curthing .= $word; if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _curthing = ''; } } /** * handle <?Processor instructions?> */ function parsePiHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); return; } if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); checkEventPop($word, $pevent)) { _addoutput($pevent); _curthing = '';

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1315 of 1382

224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303

$this-> $this-> return;

_curthing = ''; _attrs = null;

} if (!strlen($this-> _curthing)) { $this-> _curthing .= str_replace('<?' , '', $word); } else { if (!isset($this-> _attrs) || !is_string($this-> _attrs)) { $this-> _attrs = ''; } $this-> _attrs .= $word; } } /** * handle <?xml Processor instructions?> */ function parseXMLHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); return; } $this-> _curthing .= $word; if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _curthing = ''; } } /** * handle <![CDATA[ unescaped text ]]> */ function realcdataHandler($word, $pevent) { $this-> _curthing .= $word; if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _curthing = ''; } } /** * handle <tags> */ function tagHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); $this-> _curthing = ''; return; } if ($word{0} == '<' ) { $this-> _tag = substr($word, 1); } if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _tag = null; $this-> _attrs = null; if ($word == '>' ) { $this-> _event_stack-> pushEvent(PHPDOC_XMLTOKEN_EVENT_CDATA); return; } } } /** * handle </tags> */ function closetagHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); return; } if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1316 of 1382

304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383

$this-> return; } $this-> }

_tag = ''; , '', $word));

_tag = trim(str_replace('</'

/** * handle <!def> */ function defHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); return; } $this-> _curthing .= $word; if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _curthing = ''; } } /** * Most tokens only need highlighting, and this method handles them */ function attrHandler($word, $pevent) { if ($e = $this-> checkEventPush($word, $pevent)) { return; } if (!isset($this-> _attrs) || !is_array($this-> _attrs)) { $this-> _attrs = array(); } if (strpos($word, '=')) { $this-> _attrs[$this-> _attr = trim(str_replace('=', '', $word))] = ''; } if ($this-> checkEventPop($word, $pevent)) { $this-> _wp-> backupPos($word); return; } } /** * handle attribute values */ function stringHandler($word, $pevent) { if ($this-> checkEventPop($word, $pevent)) { return; } $this-> _attrs[$this-> _attr] = $word; } /** * handle &entities; */ function entityHandler($word, $pevent) { if ($this-> checkEventPop($word, $pevent)) { $this-> _addoutput($pevent); $this-> _curthing = ''; return; } if (strlen($word) && $word{0} == '&' $word = substr($word, 1); } $this-> _curthing .= $word; } /** * handle tag contents */ function parseCdataHandler($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _wp-> backupPos($word); if (strlen($this-> _curthing)) { $this-> _addoutput($pevent); }

) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1317 of 1382

384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463

$this-> return;

_curthing = '';

} if ($this-> checkEventPop($word, $pevent)) { if (strlen($this-> _curthing)) { $this-> _addoutput($pevent); } $this-> _curthing = ''; $this-> _event_stack-> pushEvent(PHPDOC_XMLTOKEN_EVENT_CLOSETAG); return; } $this-> _curthing .= $word; } /**#@-*/ /** * Handler for real character data * * @access protected * @param object XML parser object * @param string CDATA * @return void */ function incdataHandler($parser, $cdata) { if ((string)$cdata === '') { return true; } $struct = array( "type" "data" "depth" ); => => => PHPDOC_BEAUTIFIER_CDATA, $cdata, $this-> _depth

//

// //

//

$this-> _appendToParent($struct); } /**#@+ * Output Methods * @access private */ /** * This method adds output to {@link $_line} * * If a string with variables like "$test this" is present, then special * handling is used to allow processing of the variable in context. * @see _flush_save() */ function _addoutput($event) { $type = array( PHPDOC_XMLTOKEN_EVENT_NOEVENTS => '_handleXMLDefault', PHPDOC_XMLTOKEN_EVENT_CLOSETAG => 'endHandler', PHPDOC_XMLTOKEN_EVENT_ENTITY => 'entityrefHandler', PHPDOC_XMLTOKEN_EVENT_DEF => '_handleXMLDefault', PHPDOC_XMLTOKEN_EVENT_PI => 'parsePiHandler', PHPDOC_XMLTOKEN_EVENT_XML => '_handleXMLDefault', PHPDOC_XMLTOKEN_EVENT_OPENTAG => 'startHandler', PHPDOC_XMLTOKEN_EVENT_COMMENT => '_handleXMLDefault', PHPDOC_XMLTOKEN_EVENT_CDATA => 'cdataHandler', PHPDOC_XMLTOKEN_EVENT_IN_CDATA => 'incdataHandler', ); $method = $type[$event]; switch ($event) { case PHPDOC_XMLTOKEN_EVENT_COMMENT : echo "comment: $this->_curthing\n"; $this-> $method(false, $this-> _curthing); break; case PHPDOC_XMLTOKEN_EVENT_OPENTAG : echo "open tag: $this->_tag\n"; var_dump($this->_attrs); $this-> $method(false, $this-> _tag, $this-> _attrs); break; case PHPDOC_XMLTOKEN_EVENT_CLOSETAG : echo "close tag: $this->_tag\n"; $this-> $method(false, $this-> _curthing); break; case PHPDOC_XMLTOKEN_EVENT_NOEVENTS :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1318 of 1382

464 if (!strlen($this-> _curthing)) { 465 return; 466 } 467 // echo "default: $this->_curthing\n"; 468 $this-> $method(false, $this-> _curthing); 469 break; 470 case PHPDOC_XMLTOKEN_EVENT_DEF : 471 // echo "<!definition: $this->_curthing\n"; 472 $this-> $method(false, $this-> _curthing); 473 break; 474 case PHPDOC_XMLTOKEN_EVENT_PI : 475 // echo "<?pi: $this->_curthing\n"; 476 // echo "<?pi attrs: $this->_attrs\n"; 477 $this-> $method(false, $this-> _curthing, $this-> _attrs); 478 break; 479 case PHPDOC_XMLTOKEN_EVENT_XML : 480 // echo "<?xml: $this->_curthing\n"; 481 $this-> $method(false, $this-> _curthing, $this-> _attrs); 482 break; 483 case PHPDOC_XMLTOKEN_EVENT_CDATA : 484 case PHPDOC_XMLTOKEN_EVENT_IN_CDATA : 485 // echo "cdata: $this->_curthing\n"; 486 $this-> $method(false, $this-> _curthing); 487 break; 488 case PHPDOC_XMLTOKEN_EVENT_ENTITY : 489 // echo "entity: $this->_curthing\n"; 490 $this-> $method(false, $this-> _curthing, false, false, false); 491 break; 492 } 493 } 494 /**#@-*/ 495 496 /** 497 * tell the parser's WordParser {@link $wp} to set up tokens to parse words by. 498 * tokens are word separators. In English, a space or punctuation are examples of tokens. 499 * In PHP, a token can be a ;, a parenthesis, or even the word "function" 500 * @param $value integer an event number 501 * @see WordParser 502 */ 503 504 function configWordParser($e) 505 { 506 $this-> _wp-> setSeperator($this-> tokens[($e + 100)]); 507 } 508 /** 509 * this function checks whether parameter $word is a token for pushing a new event onto the Event Stack. 510 * @return mixed returns false, or the event number 511 */ 512 513 function checkEventPush($word,$pevent) 514 { 515 $e = false; 516 if (isset($this-> pushEvent[$pevent])) 517 { 518 if (isset($this-> pushEvent[$pevent][strtolower($word)])) 519 $e = $this-> pushEvent[$pevent][strtolower($word)]; 520 } 521 if ($e) 522 { 523 $this-> _event_stack-> pushEvent($e); 524 return $e; 525 } else { 526 return false; 527 } 528 } 529 530 /** 531 * this function checks whether parameter $word is a token for popping the current event off of the Event Stack. 532 * @return mixed returns false, or the event number popped off of the stack 533 */ 534 535 function checkEventPop($word,$pevent) 536 { 537 if (!isset($this-> popEvent[$pevent])) return false; 538 if (in_array(strtolower($word),$this-> popEvent[$pevent])) 539 { 540 return $this-> _event_stack-> popEvent(); 541 } else {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1319 of 1382

542 return false; 543 } 544 } 545 546 /** 547 * Initialize all parser state variables 548 * @param boolean true if we are highlighting an inline {@}source} tag's 549 * output 550 * @param false|stringname of class we are going to start from 551 * @uses $_wp sets to a new {@link phpDocumentor_HighlightWordParser} 552 */ 553 function setupStates($parsedata) 554 { 555 $this-> _output = ''; 556 $this-> _line = ''; 557 unset($this-> _wp); 558 $this-> _wp = new WordParser; 559 $this-> _wp-> setup($parsedata); 560 $this-> _event_stack = @(new EventStack); 561 $this-> _event_stack-> popEvent(); 562 $this-> _event_stack-> pushEvent(PHPDOC_XMLTOKEN_EVENT_NOEVENTS); 563 $this-> _pv_linenum = null; 564 $this-> _pv_next_word = false; 565 } 566 567 /** 568 * Initialize the {@link $tokenpushEvent, $wordpushEvent} arrays 569 */ 570 function phpDocumentor_XML_Beautifier_Tokenizer() 571 { 572 $this-> tokens[STATE_XMLTOKEN_CDATA] = 573 $this-> tokens[STATE_XMLTOKEN_NOEVENTS] = array('<?xml' , '<!--' , '<![CDATA[' , '<!' , '</' , '<?' , '<' );//, '&'); 574 $this-> tokens[STATE_XMLTOKEN_OPENTAG] = array("\n" ,"\t" ," " , '>' , '/>' ); 575 $this-> tokens[STATE_XMLTOKEN_XML] = 576 $this-> tokens[STATE_XMLTOKEN_PI] = array("\n" ,"\t" ," " , '?>' ); 577 $this-> tokens[STATE_XMLTOKEN_IN_CDATA] = array(']]>' ); 578 $this-> tokens[STATE_XMLTOKEN_CLOSETAG] = array("\n" ,'>' ); 579 $this-> tokens[STATE_XMLTOKEN_COMMENT] = array("\n" ,'-->' ); 580 $this-> tokens[STATE_XMLTOKEN_DEF] = array("\n" ,']>' ,'>' ); 581 $this-> tokens[STATE_XMLTOKEN_ENTITY] = array("\n" ,';'); 582 $this-> tokens[STATE_XMLTOKEN_ATTRIBUTE] = array("\n" ,'"' ,"'" ,'>' ,'/>' ); 583 $this-> tokens[STATE_XMLTOKEN_DOUBLEQUOTE] = array("\n" ,'"' ); 584 $this-> tokens[STATE_XMLTOKEN_SINGLEQUOTE] = array("\n" ,"'" ); 585 /**************************************************************/ 586 587 $this-> pushEvent[PHPDOC_XMLTOKEN_EVENT_NOEVENTS] = 588 array( 589 '<' => PHPDOC_XMLTOKEN_EVENT_OPENTAG, 590 '<?' => PHPDOC_XMLTOKEN_EVENT_PI, 591 '<?xml' => PHPDOC_XMLTOKEN_EVENT_XML, 592 '</' => PHPDOC_XMLTOKEN_EVENT_CLOSETAG, 593 // '&' => PHPDOC_XMLTOKEN_EVENT_ENTITY, 594 '<![cdata[' => PHPDOC_XMLTOKEN_EVENT_IN_CDATA, 595 '<!--' => PHPDOC_XMLTOKEN_EVENT_COMMENT, 596 '<!' => PHPDOC_XMLTOKEN_EVENT_DEF, 597 ); 598 /**************************************************************/ 599 600 $this-> pushEvent[PHPDOC_XMLTOKEN_EVENT_OPENTAG] = 601 array( 602 " " => PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE, 603 "\n" => PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE, 604 ); 605 /**************************************************************/ 606 607 $this-> pushEvent[PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE] = 608 array( 609 "'" => PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE, 610 '"' => PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE, 611 ); 612 /**************************************************************/ 613 614 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_IN_CDATA] = array(']]>' ); 615 /**************************************************************/ 616

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1320 of 1382

617 $this-> pushEvent[PHPDOC_XMLTOKEN_EVENT_CDATA] = 618 array( 619 '<' => PHPDOC_XMLTOKEN_EVENT_OPENTAG, 620 '<?' => PHPDOC_XMLTOKEN_EVENT_PI, 621 // '&' => PHPDOC_XMLTOKEN_EVENT_ENTITY, 622 '<!--' => PHPDOC_XMLTOKEN_EVENT_COMMENT, 623 '<!' => PHPDOC_XMLTOKEN_EVENT_DEF, 624 '<![cdata[' => PHPDOC_XMLTOKEN_EVENT_IN_CDATA, 625 ); 626 /**************************************************************/ 627 628 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_XML] = 629 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_PI] = array('?>' ); 630 /**************************************************************/ 631 632 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_ENTITY] = array(';'); 633 /**************************************************************/ 634 635 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE] = array("'" ); 636 /**************************************************************/ 637 638 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE] = array('"' ); 639 /**************************************************************/ 640 641 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_OPENTAG] = array('>' , '/>' ); 642 /**************************************************************/ 643 644 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_CLOSETAG] = array('>' ); 645 /**************************************************************/ 646 647 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_COMMENT] = array('-->' ); 648 /**************************************************************/ 649 650 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_DEF] = array('>' ,']>' ); 651 /**************************************************************/ 652 653 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE] = array('>' ,'/>' ); 654 /**************************************************************/ 655 656 $this-> popEvent[PHPDOC_XMLTOKEN_EVENT_CDATA] = 657 array('</' ); 658 /**************************************************************/ 659 } 660 661 function getParserEventName ($value) 662 { 663 $lookup = array( 664 PHPDOC_XMLTOKEN_EVENT_NOEVENTS => "PHPDOC_XMLTOKEN_EVENT_NOEVENTS" , 665 PHPDOC_XMLTOKEN_EVENT_PI => "PHPDOC_XMLTOKEN_EVENT_PI" 666 PHPDOC_XMLTOKEN_EVENT_OPENTAG => "PHPDOC_XMLTOKEN_EVENT_OPENTAG" , 667 PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE => "PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE" , 668 PHPDOC_XMLTOKEN_EVENT_CLOSETAG => "PHPDOC_XMLTOKEN_EVENT_CLOSETAG" , 669 PHPDOC_XMLTOKEN_EVENT_ENTITY => "PHPDOC_XMLTOKEN_EVENT_ENTITY" 670 PHPDOC_XMLTOKEN_EVENT_COMMENT => "PHPDOC_XMLTOKEN_EVENT_COMMENT" , 671 PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE => "PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE" , 672 PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE => "PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE" , 673 PHPDOC_XMLTOKEN_EVENT_CDATA => 'PHPDOC_XMLTOKEN_EVENT_CDATA', 674 PHPDOC_XMLTOKEN_EVENT_DEF => 'PHPDOC_XMLTOKEN_EVENT_DEF', 675 PHPDOC_XMLTOKEN_EVENT_XML => 'PHPDOC_XMLTOKEN_EVENT_XML', 676 PHPDOC_XMLTOKEN_EVENT_IN_CDATA => 'PHPDOC_XMLTOKEN_EVENT_IN_CDATA', 677 ); 678 if (isset($lookup[$value])) 679 return $lookup[$value]; 680 else return $value; 681 } 682 } 683 684 685 /** starting state */ 686 define("PHPDOC_XMLTOKEN_EVENT_NOEVENTS" , 1); 687 /** currently in starting state */ 688 define("STATE_XMLTOKEN_NOEVENTS" , 101); 689

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1321 of 1382

690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752

/** used when a processor instruction is found */ define("PHPDOC_XMLTOKEN_EVENT_PI" , /** currently in processor instruction */ define("STATE_XMLTOKEN_PI" , 102); /** used when an open <tag> is found */ define("PHPDOC_XMLTOKEN_EVENT_OPENTAG" /** currently parsing an open <tag> */ define("STATE_XMLTOKEN_OPENTAG"

2);

, , 103); ,

3);

/** used when a <tag attr="attribute"> is found */ define("PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE" /** currently parsing an open <tag> */ define("STATE_XMLTOKEN_ATTRIBUTE" , /** used when a close </tag> is found */ define("PHPDOC_XMLTOKEN_EVENT_CLOSETAG" /** currently parsing a close </tag> */ define("STATE_XMLTOKEN_CLOSETAG" /** used when an &entity; is found */ define("PHPDOC_XMLTOKEN_EVENT_ENTITY" /** currently parsing an &entity; */ define("STATE_XMLTOKEN_ENTITY"

4);

104); , 5);

105); , 6);

106); , 107); , , 108); , , , 109); 10); 9); 8); 7);

/** used when a <!-- comment --> is found */ define("PHPDOC_XMLTOKEN_EVENT_COMMENT" /** currently parsing a <!-- comment --> */ define("STATE_XMLTOKEN_COMMENT" , /** used when a <!-- comment --> is found */ define("PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE" /** currently parsing a <!-- comment --> */ define("STATE_XMLTOKEN_SINGLEQUOTE" /** used when a <!-- comment --> is found */ define("PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE" /** currently parsing a <!-- comment --> */ define("STATE_XMLTOKEN_DOUBLEQUOTE" /** used when a <! is found */ define("PHPDOC_XMLTOKEN_EVENT_DEF" /** currently parsing a <! */ define("STATE_XMLTOKEN_DEF" /** used when a <! is found */ define("PHPDOC_XMLTOKEN_EVENT_CDATA" /** currently parsing a <! */ define("STATE_XMLTOKEN_CDATA" /** used when a <?xml is found */ define("PHPDOC_XMLTOKEN_EVENT_XML" /** currently parsing a <?xml */ define("STATE_XMLTOKEN_XML"

110); , , 111); , 12); 11);

112);

/** used when a <![CDATA[ section is found */ define('PHPDOC_XMLTOKEN_EVENT_IN_CDATA', 13); /** currently parsing a <![CDATA[ ]]> */ define('STATE_XMLTOKEN_IN_CDATA', 113); /** do not remove, needed in plain renderer */ define('PHPDOC_BEAUTIFIER_CDATA', 100000); ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1322 of 1382

File Source for HighlightParser.inc


Documentation for this file is available at HighlightParser.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 <?php /** * Source Code Highlighting * * The classes in this file are responsible for the dynamic @example, @filesource * and {@}source} tags output. Using the phpDocumentor_HighlightWordParser, * the phpDocumentor_HighlightParser retrieves PHP tokens one by one from the * array generated by {@link phpDocumentorTWordParser} source retrieval functions * and then highlights them individually. * * It accomplishes this highlighting through the assistance of methods in * the output Converter passed to its parse() method, and then returns the * fully highlighted source as a string * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2008 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Parsers * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: HighlightParser.inc 253641 2008-02-24 02:35:44Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @tutorial tags.example.pkg, tags.filesource.pkg, tags.inlinesource.pkg * @since 1.2.0beta3 * @todo CS cleanup - change package to PhpDocumentor */ /** * Retrieve tokens from an array of tokens organized by line numbers * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Parsers * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2.0beta3 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change class name to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1323 of 1382

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

*/ class phpDocumentor_HighlightWordParser extends phpDocumentorTWordParser { /** * Hash used to keep track of line numbers that have already been initialized * @var array * @access private */ var $_listLineNums = array(); /** * Initialize the parser object * * @param array &$input the input * @param phpDocumentor_HighlightParser &$parser the parser * * @return void */ function setup(& $input, & $parser) { $this-> _parser = & $parser; $this-> data = & $input; $this-> _all = $input; $this-> _sourceline = 0; $this-> pos = 0; $this-> linenum = 0; } /** * debugging function * * @return void * @access private */ function printState() { $linenum = $this-> linenum; $pos = $this-> pos; if (!isset($this-> _all[$this-> linenum][$this-> pos])) { $linenum++; $pos = 0; } $details = ''; $token = $this-> _all[$linenum][$pos]; if (is_array($token)) { $details = token_name($token[0]); $token = htmlspecialchars($token[1]); } else { $token = htmlspecialchars($token); } debug('Next Token ' . $this-> linenum . '-' . $this-> pos . ':' . $details); var_dump($token); } /** * Retrieve the position of the next token that will be parsed * in the internal token array * * @return array format: array(line number, position) */ function nextToken() { $linenum = $this-> linenum; $pos = $this-> pos; if (!isset($this-> _all[$this-> linenum][$this-> pos])) { $linenum++; $pos = 0; } if (!isset($this-> _all[$linenum][$pos])) { return false; } return array($linenum, $pos); } /** * Retrieve the next token * * @return array|stringeither array(PHP token constant, token) or string * non-specific separator */ function getWord()

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1324 of 1382

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227

{ if (!isset($this-> _all[$this-> linenum][$this-> pos])) { $this-> linenum++; $this-> pos = 0; if (!isset($this-> _all[$this-> linenum])) { return false; } $this-> _parser-> newLineNum(); return $this-> getWord(); } $word = $this-> _all[$this-> linenum][$this-> pos++]; return str_replace("\t" , ' ', $word); } /** * back the word parser to the previous token as defined by $last_token * * @param array|string$last_token token, or output from {@link nextToken()} * @param bool $is_pos if true, backupPos interprets $last_token * to be the position in the internal token * array of the last token * * @return void */ function backupPos($last_token, $is_pos = false) { if (!$last_token) { return; } if ($is_pos) { $this-> linenum = $last_token[0]; $this-> pos = $last_token[1]; return; } if ($last_token === false) { return; } //fancy_debug('before', $this->linenum, $this->pos, // token_name($this->_all[$this->linenum][$this->pos][0]), // htmlentities($this->_all[$this->linenum][$this->pos][1]), // $this->_all[$this->linenum]); do { $this-> pos--; if ($this-> pos < 0) { $this-> linenum--; if ($this-> linenum < 0) { var_dump($last_token); break; } $this-> pos = count($this-> _all[$this-> linenum]) - 1; } } while (!$this-> tokenEquals($last_token, str_replace("\t" $this-> _all[$this-> linenum][$this-> pos]))); //fancy_debug('after', $this->linenum, $this->pos, // token_name($this->_all[$this->linenum][$this->pos][0]), // htmlentities($this->_all[$this->linenum][$this->pos][1])); } } /** * Highlights source code using {@link parse()} * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage Parsers * @author Gregory Beaver <[email protected]> * @copyright 2002-2008 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version Release: @VER@ * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2.0beta3 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change class name to PhpDocumentor_* */ class phpDocumentor_HighlightParser extends phpDocumentorTParser {

, '

',

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1325 of 1382

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

/**#@+ * @access private */ /** * Highlighted source is built up in this string * @var string */ var $_output; /** * contents of the current source code line as it is parsed * @var string */ var $_line; /** * Used to retrieve highlighted tokens * @var Converter a descendant of Converter */ var $_converter; /** * Path to file being highlighted, if this is from a @filesource tag * @var false|stringfull path */ var $_filesourcepath; /** * @var array */ var $eventHandlers = array( PARSER_EVENT_ARRAY PARSER_EVENT_CLASS PARSER_EVENT_COMMENT PARSER_EVENT_DOCBLOCK_TEMPLATE PARSER_EVENT_END_DOCBLOCK_TEMPLATE PARSER_EVENT_LOGICBLOCK PARSER_EVENT_METHOD_LOGICBLOCK PARSER_EVENT_NOEVENTS PARSER_EVENT_OUTPHP PARSER_EVENT_CLASS_MEMBER PARSER_EVENT_DEFINE PARSER_EVENT_DEFINE_PARAMS PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS PARSER_EVENT_DOCBLOCK PARSER_EVENT_TAGS PARSER_EVENT_DESC PARSER_EVENT_DOCKEYWORD PARSER_EVENT_DOCKEYWORD_EMAIL PARSER_EVENT_EOFQUOTE PARSER_EVENT_FUNCTION PARSER_EVENT_METHOD PARSER_EVENT_FUNCTION_PARAMS PARSER_EVENT_FUNC_GLOBAL PARSER_EVENT_INLINE_DOCKEYWORD PARSER_EVENT_INCLUDE PARSER_EVENT_INCLUDE_PARAMS PARSER_EVENT_QUOTE PARSER_EVENT_QUOTE_VAR PARSER_EVENT_PHPCODE PARSER_EVENT_SINGLEQUOTE PARSER_EVENT_STATIC_VAR PARSER_EVENT_STATIC_VAR_VALUE PARSER_EVENT_VAR );

=> => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => => =>

'defaultHandler', 'handleClass', 'handleComment', 'handleDocBlockTemplate', 'handleEndDocBlockTemplate', 'handleLogicBlock', 'handleMethodLogicBlock', 'defaultHandler', 'defaultHandler', 'handleClassMember', 'defaultHandler', 'defaultHandler', 'defaultHandler', 'defaultHandler', 'handleDocBlock', 'handleTags', 'handleDesc', 'handleTag', 'handleDockeywordEmail', 'handleQuote', 'handleFunction', 'handleMethod', 'handleFunctionParams', 'handleFuncGlobal', 'handleInlineDockeyword', 'defaultHandler', 'defaultHandler', 'handleQuote', 'handleQuoteVar', 'handlePhpCode', 'handleSingleQuote', 'defaultHandler', 'defaultHandler', 'handleVar',

/** * event handlers for @tags * @tutorial tags.pkg */ var $tagHandlers = array( '*' => 'defaultTagHandler', 'abstract' => 'coreTagHandler', 'access' => 'coreTagHandler', 'author' => 'coreTagHandler', 'category' => 'coreTagHandler', 'copyright' => 'coreTagHandler', 'deprecated' => 'coreTagHandler',

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1326 of 1382

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387

'example' 'filesource' 'final' 'global' 'ignore' 'license' 'link' 'name' 'package' 'param' 'parameter' 'see' 'since' 'subpackage' 'internal' 'return' 'static' 'staticvar' 'throws' 'todo' 'tutorial' 'uses' 'var' 'version' 'property' 'property-read' 'property-write' 'method' ); /**#@-*/

=> => => => => => => => => => => => => => => => => => => => => => => => => => => =>

'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'globalTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'paramTagHandler', 'paramTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'returnTagHandler', 'coreTagHandler', 'staticvarTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'coreTagHandler', 'varTagHandler', 'coreTagHandler', 'propertyTagHandler', 'propertyTagHandler', 'propertyTagHandler', 'propertyTagHandler'

/** * wraps the current line (via the converter) and resets it to empty * * @return void * @uses Converter::SourceLine() encloses {@link $_line} in a * converter-specific format */ function newLineNum() { if ($this-> _pf_no_output_yet) { return; } $this-> _flush_save(); $this-> _line .= $this-> _converter-> flushHighlightCache(); $this-> _output .= $this-> _converter-> SourceLine($this-> _wp-> $this-> _line, $this-> _path); $this-> _line = ''; } /** * Start the parsing at a certain line number * * @param int $num line number * * @return void */ function setLineNum($num) { $this-> _wp-> linenum = $num; } /** * Parse a new file * * The parse() method is a do...while() loop that retrieves tokens one by * one from the {@link $_event_stack}, and uses the token event array set up * by the class constructor to call event handlers. * * The event handlers each process the tokens passed to them, and use the * {@link _addoutput()} method to append the processed tokens to the * {@link $_line} variable. The word parser calls {@link newLineNum()} * every time a line is reached. * * In addition, the event handlers use special linking functions * {@link _link()} and its cousins (_classlink(), etc.) to create in-code * hyperlinks to the documentation for source code elements that are in the * source code. * * @param array &$parse_data the parse data

linenum,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1327 of 1382

388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 >pos); 464 465 466

* @param Converter &$converter the converter object * @param bool $inlinesourceparse whether this data is from an * inline {@}source} tag * @param string|false $class if a string, it is the name of the * class whose method we are parsing * containing a {@}source} tag * @param false|integer$linenum starting line number from * {@}source linenum} * @param false|string $filesourcepath full path to file with @filesource * tag, if this is a @filesource parse * * @staticvar int used for recursion limiting if a handler for * an event is not found * @return bool * @uses setupStates() initialize parser state variables * @uses configWordParser() pass $parse_data to prepare retrieval of tokens * @todo CS cleanup - rename tokenizer_ext constant to uppercase */ function parse (& $parse_data, & $converter, $inlinesourceparse = false, $class = false, $linenum = false, $filesourcepath = false) { if (!tokenizer_ext) { if (is_array($parse_data)) { $parse_data = join($parse_data, ''); } $parse_data = explode("\n" , $parse_data); $this-> _output = ''; foreach ($parse_data as $linenum => $line) { if ($linenum > 0) { $this-> _output .= $converter-> SourceLine($linenum, $line, $filesourcepath); } } return $converter-> PreserveWhiteSpace($this-> _output); } static $endrecur = 0; $this-> _converter = & $converter; $converter-> startHighlight(); $this-> _path = $filesourcepath; $this-> setupStates($inlinesourceparse, $class); $this-> configWordParser($parse_data); if ($linenum !== false) { $this-> setLineNum($linenum); } // initialize variables so E_ALL error_reporting doesn't complain $pevent = 0; $word = 0; do { $lpevent = $pevent; $pevent = $this-> _event_stack-> getEvent(); if ($lpevent != $pevent) { $this-> _last_pevent = $lpevent; } if ($pevent == PARSER_EVENT_CLASS_MEMBER) { $this-> _wp-> setWhitespace(true); } else { $this-> _wp-> setWhitespace(false); } if (!is_array($word)) { $lw = $word; } if (is_array($word) && $word[0] != T_WHITESPACE) { $lw = $word; } $dbg_linenum = $this-> _wp-> linenum; $dbg_pos = $this-> _wp-> getPos(); $word = $this-> _wp-> getWord(); if (is_array($word) && ( $word[0] == T_WHITESPACE || $word[0] == T_COMMENT) && $pevent != PARSER_EVENT_CLASS_MEMBER ) { //debug("added " . $this->_wp->linenum . '-' . $this->_wp$this-> _addoutput($word); continue; } else {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1328 of 1382

467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 "\n" 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545

$this-> _pv_last_word = $lw; } if ($pevent != PARSER_EVENT_DOCBLOCK) { $this-> _pv_last_next_word = $this-> _pv_next_word; $this-> _pv_next_word = $this-> _wp-> nextToken(); } // in wordparser, have to keep track of lines //$this->publishEvent(PHPDOCUMENTOR_EVENT_NEWLINENUM, // $this->_wp->linenum); if (PHPDOCUMENTOR_DEBUG == true) { echo "LAST: " ; if (is_array($this-> _pv_last_word)) { echo token_name($this-> _pv_last_word[0]) . ' => |' . htmlspecialchars($this-> _pv_last_word[1]); } else { echo "|" . $this-> _pv_last_word; } echo "|\n" ; echo "PEVENT: " . $this-> getParserEventName($pevent) . ; echo "LASTPEVENT: " . $this-> getParserEventName($this-> _last_pevent) . "\n" ; //echo "LINE: " . $this->_line . "\n"; //echo "OUTPUT: " . $this->_output . "\n"; echo $dbg_linenum . '-' . $dbg_pos . ": " ; if (is_array($word)) { echo token_name($word[0]) . ' => |' . htmlspecialchars($word[1]); } else { echo '|'.htmlspecialchars($word); } echo "|\n" ; $this-> _wp-> printState(); echo "NEXT TOKEN: " ; $tok1 = $this-> _pv_next_word; $tok = $this-> _wp-> _all[$tok1[0]][$tok1[1]]; if (is_array($tok)) { echo token_name($tok[0]) . ' => ' . $tok1[0] . '-' . $tok1[1] . '|' . htmlspecialchars($tok[1]); } else { echo "|" . $tok; } echo "|\n" ; echo "-------------------\n\n\n" ; flush(); } if ($word !== false && isset( $this-> eventHandlers[$pevent])) { $handle = $this-> eventHandlers[$pevent]; $this-> $handle($word, $pevent); } elseif ($word !== false) { debug('WARNING: possible error, no handler for event number ' . $pevent); if ($endrecur++ == 25) { die("FATAL ERROR, recursion limit reached" ); } } } while (!($word === false)); if (strlen($this-> _line)) { $this-> newLineNum(); } return $this-> _output; } /**#@+ * Event Handlers * * All Event Handlers use {@link checkEventPush()} and * {@link checkEventPop()} to set up the event stack and parser state. * * @param string|array $word token value * @param int $pevent parser event from {@link Parser.inc} * * @return void * @access private */ /** * Most tokens only need highlighting, and this method handles them */ function defaultHandler($word, $pevent) {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1329 of 1382

546 $this-> _addoutput($word); 547 if ($this-> checkEventPush($word, $pevent)) { 548 return; 549 } 550 $this-> checkEventPop($word, $pevent); 551 } 552 553 /** 554 * Handles global declarations in a function, like: 555 * 556 * <code> 557 * function foobar() 558 * { 559 * global $_phpDocumentor_setting; 560 * } 561 * </code> 562 * 563 * @uses _globallink() instead of _addoutput(), to link to global variables 564 * if they are used in a function 565 */ 566 function handleFuncGlobal($word, $pevent) 567 { 568 if ($this-> checkEventPush($word, $pevent)) { 569 return; 570 } 571 $this-> _globallink($word); 572 $this-> checkEventPop($word, $pevent); 573 } 574 575 /** 576 * Handles strings in quotation marks and heredoc 577 * 578 * Special handling is needed for strings that contain variables like: 579 * 580 * <code>$a = "$test string"</code> 581 * 582 * The tokenizer parses out tokens '"',array(T_VARIABLE,'$test'),' string', 583 * and '"'. Since it is possible to have $this->classvar in a string, 584 * we save a variable name just in case the next token is -> to allow linking 585 * to class members. Otherwise, the string is simply highlighted. 586 * 587 * constant strings (with no $variables in them) are passed as a single 588 * entity, and so will be saved in the last token parsed. This means the 589 * event handler must tell the word parser to re-retrieve the current token 590 * so that the correct event handler can process it. 591 */ 592 function handleQuote($word, $pevent) 593 { 594 if ($this-> _pf_inmethod && is_array($word) && $word[0] == T_VARIABLE) { 595 $this-> _pv_lastvar = $word; 596 } 597 if ($this-> checkEventPush($word, $pevent)) { 598 $this-> _addoutput($word); 599 return; 600 } 601 if ($this-> _pf_quote_active && 602 (($this-> _pv_last_word == '"' && 603 $this-> _last_pevent != PARSER_EVENT_QUOTE) || 604 (is_array($this-> _pv_last_word) && 605 $this-> _pv_last_word[0] == T_END_HEREDOC && 606 $this-> _last_pevent != PARSER_EVENT_EOFQUOTE)) 607 ) { 608 $this-> _pf_quote_active = false; 609 $this-> _wp-> backupPos($word); 610 $this-> _event_stack-> popEvent(); 611 return; 612 } 613 if (!$this-> _pf_quote_active && 614 (($this-> _pv_last_word == '"' && 615 $this-> _last_pevent != PARSER_EVENT_QUOTE) || 616 (is_array($this-> _pv_last_word) && 617 $this-> _pv_last_word[0] == T_END_HEREDOC && 618 $this-> _last_pevent != PARSER_EVENT_EOFQUOTE)) 619 ) { 620 if (is_array($word) && $word[0] == T_VARIABLE) { 621 $this-> _pv_lastvar = $word; 622 } 623 $this-> _pf_quote_active = true; 624 $this-> _save_highlight_state = $this-> _converter-> getHighlightState();

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1330 of 1382

625 $this-> _converter-> startHighlight(); 626 $this-> _addoutput($word); 627 $this-> checkEventPop($word, $pevent); 628 return; 629 } elseif (is_array($this-> _pv_last_word) && 630 $this-> _pv_last_word[0] == T_CONSTANT_ENCAPSED_STRING 631 ) { 632 //$this->_pv_quote_data = $this->_pv_last_word[1]; 633 $this-> _event_stack-> popEvent(); 634 $this-> _wp-> backupPos($word); 635 return; 636 } 637 if ($this-> checkEventPop($word, $pevent)) { 638 $this-> _pf_quote_active = false; 639 } 640 $this-> _addoutput($word); 641 } 642 643 /** 644 * Handles {$variable} within a "quote" 645 * 646 * This is a simple handler, for a very complex 647 * array of legal syntax. It is legal to nest control structures 648 * inside the {}, and other weird stuff. 649 */ 650 function handleQuoteVar($word, $pevent) 651 { 652 if ($this-> checkEventPop($word, $pevent)) { 653 $this-> _pf_quote_active = true; 654 $this-> _addoutput($word); 655 return; 656 } 657 if ($this-> _pf_inmethod && is_array($word) && $word[0] == T_VARIABLE) { 658 $this-> _pv_lastvar = $word; 659 } 660 if ($this-> checkEventPush($word, $pevent)) { 661 $this-> _pf_quote_active = false; 662 if (is_string($word) && ( $word == '{' || $word == '"' || $word == "'" ) 663 ) { 664 $this-> _pf_quote_active = true; 665 $this-> _pv_lastvar = false; 666 } 667 } 668 $this-> _addoutput($word); 669 } 670 671 /** 672 * Handles define() statements 673 * 674 * The only thing this handler cares about is retrieving the name of the 675 * define variable, and the end of the define statement, so after the name 676 * is found, it simply makes sure parentheses are matched as in this case: 677 * 678 * <code> 679 * define("test",array("hello",6 => 4, 5 => array('there'))); 680 * </code> 681 * 682 * This handler and the DEFINE_PARAMS_PARENTHESIS handler (which is just 683 * {@link defaultHandler()} in this version, as nothing fancy is needed) 684 * work together to ensure proper parenthesis matching. 685 * 686 * If the define variable is documented, a link will be created to its 687 * documentation using the Converter passed. 688 */ 689 function handleDefine($word, $pevent) 690 { 691 static $token_save; 692 if (!isset($token_save)) { 693 $token_save = array(); 694 } 695 $e = $this-> checkEventPush($word, $pevent); 696 if ($e && $e != PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS) { 697 return; 698 } 699 700 if (!isset($this-> _pv_define_params_data)) { 701 $this-> _pv_define_params_data = ''; 702 }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1331 of 1382

703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 T_STRING)

if ($this-> checkEventPop($word, $pevent)) { unset($token_save); $this-> _addoutput($word); } if ($this-> _pf_definename_isset) { $this-> _addoutput($word); } else { if ($word != "," ) { $token_save[] = $word; if (is_array($word)) { $word = $word[1]; } $this-> _pv_define_params_data .= $word; } else { if (substr($this-> _pv_define_params_data, 0, 1) == substr($this-> _pv_define_params_data, strlen($this-> _pv_define_params_data) - 1) && in_array(substr($this-> _pv_define_params_data, 0, 1), array('"' , "'" )) ) { // remove leading and ending quotation marks // if there are only two $a = substr($this-> _pv_define_params_data, 0, 1); $b = substr($this-> _pv_define_params_data, 1, strlen($this-> _pv_define_params_data) - 2); if (strpos($b, $a) === false) { $this-> _pv_define_params_data = $b; } } $this-> _pf_definename_isset = true; $link = $this-> _converter-> getLink($this-> _pv_define_params_data); foreach ($token_save as $token) { if (is_object($link)) { if (is_array($token)) { $token = $token[1]; } $this-> _addoutput($this-> _converter-> returnSee($link, $token)); } else { $this-> _addoutput($save, $token); } } $this-> _pv_define_params_data = ''; } } } /** * Handles normal global code. Special consideration is taken for DocBlocks * as they need to retrieve the whole DocBlock before doing any output, so * the parser flag {@link $_pf_no_output_yet} is set to tell * {@link _addoutput()} not to spit anything out yet. * * @uses _link() make any global code that is a documentable element link * to the php manual or its documentation */ function handlePhpCode($word, $pevent) { $test = $this-> checkEventPush($word, $pevent); if ($test == PARSER_EVENT_DOCBLOCK || $test == PARSER_EVENT_COMMENT) { if (substr($word[1], 0, 2) == '/*' && strpos($word[1], '*/')) { $this-> _pv_last_word = $word; if ($word[1] == '/**#@-*/') { $this-> _pf_docblock_template = true; } else { $this-> _pf_docblock = true; } return $this-> handleDocBlock($word, PARSER_EVENT_DOCBLOCK); } $this-> _pf_no_output_yet = true; $this-> _pv_saveline = $this-> _wp-> linenum + 1; return; } if (is_array($word) && $word[0] == T_DOUBLE_COLON) { $this-> _pf_colon_colon = true; } if (!$this-> _pf_colon_colon && is_array($word) && $word[0] == {

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1332 of 1382

782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861

$this-> _pv_last_string = $word; } $this-> _link($word); $this-> checkEventPop($word, $pevent); } /** * Handle the function declaration header * * This handler only sees the "function name" portion of the function * declaration. Handling of the function parameters is by * {@link handleFunctionParams()}, and the function body is handled by * {@link handleLogicBlock()} */ function handleFunction($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); return; } if ($this-> checkEventPop($word, $pevent)) { return; } $this-> _link($word); } /** * Handle the method declaration header * * This handler only sees the "function name" portion of the method * declaration. Handling of the method parameters is by * {@link handleFunctionParams()}, and the method body is handled by * {@link handleMethodLogicBlock()} */ function handleMethod($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); return; } if ($this-> checkEventPop($word, $pevent)) { if ($word == ';') { $this-> _addoutput($word); } return; } $this-> _methodlink($word); } /** * Handler for the stuff between ( and ) in a function declaration * * <code> * function handles($only,$these,$parameters){...} * </code> */ function handleFunctionParams($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); return; } $this-> _addoutput($word); $this-> checkEventPop($word, $pevent); } /** * Handler for function body. * * The function body is checked for php functions, documented constants, * functions, and indirectly for global statements. It hyperlinks to the * documentation for detected elements is created. Everything else is * highlighted normally. */ function handleLogicBlock($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); return; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1333 of 1382

862 863 864 865 T_STRING) 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 T_STRING) 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939

if (is_array($word) && $word[0] == T_DOUBLE_COLON) { $this-> _pf_colon_colon = true; } if (!$this-> _pf_colon_colon && is_array($word) && { $this-> _pv_last_string = $word; } $this-> _link($word); if ($this-> checkEventPop($word, $pevent)) { $e = $this-> _event_stack-> popEvent(); $this-> _event_stack-> pushEvent($e); if ($e == PARSER_EVENT_FUNCTION) { $this-> _wp-> backupPos($word); } } }

$word[0] ==

/** * Handler for method body. * * Like functions, the method body is checked for php functions, documented * constants, functions, and indirectly for global statements. It also * checks for "$this->XXXX" where XXXX is a class variable or method, and * links to the documentation for detected elements is created. Everything * else is highlighted normally. */ function handleMethodLogicBlock($word, $pevent) { if (isset($this-> _pv_prev_var_type)) { //debug('prevtype is set'); if (!is_array($word)) { unset($this-> _pv_prev_var_type); } else { if ($word[0] != T_WHITESPACE && $word[0] != T_STRING && $word[0] != T_OBJECT_OPERATOR ) { //fancy_debug('unset', $word); unset($this-> _pv_prev_var_type); } } } $this-> _pf_inmethod = true; if ($e = $this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); if ($e == PARSER_EVENT_CLASS_MEMBER) { $this-> _pf_no_output_yet = true; } return; } if (is_array($word) && $word[0] == T_DOUBLE_COLON) { $this-> _pf_colon_colon = true; } if (!$this-> _pf_colon_colon && is_array($word) && $word[0] == { $this-> _pv_last_string = $word; } if (is_array($word) && $word[0] == T_VARIABLE) { $this-> _pv_lastvar = $word; } $this-> _link($word); if ($this-> checkEventPop($word, $pevent)) { $this-> _pf_inmethod = false; $e = $this-> _event_stack-> popEvent(); $this-> _event_stack-> pushEvent($e); if ($e == PARSER_EVENT_METHOD) { $this-> _wp-> backupPos($word); } } } /** * Handles $obj->classmember in a method body * * This handler is responsible for linking to the documentation of a * class member when it is used directly in a method body. * * There are two methods of determining whether to link: * - $this->member * - $this->member->submember *

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1334 of 1382

940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019

* The first case is handled by the $_pv_lastvar variable, and the * second case is handled by the $_pv_prev_var_type variable. $_pv_lastvar * is always set to the value of the last T_VARIABLE token, if and only if * no text has occurred between the variable and a T_OBJECT_OPERATOR token * "->". handleClassMember will only link if the last variable encountered * was $this. * * When $this->variable is encountered, the variable is looked up to see * if it can be found, and if so, the contents of its @var tag are processed * to see if the member variable is defined to have 1 and only 1 class. * If so, the $_pv_prev_var_type variable is set to this classname. When * submember is processed, the HighlightParser checks to see if * $_pv_prev_var_type::submember() or $_pv_prev_var_type::$submember exists, * and if it does, it is linked to. */ function handleClassMember($word, $pevent) { if (!isset($this-> _pv_lastvar) && !isset( $this-> _pv_prev_var_type)) { //fancy_debug('returned from', $word, $this->_pv_prev_var_type); $this-> _pf_no_output_yet = false; $this-> _event_stack-> popEvent(); return $this-> defaultHandler($word, $pevent); } if (isset($this-> _pv_cm_name)) { $this-> _pf_obj_op = false; $name = $this-> _pv_cm_name; unset($this-> _pv_cm_name); //debug('unset pvcmname'); $this-> _event_stack-> popEvent(); // control variable for _pv_prev_var_type $setnow = false; if ((isset($this-> _pv_lastvar) && $this-> _pv_lastvar[1] == '$this') || isset($this-> _pv_prev_var_type) ) { if (is_array($word) && $word[0] == T_WHITESPACE) { // preserve value of _pv_prev_var_type $setnow = true; $save = $this-> _wp-> nextToken(); $temp = $this-> _wp-> getWord(); $this-> _wp-> backupPos($save, true); } if ((is_string($word) && $word == '(') || (isset($temp) && is_string($temp) && $temp == '(') ) { // it's a function $this-> _pf_no_output_yet = false; $this-> _methodlink($name); unset($this-> _pv_prev_var_type); } else { // it's a variable //fancy_debug('name is ', $name); $this-> _pf_no_output_yet = false; $this-> _varlink($name, true); $templink = $this-> _converter-> getLink('object ' . $this-> _pv_class); $class = false; if (is_object($templink)) { $class = $this-> _converter-> classes -> getClass($templink-> name, $templink-> path); } if ($class) { $varname = $name; if (is_array($varname)) { $varname = $name[1]; } if ($varname{0} != '$') { $varname = '$'.$varname; } $var = $class-> getVar($this-> _converter, $varname); if (is_object($var) && $var-> docblock-> var) { $type = $var-> docblock-> var-> returnType; } if (isset($type)) { if (strpos($type, 'object') === false) { $type = 'object '.$type; } $type = $this-> _converter-> getLink($type); if (phpDocumentor_get_class($type) == 'classlink') { // the variable's type is a class,

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1335 of 1382

1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099

// save it for future -> //fancy_debug('set prev_var_type!', $type->name); $setnow = true; $this-> _pv_prev_var_type = $type-> name; } else { unset($this-> _pv_prev_var_type); } } else { unset($this-> _pv_prev_var_type); } } else { unset($this-> _pv_prev_var_type); } } } else { $this-> _pf_no_output_yet = false; // this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); $this-> _addoutput($name); } if (!$setnow) { //debug('unset prevtype, no setnow'); unset($this-> _pv_prev_var_type); } unset($this-> _pv_lastvar); $this-> _pf_no_output_yet = false; // this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); if ($word[0] == T_OBJECT_OPERATOR) { $this-> _wp-> backupPos($word); } else { $this-> _addoutput($word); } return; } if (!$this-> _pf_obj_op && is_array($this-> _pv_last_word) && $this-> _pv_last_word[0] == T_OBJECT_OPERATOR ) { if ((isset($this-> _pv_lastvar) && $this-> _pv_lastvar[1] == '$this') || isset($this-> _pv_prev_var_type) ) { $this-> _pf_obj_op = true; } else { $this-> _pf_no_output_yet = false; // this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); $this-> _addoutput($word); $this-> _event_stack-> popEvent(); } } if (is_array($word) && $word == T_WHITESPACE) { $this-> _pf_no_output_yet = false; // this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); $this-> _addoutput($word); return; } if ($this-> _pf_obj_op) { if (!(is_array($word) && ( $word[0] == T_STRING || $word[0] == T_WHITESPACE)) ) { unset($this-> _pv_lastvar); //debug('unset lastvar'); $this-> _event_stack-> popEvent(); $this-> _pf_no_output_yet = false; // this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); $this-> _addoutput($word); return; } if ($word[0] == T_STRING) { //fancy_debug('set pvcmname to', $word); $this-> _pv_cm_name = $word; } else { $this-> _pf_no_output_yet = false;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1336 of 1382

1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 T_STRING) 1178

// this does NewLinenum if necessary $this-> _wp-> backupPos($word); $this-> _wp-> getWord(); $this-> _addoutput($word); } } } /** * Handles comments * * Comments are almost always single-line tokens, and so will be * in the last word. This handler checks to see if the current token * is in fact a comment, and if it isn't, it backs up and returns control * to the parent event handler with that word. */ function handleComment($word, $pevent) { $w = $this-> _pv_last_word; // don't perform this check if this is a normal comment. Docblocks // have the _pf_no_output_yet variable set to true if ($this-> _pf_no_output_yet && is_array($w) && (in_array($w[0], array(T_COMMENT, T_DOC_COMMENT)) && strpos($w[1], '/**') === 0) ) { $this-> _event_stack-> popEvent(); $this-> _event_stack-> pushEvent(PARSER_EVENT_DOCBLOCK); return $this-> handleDocBlock($word, PARSER_EVENT_DOCBLOCK); } if ($this-> _pf_no_output_yet) { $flag = 1; $this-> _pf_no_output_yet = false; $this-> _addoutput($this-> _pv_last_word); } if (!is_array($word) || !in_array($word[0], array(T_COMMENT, T_DOC_COMMENT)) || (in_array($word[0], array(T_COMMENT, T_DOC_COMMENT)) && strpos($word[1], '/**') === 0) ) { $this-> _event_stack-> popEvent(); if (strpos($this-> _pv_last_word[1], "\n" ) !== false) { //$this->_wp->linenum++; //$this->newLineNum(); } $this-> _wp-> backupPos($this-> _pv_last_word); $this-> _wp-> getWord(); //var_dump($this->_wp->nextToken()); return; } elseif (isset($flag)) { $this-> newLineNum(); } $this-> _addoutput($word); $this-> checkEventPop($word, $pevent); if (strpos($word[1], '*/') === strlen($word[1]) - 2) { $this-> _event_stack-> popEvent(); } } /** * Handle class declarations * * Handles the initial declaration line: * * <code>class X</code> * * or * * <code>class X extends Y implements I</code> * * @uses _classlink() to link to documentation for X and for Y class in * "class X extends Y" */ function handleClass($word, $pevent) { $this-> _pf_in_class = true; $a = $this-> checkEventPush($word, $pevent); if (!isset($this-> { $this-> _pv_class = $this-> _converter-> class = $word[1]; _pv_class) && is_array($word) && $word[0] ==

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1337 of 1382

1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 T_STRING) 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257

$this-> return; }

_classlink($word);

if (is_array($word) && in_array($word[0], array(T_PRIVATE, T_PROTECTED, T_PUBLIC)) ) { $starttok = $this-> _wp-> nextToken(); $test = array(T_WHITESPACE); while ($test && $test[0] == T_WHITESPACE) { $tok = $this-> _wp-> nextToken(); $test = $this-> _wp-> getWord(); } // while if (is_array($test) && $test[0] == T_VARIABLE) { $this-> _wp-> backupPos($tok, true); return; } $this-> _wp-> backupPos($starttok, true); } if (@in_array($this-> _pv_last_word[0], array(T_PRIVATE, T_PROTECTED, T_PUBLIC)) ) { if (is_array($word) && $word[0] == T_VARIABLE) { $this-> _wp-> backupPos($this-> _pv_last_word); $this-> _event_stack-> pushEvent(PARSER_EVENT_VAR); return; } } if ($this-> { $this-> return; _classlink($word); } if (is_array($word) && $word[0] == T_EXTENDS) { $this-> _pf_extends_found = true; } if ($a == PARSER_EVENT_DOCBLOCK) { $this-> _pf_no_output_yet = true; $this-> _pv_saveline = $this-> _wp-> linenum + 1; return; } $this-> _addoutput($word); if ($this-> checkEventPop($word, $pevent)) { $this-> _pf_in_class = false; unset($this-> _pv_class); } } /** * Handles class variable declaration * * <code> * class X * { * var $Y; * } * </code> * * @uses _varlink() make a link to $Y documentation in class variable * declaration "var $Y;" */ function handleVar($word, $pevent) { if ($this-> checkEventPush($word, $pevent)) { $this-> _addoutput($word); return; } if (is_array($word) && $word[0] == T_VARIABLE) { return $this-> _varlink($word); } $this-> _addoutput($word); $this-> checkEventPop($word, $pevent); } /** * This handler is responsible for highlighting DocBlocks * _pf_extends_found && is_array($word) && $word[0] ==

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1338 of 1382

1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337

* handleDocBlock determines whether the docblock is normal or a template, * and gathers all the lines of the docblock together before doing any * processing * * As it is not possible to distinguish any comment token from a docblock * token, this handler is also called for comments, and will pass control * to {@link handleComment()} if the comment is not a DocBlock * * @uses commonDocBlock() once all lines of the DocBlock have been retrieved */ function handleDocBlock($word, $pevent) { if (!($this-> _pf_docblock || $this-> _pf_docblock_template)) { if (strpos($this-> _pv_last_word[1], '/**') !== 0) { // not a docblock $this-> _wp-> backupPos($this-> _pv_last_word); $this-> _event_stack-> popEvent(); $this-> _event_stack-> pushEvent(PARSER_EVENT_COMMENT); $this-> _pf_no_output_yet = false; return; } else { $this-> _pf_no_output_yet = true; $this-> _pv_db_lines = array(); } } $last_word = $this-> _pv_last_word[1]; $dtype = '_pv_docblock'; if ($last_word == '/**#@-*/') { // stop using docblock template $this-> _pf_no_output_yet = false; $this-> _addDocBlockoutput('closetemplate', $last_word); if ($this-> _pv_next_word !== false) { $this-> _wp-> backupPos($this-> _pv_next_word, true); } $this-> _event_stack-> popEvent(); return; } if (!($this-> _pf_docblock || $this-> _pf_docblock_template)) { $this-> _pv_db_lines = array(); if (strpos($last_word, '/**#@+') === 0) { // docblock template definition $this-> _pf_docblock_template = true; } else { $this-> _pf_docblock = true; } $this-> _pv_db_lines[] = $last_word; if (strpos($last_word, '*/') !== false) { $this-> commonDocBlock(); return; } $this-> _pv_db_lines[] = $word[1]; if (strpos($word[1], '*/') !== false) { $this-> commonDocBlock(); } } else { $this-> _pv_db_lines[] = $word[1]; } if (($this-> _pf_docblock || $this-> _pf_docblock_template) && (strpos($word[1], '*/') !== false) ) { $this-> commonDocBlock(); } } /**#@-*/ /** * This continuation of handleDocBlock splits DocBlock comments up into * phpDocumentor tokens. It highlights DocBlock templates in a different * manner from regular DocBlocks, recognizes inline tags, regular tags, * and distinguishes between standard core tags and other tags, and * recognizes parameters to tags like @var. * * the type in "@var type description" will be highlighted as a php type, * and the var in "@param type $var description" will be highlighted as a * php variable. * * @return void * @uses handleDesc() highlight inline tags in the description * @uses handleTags() highlight all tags * @access private

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1339 of 1382

1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417

*/ function commonDocBlock() { $this-> _event_stack-> popEvent(); $lines = $this-> _pv_db_lines; $go = count($this-> _pv_db_lines); for ($i=0; $i < $go; $i++) { if (substr(trim($lines[$i]), 0, 2) == '*/' || substr(trim($lines[$i]), 0, 1) != '*' && substr(trim($lines[$i]), 0, 3) != '/**' ) { $lines[$i] = array($lines[$i], false); } elseif (substr(trim($lines[$i]), 0, 3) == '/**') { $linesi = array(); // remove leading "/**" $linesi[1] = substr(trim($lines[$i]), 3); if (empty($linesi[1])) { $linesi[0] = $lines[$i]; } else { $linesi[0] = substr($lines[$i], 0, strpos($lines[$i], $linesi[1])); } $lines[$i] = $linesi; } else { $linesi = array(); // remove leading "* " $linesi[1] = substr(trim($lines[$i]), 1); if (empty($linesi[1])) { $linesi[0] = $lines[$i]; } else { $linesi[0] = substr($lines[$i], 0, strpos($lines[$i], $linesi[1])); } $lines[$i] = $linesi; } } for ($i = 0; $i < count($lines); $i++) { if ($lines[$i][1] === false) { continue; } if (substr(trim($lines[$i][1]), 0, 1) == '@' && substr(trim($lines[$i][1]), 0, 2) != '@ ' ) { $tagindex = $i; $i = count($lines); } } if (isset($tagindex)) { $tags = array_slice($lines, $tagindex); $desc = array_slice($lines, 0, $tagindex); } else { $tags = array(); $desc = $lines; } //var_dump($desc, $tags); $this-> _pf_no_output_yet = false; $save = $this-> _wp-> linenum; $this-> _wp-> linenum = $this-> _pv_saveline; $this-> handleDesc($desc); $this-> handleTags($tags); $this-> _pv_db_lines = array(); $this-> _wp-> linenum = $save; if (strpos($this-> _pv_last_word[1], '*/') !== false) { $this-> _wp-> backupPos($this-> _pv_next_word, true); } $this-> _pf_docblock = $this-> _pf_docblock_template = false; } /** * Handle the description area of a DocBlock * * This method simply finds inline tags and highlights them * separately from the rest of the description. * * @param mixed $desc the description piece(s) * * @return void * @uses getInlineTags() * @access private */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1340 of 1382

1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497

function handleDesc($desc) { $dbtype = 'docblock'; $dbtype .= ($this-> _pf_docblock ? '' : 'template'); foreach ($desc as $line) { $this-> getInlineTags($line[0] . $line[1]); if (strpos($line[0], '*/') === false && !(substr($line[0], 0, 2) == '/*' && strpos($line[1], '*/') !== false) ) { $this-> newLineNum(); $this-> _wp-> linenum++; } } if ($this-> _pf_internal) { $this-> _pf_internal = false; } } /** * Handle phpDocumentor tags in a DocBlock * * This method uses the {@link $tagHandlers} array to determine which * method will handle tags found in the docblock, and passes the data to * the individual handlers one by one * * @param array $tags array of tags to handle * * @return void * @access private */ function handleTags($tags) { $newtags = array(); $curtag = array(); for ($i=0; $i < count($tags); $i++) { $tagsi = trim($tags[$i][1]); if (substr($tagsi, 0, 1) == '@' && substr($tagsi, 0, 2) != '@ ') { // start a new tag $tags[$i][1] = array(substr($tags[$i][1], 0, strpos($tags[$i][1], $tagsi)), $tagsi); if (!empty($curtag)) { $newtags[] = $curtag; $curtag = array(); } $curtag[] = $tags[$i]; } else { $curtag[] = $tags[$i]; } } if (!empty($curtag)) { $newtags[] = $curtag; } foreach ($newtags as $tag) { foreach ($tag as $i => $t) { if ($t[1] === false) { continue; } if (is_array($t[1])) { $tag[$i][1][1] = explode(" " , str_replace("\t" , ' ', $t[1][1])); $x = $tag[$i][1][1]; } } $tagname = substr(array_shift($x), 1); $restoftag = $tag; if (isset($this-> tagHandlers[$tagname])) { $handle = $this-> tagHandlers[$tagname]; } else { $handle = $this-> tagHandlers['*']; } $this-> $handle($tagname, $restoftag); } } /** * This handler recognizes all {@}inline} tags * * Normal inline tags are simply highlighted. the {@}internal}} inline * tag {@tutorial tags.inlineinternal.pkg} is highlighted differently

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1341 of 1382

1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577

* to distinguish it from other inline tags. * * @param mixed $value the tag value * @param bool $endinternal indicates the end of an @internal tag * * @return void * @access private */ function getInlineTags($value, $endinternal = false) { if (!$value) { return; } if ($this-> _pf_internal && ! $endinternal) { if (strpos($value, '}}') !== false) { $x = strrpos($value, '}}'); // add the rest of internal $this-> getInlineTags(substr($value, 0, $x + 3), true); // strip internal from value $value = substr($value, strrpos($value, '}}') + 1); // turn off internal $this-> _pf_internal = false; } } if (!$value) { return; } $dbtype = 'docblock'; $dbtype .= ($this-> _pf_docblock ? '' : 'template'); $save = $value; $value = explode('{@', $value); $newval = array(); // everything before the first {@ is normal text $this-> _addDocBlockoutput($dbtype, $value[0]); for ($i=1; $i < count($value); $i++) { if (substr($value[$i], 0, 1) == '}') { $this-> _addDocBlockoutput($dbtype, '{@}' . substr($value[$i], 1)); } else { $save = $value[$i]; $value[$i] = str_replace("\t" , " " , $value[$i]); $value[$i] = explode(" " , $value[$i]); $word = array_shift($value[$i]); $val = join(' ', $value[$i]); if ($word == 'internal') { $this-> _pf_internal = true; $this-> _addDocBlockoutput($dbtype, '{@internal '); $value[$i] = substr($save, strlen('internal') + 1); // strip internal and cycle as if it were normal text. $this-> _addDocBlockoutput($dbtype, $value[$i]); continue; } if (in_array(str_replace('}', '', $word), $this-> allowableInlineTags) ) { if (strpos($word, '}')) { $word = str_replace('}', '', $word); $val = '} ' . $val; } $val = explode('}', $val); if (count($val) == 1) { //addError(PDERROR_UNTERMINATED_INLINE_TAG, // $word, '', $save); } $rest = $val; $val = array_shift($rest); if ($endinternal) { $rest = join('}', $rest); } else { $rest = join(' ', $rest); } if (isset($this-> inlineTagHandlers[$word])) { $handle = $this-> inlineTagHandlers[$word]; } else { $handle = $this-> inlineTagHandlers['*']; } $this-> $handle($word, $val); $this-> _addDocBlockoutput($dbtype, $rest); } else { $val = $word . ' ' . $val; $this-> _addDocBlockoutput($dbtype, '{@' . $val); }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1342 of 1382

1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657

} } } /** * Handles all inline tags * * @param string $name the tag name * @param mixed $value the tag value * * @return void * @access private */ function handleDefaultInlineTag($name, $value) { $this-> _addDocBlockoutput('inlinetag', '{@' . $name . ' ' . $value . '}'); } /**#@+ * phpDocumentor DocBlock tag handlers * * @param string $name tag name * @param array $value array of lines contained in the tag description * * @return void * @access private */ /** * Handle normal tags * * This handler adds to outpu all comment information before the tag begins * as in " * " before "@todo" in " * @todo" * * Then, it highlights the tag as a regular or coretag based on $coretag. * Finally, it uses getInlineTags to highlight the description * * @param bool $coretag whether this tag is a core tag or not * * @uses getInlineTags() highlight a tag description */ function defaultTagHandler($name, $value, $coretag = false) { $dbtype = 'docblock'; $dbtype .= ($this-> _pf_docblock ? '' : 'template'); foreach ($value as $line) { $this-> _addDocBlockoutput($dbtype, $line[0]); if ($line[1] === false) { if (trim($line[0]) != '*/') { $this-> newLineNum(); $this-> _wp-> linenum++; } continue; } $this-> _addDocBlockoutput($dbtype, $line[1][0]); $stored = ''; if (is_array($line[1][1])) { foreach ($line[1][1] as $i => $tpart) { if ($tpart == '@' . $name && $i == 0) { $tagname = 'tag'; if ($coretag) { $tagname = 'coretag'; } $this-> _addDocBlockoutput($tagname, '@' . $name); continue; } $stored .= ' ' . $tpart; } } else { $stored = $line[1]; } $this-> getInlineTags($stored); if (strpos($stored, '*/') === false) { $this-> newLineNum(); $this-> _wp-> linenum++; } } } /**

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1343 of 1382

1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737

* main handler for "core" tags * * @see defaultTagHandler() */ function coreTagHandler($name, $value) { return $this-> defaultTagHandler($name, $value, true); } /** * Handles @global * * This handler works like {@link defaultTagHandler()} except it highlights * the type and variable (if present) in "@global type $variable" or * "@global type description" */ function globalTagHandler($name, $value) { $this-> paramTagHandler($name, $value); } /** * Handles @param * * This handler works like {@link defaultTagHandler()} except it highlights * the type and variable (if present) in "@param type $variable description" * or "@param type description" * * @param bool $checkforvar private parameter, checks for $var or not */ function paramTagHandler($name, $value, $checkforvar = true) { $dbtype = 'docblock'; $dbtype .= ($this-> _pf_docblock ? '' : 'template'); $ret = $this-> retrieveType($value, 0, $checkforvar); foreach ($value as $num => $line) { $this-> _addDocBlockoutput($dbtype, $line[0]); if ($line[1] === false) { if (trim($line[0]) != '*/') { $this-> newLineNum(); $this-> _wp-> linenum++; } continue; } $this-> _addDocBlockoutput($dbtype, $line[1][0]); $stored = ''; $typeloc = 1; $varloc = 2; if (is_array($line[1][1])) { $this-> _addDocBlockoutput('coretag', '@' . $name . ' '); foreach ($ret[0] as $text) { if (is_string($text)) { $this-> _addDocBlockoutput($dbtype, $text); } if (is_array($text)) { if ($text[0] != 'desc') { $this-> _addDocBlockoutput($text[0], $text[1]); } else { $stored .= $text[1]; } } } } else { if (isset($ret[$num])) { foreach ($ret[$num] as $text) { if (is_string($text)) { $this-> _addDocBlockoutput($dbtype, $text); } if (is_array($text)) { if ($text[0] != 'desc') { $this-> _addDocBlockoutput($text[0], $text[1]); } else { $stored .= $text[1]; } } } } else { $stored = $line[1]; } }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1344 of 1382

1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817

$this-> getInlineTags($stored); if (strpos($stored, '*/') === false) { $this-> newLineNum(); $this-> _wp-> linenum++; } } } /** * handles the @staticvar tag * * @see paramTagHandler() */ function staticvarTagHandler($name, $value) { return $this-> paramTagHandler($name, $value); } /** * handles the @var tag * * @see paramTagHandler() */ function varTagHandler($name, $value) { return $this-> paramTagHandler($name, $value); } /** * Handles @return * * This handler works like {@link defaultTagHandler()} except it highlights * the type in "@return type description" */ function returnTagHandler($name, $value) { $this-> paramTagHandler($name, $value, false); } /** * Handles @property(-read or -write) and @method magic tags */ function propertyTagHandler($name, $value) { return $this-> paramTagHandler($name, $value, true); } /**#@-*/ /** * Retrieve the type portion of a @tag type description * * Tags like @param, @return and @var all have a PHP type portion in their * description. Since the type may contain the expression "object blah" * where blah is a classname, it makes parsing out the type field complex. * * Even more complicated is the case where a tag variable can contain * multiple types, such as object blah|object blah2|false, and so this * method handles these cases. * * @param array $value array of words that were separated by spaces * @param 0|1 $state 0 = find the type, 1 = find the var, if present * @param bool $checkforvar flag to determine whether to check for the end of a * type is defined by a $varname * * @return array Format: array(state (0 [find type], 1 [var], 2 [done]), * @access private */ function retrieveType($value, $state = 0, $checkforvar = false) { $index = 0; $result = array(); do { if (!isset($value[$index][1])) { return $result; } $val = $value[$index][1]; if (empty($val)) { return $result; }

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1345 of 1382

1818 if ($index == 0) { 1819 $val = $val[1]; 1820 array_shift($val); 1821 } else { 1822 $val = explode(' ', $val); 1823 } 1824 $ret = $this-> _retrieveType($val, $state, $checkforvar); 1825 $state = $ret[0]; 1826 $result[$index++] = $ret[1]; 1827 } while ((!$checkforvar && $state < 1) || ($state < 2 && $checkforvar)); 1828 return $result; 1829 } 1830 1831 /** 1832 * used by {@link retrieveType()} in its work 1833 * 1834 * @param array $value array of words that were separated by spaces 1835 * @param 0|1 $state 0 = find the type, 1 = find the var, if present 1836 * @param bool $checkforvar flag to determine whether to check for the end of a 1837 * type is defined by a $varname 1838 * 1839 * @return array 1840 * @access private 1841 */ 1842 function _retrieveType($value, $state, $checkforvar) 1843 { 1844 $result = array(); 1845 $result[] = $this-> _removeWhiteSpace($value, 0); 1846 if ($state == 0) { 1847 if (!count($value)) { 1848 return array(2, $result); 1849 } 1850 $types = ''; 1851 $index = 0; 1852 if (trim($value[0]) == 'object') { 1853 $result[] = array('tagphptype', $value[0] . ' '); 1854 $types .= array_shift($value).' '; 1855 $result[] = $this-> _removeWhiteSpace($value, 0); 1856 if (!count($value)) { 1857 // was just passed "object" 1858 return array(2, $result); 1859 } 1860 if ($value[0]{0} == '$' || substr($value[0], 0, 2) == '&$' ) { 1861 // was just passed "object" 1862 // and the next thing is a variable name 1863 if ($checkforvar) { 1864 $result[] = array('tagvarname' , $value[0] . ' '); 1865 array_shift($value); 1866 } 1867 $result[] = array('desc', join(' ', $value)); 1868 return array(2, $result); 1869 } 1870 } 1871 $done = false; 1872 $loop = -1; 1873 do { 1874 // this loop checks for type|type|type and for 1875 // type|object classname|type|object classname2 1876 if (strpos($value[0], '|')) { 1877 $temptypes = explode('|', $value[0]); 1878 while (count($temptypes)) { 1879 $type = array_shift($temptypes); 1880 $result[] = array('tagphptype', $type); 1881 if (count($temptypes)) { 1882 $result[] = '|'; 1883 } 1884 } 1885 if (trim($type) == 'object') { 1886 $result[] = array('tagphptype', $types . ' '); 1887 $result[] = $this-> _removeWhiteSpace($value, 0); 1888 } else { 1889 $done = true; 1890 } 1891 array_shift($value); 1892 if (count($value) && strlen($value[0]) && isset ( $value[0]) && 1893 ($value[0]{0} == '$' || substr($value[0], 0, 2) == '&$' ) 1894 ) { 1895 // was just passed "object"

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1346 of 1382

1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975

// and the next thing is a variable name $result[] = array('tagvarname' , $value[0] . ' '); array_shift($value); $result[] = array('desc', join(' ', $value)); return array(2, $result); } } else { $result[] = array('tagphptype', $value[0] . ' '); array_shift($value); $done = true; } $loop++; } while (!$done && count($value)); if ($loop) { $result[] = ' '; } // still searching for type if (!$done && ! count($value)) { return array(0, $result); } // still searching for var if ($done && ! count($value)) { return array(1, $result); } } $result[] = $this-> _removeWhiteSpace($value, 0); $state = 1; if ($checkforvar) { if (count($value)) { $state = 2; if (substr($value[0], 0, 1) == '$' || substr($value[0], 0, 2) == '&$' ) { $result[] = array('tagvarname' , $value[0] . ' '); array_shift($value); } } else { $state = 1; } } $result[] = array('desc', join(' ', $value)); return array($state, $result); } /** * captures trailing whitespace * * @param array &$value array of string * @param int $index index to seek non-whitespace to * * @return string whitespace * @access private */ function _removeWhiteSpace(& $value, $index) { $result = ''; if (count($value) > $index && empty( $value[$index])) { $found = false; for ($i = $index; $i < count($value) && ! strlen($value[$i]); $i++) { $result .= ' '; } array_splice($value, $index, $i - $index); } return $result; } /**#@+ * Link generation methods * * @param string|array $word token to try to link * * @access private */ /** * Generate a link to documentation for an element * * This method tries to link to documentation for functions, methods, * PHP functions, class names, and if found, adds the links to output * instead of plain text */

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1347 of 1382

1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055

function _link($word) { if (is_array($word) && $word[0] == T_STRING) { if ($this-> _pf_colon_colon) { $this-> _pf_colon_colon = false; $combo = $this-> _pv_last_string[1] . '::' . $word[1] . '()'; //debug('testing ' . $combo); $link = $this-> _converter-> getLink($combo); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } $this-> _addoutput($word); return; } $link = $this-> _converter-> getLink($word[1] . '()'); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } elseif (is_string($link) && strpos($link, 'ttp://')) { $this-> _addoutput($this-> _converter-> returnLink($link, $word[1]), true); return; } else { $link = $this-> _converter-> getLink($word[1]); if (is_object($link)) { $word[1] = $this-> _converter-> returnSee($link, $word[1]); } $this-> _addoutput($word, true); return; } } $this-> } /** * Works like {@link _link()} except it only links to global variables */ function _globallink($word) { if (!is_array($word)) { return $this-> _addoutput($word); } if ($word[0] != T_VARIABLE) { return $this-> _addoutput($word); } if (is_array($word) && $word[0] == T_VARIABLE) { $link = $this-> _converter-> getLink('global ' . $word[1]); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } } $this-> _addoutput($word); } /** * Works like {@link _link()} except it only links to classes */ function _classlink($word) { //debug("checking class " . $word[1]); if (is_array($word) && $word[0] == T_STRING) { $link = $this-> _converter-> getLink($word[1]); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } } $this-> _addoutput($word); } /** * Works like {@link _link()} except it only links to methods */ _addoutput($word);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1348 of 1382

2056 2057 2058 2059 '()'); 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134

function _methodlink($word) { if (is_array($word) && $word[0] == T_STRING) { //debug("checking method " . $this->_pv_class . '::' . $word[1] . if (isset($this-> _pv_prev_var_type)) { $link = $this-> _converter-> getLink($this-> _pv_prev_var_type . '::' . $word[1] . '()'); } else { $link = $this-> _converter-> getLink($this-> _pv_class . '::' . $word[1] . '()'); } if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } if (isset($this-> _pv_prev_var_type)) { $this-> _addoutput($word); return; } //debug("checking method " . $word[1] . '()'); $link = $this-> _converter-> getLink($word[1] . '()'); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } } $this-> } /** * Works like {@link _link()} except it only links to class variables * * @param bool $justastring true if the $word is only a string */ function _varlink($word, $justastring=false) { if ($justastring) { $word[0] = T_VARIABLE; } if (is_array($word) && $word[0] == T_VARIABLE) { $x = ($justastring ? '$' : ''); //debug("checking var " . $this->_pv_class . '::' . $x . $word[1]); if (isset($this-> _pv_prev_var_type)) { //debug("checking var " . $this->_pv_prev_var_type . '::' . // $x . $word[1]); $link = $this-> _converter-> getLink($this-> _pv_prev_var_type . '::' . $x . $word[1]); } else { $link = $this-> _converter-> getLink($this-> _pv_class . '::' . $x . $word[1]); } if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } //debug("checking var " . $x . $word[1]); if (isset($this-> _pv_prev_var_type)) { $this-> _addoutput($word); return; } $link = $this-> _converter-> getLink($x . $word[1]); if (is_object($link)) { $this-> _addoutput($this-> _converter-> returnSee($link, $word[1]), true); return; } } $this-> _addoutput($word); } /**#@-*/ /**#@+ * Output Methods * @access private */ /** _addoutput($word);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1349 of 1382

2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214

* This method adds output to {@link $_line} * * If a string with variables like "$test this" is present, then special * handling is used to allow processing of the variable in context. * * @param mixed $word the string|array tag token and value * @param bool $preformatted whether or not the $word is already formatted * * @return void * @see _flush_save() */ function _addoutput($word, $preformatted = false) { if ($this-> _pf_no_output_yet) { return; } if ($this-> _pf_quote_active) { if (is_array($word)) { $this-> _save .= $this-> _converter-> highlightSource($word[0], $word[1]); } else { $this-> _save .= $this-> _converter-> highlightSource(false, $word, true); } } else { $this-> _flush_save(); if (is_string($word) && trim($word) == '') { $this-> _line .= $this-> _converter-> postProcess($word); return; } if (is_array($word) && trim($word[1]) == '') { $this-> _line .= $this-> _converter-> postProcess($word[1]); return; } if (is_array($word)) { $this-> _line .= $this-> _converter-> highlightSource($word[0], $word[1], $preformatted); } else { $this-> _line .= $this-> _converter-> highlightSource(false, $word, $preformatted); } } } /** * Like {@link _output()}, but for DocBlock highlighting * * @param mixed $dbtype the docblock type * @param mixed $word the string|array tag token and value * @param bool $preformatted whether or not the $word is already formatted * * @return void */ function _addDocBlockoutput($dbtype, $word, $preformatted = false) { if ($this-> _pf_internal) { $this-> _line .= $this-> _converter-> highlightDocBlockSource('internal', $word, $preformatted); } else { $this-> _line .= $this-> _converter-> highlightDocBlockSource($dbtype, $word, $preformatted); } } /** * Flush a saved string variable highlighting * * {@source } * * @return void * @todo CS cleanup - rename to _flushSave() for camelCase rule */ function _flush_save() { if (!empty($this-> _save)) { $this-> _save .= $this-> _converter-> flushHighlightCache(); // clear the existing cache, reset it to the old value if (isset($this-> _save_highlight_state)) { $this-> _converter-> _setHighlightCache($this-> _save_highlight_state[0],

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1350 of 1382

2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294

$this-> _save_highlight_state[1]); } $this-> _line .= $this-> _converter-> highlightSource(T_CONSTANT_ENCAPSED_STRING, $this-> $this-> _save = ''; } } /**#@-*/ /** * Give the word parser necessary data to begin a new parse * * @param array &$data all tokens separated by line number * * @return void */ function configWordParser(& $data) { $this-> _wp-> setup($data, $this); $this-> _wp-> setWhitespace(true); }

_save, true);

/** * Initialize all parser state variables * * @param bool $inlinesourceparse true if we are highlighting an inline * {@}source} tag's output * @param false|string$class name of class we are going * to start from * * @return void * @uses $_wp sets to a new {@link phpDocumentor_HighlightWordParser} */ function setupStates($inlinesourceparse, $class) { $this-> _output = ''; $this-> _line = ''; unset($this-> _wp); $this-> _wp = new phpDocumentor_HighlightWordParser; $this-> _event_stack = new EventStack; if ($inlinesourceparse) { $this-> _event_stack-> pushEvent(PARSER_EVENT_PHPCODE); if ($class) { $this-> _event_stack-> pushEvent(PARSER_EVENT_CLASS); $this-> _pv_class = $class; } } else { $this-> _pv_class = null; } $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> _pv_define _pv_define_name _pv_define_value _pv_define_params_data _pv_dtype _pv_docblock _pv_dtemplate _pv_func _pv_global_name _pv_global_val _pv_globals _pv_global_count _pv_include_params_data _pv_include_name _pv_include_value _pv_linenum _pv_periodline _pv_paren_count _pv_statics _pv_static_count _pv_static_val _pv_quote_data _pv_function_data _pv_var _pv_varname _pf_definename_isset _pf_extends_found _pf_includename_isset _pf_get_source _pf_getting_source = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = null; null; null; null; null; null; null; null; null; null; null; null; null; null; null; null; null; 0; null; null; null; null; null; null; null; false; false; false; false; false;

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1351 of 1382

2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374

$this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> $this-> }

_pf_in_class _pf_in_define _pf_in_global _pf_in_include _pf_in_var _pf_funcparam_val _pf_quote_active _pf_reset_quote_data _pf_useperiod _pf_var_equals _pf_obj_op _pf_docblock _pf_docblock_template _pf_colon_colon _pv_last_string _pf_inmethod _pf_no_output_yet _pv_saveline _pv_next_word _save

= = = = = = = = = = = = = = = = = = = =

false; false; false; false; false; false; false; true; false; false; false; false; false; false; false; false; false; 0; false; '';

/** * Initialize the {@link $tokenpushEvent, $wordpushEvent} arrays * * @return void */ function phpDocumentor_HighlightParser() { if (!defined('T_INTERFACE')) { define('T_INTERFACE', -1); } $this-> allowableTags = $GLOBALS['_phpDocumentor_tags_allowed']; $this-> allowableInlineTags = $GLOBALS['_phpDocumentor_inline_doc_tags_allowed']; $this-> inlineTagHandlers = array('*' => 'handleDefaultInlineTag'); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_NOEVENTS] = array( T_OPEN_TAG => PARSER_EVENT_PHPCODE, ); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_PHPCODE] = array( T_FUNCTION => PARSER_EVENT_FUNCTION, T_CLASS => PARSER_EVENT_CLASS, T_INTERFACE => PARSER_EVENT_CLASS, T_INCLUDE_ONCE => PARSER_EVENT_INCLUDE, T_INCLUDE => PARSER_EVENT_INCLUDE, T_START_HEREDOC => PARSER_EVENT_EOFQUOTE, T_REQUIRE => PARSER_EVENT_INCLUDE, T_REQUIRE_ONCE => PARSER_EVENT_INCLUDE, T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_PHPCODE] = array( "define" => PARSER_EVENT_DEFINE, '"' => PARSER_EVENT_QUOTE, '\'' => PARSER_EVENT_QUOTE, ); /**************************************************************/ $this-> wordpushEvent[PARSER_EVENT_FUNCTION] = array( '{' => PARSER_EVENT_LOGICBLOCK, '(' => PARSER_EVENT_FUNCTION_PARAMS, ); $this-> tokenpushEvent[PARSER_EVENT_FUNCTION] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_FUNCTION] = array("}" /**************************************************************/

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1352 of 1382

2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 ","

$this-> tokenpopEvent[PARSER_EVENT_EOFQUOTE] = array(T_END_HEREDOC); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_FUNCTION_PARAMS] = array( T_CONSTANT_ENCAPSED_STRING => PARSER_EVENT_QUOTE, T_ARRAY => PARSER_EVENT_ARRAY, T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_FUNCTION_PARAMS] = array( '"' => PARSER_EVENT_QUOTE, "'" => PARSER_EVENT_QUOTE, ); $this-> wordpopEvent[PARSER_EVENT_FUNCTION_PARAMS] = array(")" /**************************************************************/ $this-> wordpushEvent[PARSER_EVENT_LOGICBLOCK] = array( "{" => PARSER_EVENT_LOGICBLOCK, '"' => PARSER_EVENT_QUOTE, ); $this-> tokenpushEvent[PARSER_EVENT_LOGICBLOCK] = array( T_GLOBAL => PARSER_EVENT_FUNC_GLOBAL, T_STATIC => PARSER_EVENT_STATIC_VAR, T_START_HEREDOC => PARSER_EVENT_EOFQUOTE, T_CURLY_OPEN => PARSER_EVENT_LOGICBLOCK, T_DOLLAR_OPEN_CURLY_BRACES => PARSER_EVENT_LOGICBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_LOGICBLOCK] = array("}" ); $this-> tokenpopEvent[PARSER_EVENT_LOGICBLOCK] = array(T_CURLY_OPEN); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_ARRAY] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_ARRAY] = array(")" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_FUNC_GLOBAL] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_FUNC_GLOBAL] = array(";" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_STATIC_VAR] = array( T_CONSTANT_ENCAPSED_STRING => PARSER_EVENT_QUOTE, T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_STATIC_VAR] = array( "=" => PARSER_EVENT_STATIC_VAR_VALUE, ); $this-> wordpopEvent[PARSER_EVENT_STATIC_VAR] = array(";" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_STATIC_VAR_VALUE] = array( T_CONSTANT_ENCAPSED_STRING => PARSER_EVENT_QUOTE, T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, T_ARRAY => PARSER_EVENT_ARRAY, ); $this-> wordpushEvent[PARSER_EVENT_STATIC_VAR_VALUE] = array( '"' => PARSER_EVENT_QUOTE, "'" => PARSER_EVENT_QUOTE, ); $this-> wordpopEvent[PARSER_EVENT_STATIC_VAR_VALUE] = array(";" );

);

);

);

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1353 of 1382

2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533

/**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_QUOTE] = array( T_OBJECT_OPERATOR => PARSER_EVENT_CLASS_MEMBER, T_CURLY_OPEN => PARSER_EVENT_QUOTE_VAR, ); $this-> wordpopEvent[PARSER_EVENT_QUOTE] = array('"' ); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_QUOTE_VAR] = array( T_OBJECT_OPERATOR => PARSER_EVENT_CLASS_MEMBER, T_CURLY_OPEN => PARSER_EVENT_QUOTE_VAR, ); $this-> wordpushEvent[PARSER_EVENT_QUOTE_VAR] = array( "{" => PARSER_EVENT_QUOTE_VAR, '"' => PARSER_EVENT_QUOTE_VAR, "'" => PARSER_EVENT_QUOTE_VAR, ); $this-> wordpopEvent[PARSER_EVENT_QUOTE_VAR] = array('}'); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_DEFINE] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, T_CONSTANT_ENCAPSED_STRING => PARSER_EVENT_QUOTE, ); $this-> wordpushEvent[PARSER_EVENT_DEFINE] = array( "(" => PARSER_EVENT_DEFINE_PARAMS, ); $this-> wordpopEvent[PARSER_EVENT_DEFINE] = array(";" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_DEFINE_PARAMS] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_DEFINE_PARAMS] = array( "(" => PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS, '"' => PARSER_EVENT_QUOTE, "'" => PARSER_EVENT_QUOTE, ); $this-> wordpopEvent[PARSER_EVENT_DEFINE_PARAMS] = array(")" /**************************************************************/

);

);

$this-> tokenpushEvent[PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS] = array( "(" => PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS, '"' => PARSER_EVENT_QUOTE, "'" => PARSER_EVENT_QUOTE, ); $this-> wordpopEvent[PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS] = array(")" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_VAR] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, T_ARRAY => PARSER_EVENT_ARRAY, ); $this-> wordpopEvent[PARSER_EVENT_VAR] = array(";" ); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_CLASS] = array( T_FUNCTION => PARSER_EVENT_METHOD, T_VAR => PARSER_EVENT_VAR, T_COMMENT => PARSER_EVENT_DOCBLOCK, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, T_CLOSE_TAG => PARSER_EVENT_OUTPHP, );

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1354 of 1382

2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 array(")" 2601 } 2602 } 2603 ?>

$this-> wordpopEvent[PARSER_EVENT_CLASS] = array("}" /**************************************************************/ $this-> wordpushEvent[PARSER_EVENT_METHOD] = array( '{' => PARSER_EVENT_METHOD_LOGICBLOCK, '(' => PARSER_EVENT_FUNCTION_PARAMS, ); $this-> tokenpushEvent[PARSER_EVENT_METHOD] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_METHOD] = array("}" /**************************************************************/

);

, ";"

);

$this-> wordpushEvent[PARSER_EVENT_METHOD_LOGICBLOCK] = array( "{" => PARSER_EVENT_METHOD_LOGICBLOCK, '"' => PARSER_EVENT_QUOTE, ); $this-> tokenpushEvent[PARSER_EVENT_METHOD_LOGICBLOCK] = array( T_OBJECT_OPERATOR => PARSER_EVENT_CLASS_MEMBER, T_GLOBAL => PARSER_EVENT_FUNC_GLOBAL, T_STATIC => PARSER_EVENT_STATIC_VAR, T_CURLY_OPEN => PARSER_EVENT_LOGICBLOCK, T_DOLLAR_OPEN_CURLY_BRACES => PARSER_EVENT_LOGICBLOCK, ); $this-> wordpopEvent[PARSER_EVENT_METHOD_LOGICBLOCK] = array("}" ); $this-> tokenpopEvent[PARSER_EVENT_METHOD_LOGICBLOCK] = array(T_CURLY_OPEN); /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_INCLUDE] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_INCLUDE] = array( "(" => PARSER_EVENT_INCLUDE_PARAMS, ); $this-> wordpopEvent[PARSER_EVENT_INCLUDE] = array(";" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_INCLUDE_PARAMS] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_INCLUDE_PARAMS] = array( "(" => PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS, ); $this-> wordpopEvent[PARSER_EVENT_INCLUDE_PARAMS] = array(")" /**************************************************************/ $this-> tokenpushEvent[PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS] = array( T_COMMENT => PARSER_EVENT_COMMENT, T_DOC_COMMENT => PARSER_EVENT_DOCBLOCK, ); $this-> wordpushEvent[PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS] = array( "(" => PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS, ); $this-> wordpopEvent[PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS] = );

);

);

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1355 of 1382

File Source for find_phpdoc.php


Documentation for this file is available at find_phpdoc.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 <?php /** * Utility file to locate phpDocumentor for a non-PEAR installation * * phpDocumentor :: automatic documentation generator * * PHP versions 4 and 5 * * Copyright (c) 2002-2007 Gregory Beaver * * LICENSE: * * This library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; * either version 2.1 of the License, or (at your option) any * later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @category ToolsAndUtilities * @package phpDocumentor * @subpackage setup * @author Gregory Beaver <[email protected]> * @copyright 2002-2007 Gregory Beaver * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version CVS: $Id: find_phpdoc.php 246330 2007-11-17 03:09:41Z ashnazg $ * @filesource * @link http://www.phpdoc.org * @link http://pear.php.net/PhpDocumentor * @since 1.2 * @todo CS cleanup - change package to PhpDocumentor * @todo CS cleanup - change subpackage to Setup */ /** * Dummy value * @internal CS Exception - logic here necessitates using an unconditional "include" */ @include ''; // value used to test whether include worked return 6; ?>

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1356 of 1382

Appendix D - Todo List


In Package Converters
In XMLDocBookpeardoc2Converter::endClass() :

move class summary into an array to be written out at the end

of parsing each package

In CHMdefaultConverter::Output() :

use to directly call html help compiler hhc.exe

In PDFdefaultConverter :

Implement links to conflicts/inheritance

In XMLDocBookConverter :

indexes for other DocBook converters not based on peardoc templates

In Package phpDocumentor
In abstractLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1357 of 1382

In ErrorTracker::addError() :

CS Cleanup - do I need to add $data to the method signature?

In addError() :

CS Cleanup - do I need to add $data to the method signature?

In addErrorDie() :

CS Cleanup - do I need to add $data to the method signature?

In ErrorTracker::addErrorReturn() :

CS Cleanup - do I need to add $data to the method signature?

In addWarning() :

CS Cleanup - do I need to add $data to the method signature?

In ErrorTracker::addWarning() :

CS Cleanup - do I need to add $data to the method signature?

In phpDocumentor_TutorialHighlightParser::checkEventPop() :

CS cleanup - PHPCS needs to recognize docblock template tags

In phpDocumentor_TutorialHighlightParser::checkEventPush() :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1358 of 1382

CS cleanup - PHPCS needs to recognize docblock template tags

In Classes :

CS cleanup - change package to PhpDocumentor

In Classes.inc :

CS cleanup - change package to PhpDocumentor

In classLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In clone.inc.php :

CS cleanup - change package to PhpDocumentor

In clone5.inc.php :

CS cleanup - change package to PhpDocumentor

In common.inc.php :

CS cleanup - change package to PhpDocumentor CS cleanup - rename constant to TOKENIZER_EXT

In constLink :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1359 of 1382

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserLinkInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserTutorialTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserSamp::Convert() :

CS cleanup - rename method to convert()

In parserSeeTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserAccessTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserUsesTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserUsedByTag::Convert() :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1360 of 1382

CS cleanup - rename to convert for camelCase rule

In parserIdInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserInheritdocInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserFileSourceTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserPre::Convert() :

CS cleanup - rename method to convert()

In parserTocInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserB::Convert() :

CS cleanup - rename method to convert()

In parserReturnTag::Convert() :

CS cleanup - rename to convert for camelCase rule

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1361 of 1382

In parserTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserCData::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserStringWithInlineTags::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserEntity::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserBr::Convert() :

CS cleanup - rename method to convert()

In parserCode::Convert() :

CS cleanup - rename method to convert()

In parserNameTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserList::Convert() :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1362 of 1382

CS cleanup - rename method to convert()

In parserKbd::Convert() :

CS cleanup - rename method to convert()

In parserTutorialInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserDescVar::Convert() :

CS cleanup - rename method to convert()

In parserI::Convert() :

CS cleanup - rename method to convert()

In parserSourceInlineTag::Convert() :

CS cleanup - rename to convert for camelCase rule

In parserLinkInlineTag::ConvertPart() :

CS cleanup - rename to convertPart for camelCase rule

In parserFileSourceTag::ConvertSource() :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1363 of 1382

CS cleanup - rename to convertSource for camelCase rule what's up with all the "return" statements? can they _all_ be removed?

In parserExampleTag::ConvertSource() :

CS cleanup - rename to convertSource for camelCase rule what's up with all the "return" statements? can they _all_ be removed?

In debug() :

CS Cleanup - can't avoid "prefixed by package" error

In defineLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In DescHTML.inc :

CS cleanup - change package to PhpDocumentor

In DocBlockTags.inc :

CS cleanup - change package to PhpDocumentor

In Errors.inc :

CS cleanup - change package to PhpDocumentor

In ErrorTracker :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1364 of 1382

CS cleanup - change package to PhpDocumentor

In EventStack :

CS cleanup - change package to PhpDocumentor

In EventStack.inc :

CS cleanup - change package to PhpDocumentor

In find_phpdoc.php :

CS cleanup - change package to PhpDocumentor CS cleanup - change subpackage to Setup

In functionLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In ProceduralPages::getPathInfo() :

figure out what &$c is and update the param tag

In parserPage::getSourceLocation() :

determine if the str_replace in the 'pear/' ELSE branch should be removed (see Documentation/tests/bug1574043.php). It does NOT exist in the similar function parserClass->getSourceLocation() in ParserElements.inc.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1365 of 1382

In globalLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserTag::HandleEvent() :

CS cleanup - rename to handleEvent for camelCase rule

In HighlightParser.inc :

CS cleanup - change package to PhpDocumentor

In Classes::Inherit() :

CS Cleanup - rename to "inherit" for CamelCaps naming standard

In InlineTags.inc :

CS cleanup - change package to PhpDocumentor

In LinkClasses.inc :

CS cleanup - change package to PhpDocumentor

In methodLink :

CS cleanup - change classname to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1366 of 1382

CS cleanup - change package to PhpDocumentor

In new_phpdoc.php :

CS cleanup - change package to PhpDocumentor

In PackagePageElements.inc :

CS cleanup - change package to PhpDocumentor

In pageLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In phpDocumentor_TutorialHighlightParser::parse() :

CS cleanup - unable to get function signature below 85char wide

In phpDocumentor_HighlightParser::parse() :

CS cleanup - rename tokenizer_ext constant to uppercase

In Io::parseArgv() :

replace with Console_* ?

In parserAccessTag :

CS cleanup - change classname to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1367 of 1382

CS cleanup - change package to PhpDocumentor

In parserB :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserB

In parserBase :

CS cleanup - change package to PhpDocumentor

In parserBr :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserBr

In parserCData :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserCode :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserCode

In parserData :

CS cleanup - change package to PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1368 of 1382

In ParserData.inc :

CS cleanup - change package to PhpDocumentor

In parserDescVar :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserDescVar

In parserEntity :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserExampleInlineTag::parserExampleInlineTag() :

replace tokenizer_ext constant with TOKENIZER_EXT for CS rule

In parserExampleInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserExampleTag::parserExampleTag() :

CS cleanup - rename constant to TOKENIZER_EXT does this "x = y = z = false" still work as expected in PHP5?

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1369 of 1382

In parserExampleTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserFileSourceTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserI :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserI

In parserIdInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserInheritdocInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1370 of 1382

In parserKbd :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserKbd

In parserLicenseTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserLinkInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserLinkTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserList :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserList

In parserMethodTag :

CS cleanup - change classname to PhpDocumentor_*

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1371 of 1382

CS cleanup - change package to PhpDocumentor

In parserNameTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserPage :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserParamTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserPre :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserPre

In parserPropertyReadTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserPropertyTag :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1372 of 1382

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserPropertyWriteTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserReturnTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserSamp :

CS cleanup - change package to PhpDocumentor CS cleanup - rename class to ParserSamp

In parserSeeTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserSourceInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserStaticvarTag :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1373 of 1382

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserStringWithInlineTags :

CS cleanup - change package to PhpDocumentor

In parserTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserTocInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserTutorialInlineTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserTutorialTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserUsedByTag :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1374 of 1382

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserUsesTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserVarTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In parserXMLDocBookTag::parserXMLDocBookTag() :

CS cleanup - rename to parserXmlDocBookTag for camelCase rule

In parserXMLDocBookTag :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor CS cleanup - rename to parserXmlDocBookTag for camelCase rule

In PDERROR_CLASS_PARENT_NOT_FOUND:

I think this description is a copy/paste that was never updated

In PDERROR_GLOBAL_NOT_FOUND :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1375 of 1382

I think this description is a copy/paste that was never updated

In PDERROR_MALFORMED_GLOBAL_TAG :

I think this description is a copy/paste that was never updated

In PDERROR_MULTIPLE_GLOBAL_TAGS :

I think this description is a copy/paste that was never updated

In PDERROR_NEED_WHITESPACE:

I think this description is a copy/paste that was never updated

In PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE :

I think this description is a copy/paste that was never updated

In PDERROR_UNKNOWN_COMMANDLINE:

I think this description is a copy/paste that was never updated

In phpdoc.inc :

CS cleanup - change package to PhpDocumentor

In phpdoc.php :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1376 of 1382

CS cleanup - change package to PhpDocumentor

In phpDocumentorTParser :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In phpDocumentorTParser.inc :

CS cleanup - change package to PhpDocumentor

In phpDocumentorTWordParser :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In phpDocumentorTWordParser.inc :

CS cleanup - change package to PhpDocumentor CS cleanup - PHPCS needs to ignore CVS Id length

In phpDocumentor_clone() :

CS cleanup - rename function to PhpDocumentor_clone

In phpDocumentor_ConfigFileList() :

CS cleanup - rename function to PhpDocumentor_ConfigFileList

In phpDocumentor_get_class() :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1377 of 1382

CS cleanup - rename function to PhpDocumentor_get_class

In phpDocumentor_HighlightParser :

CS cleanup - change class name to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In phpDocumentor_HighlightWordParser :

CS cleanup - change class name to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In phpDocumentor_parse_ini_file() :

CS cleanup - rename function to PhpDocumentor_parse_ini_file

In phpDocumentor_TutorialHighlightParser :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In ProceduralPages :

CS cleanup - change package to PhpDocumentor

In ProceduralPages.inc :

CS cleanup - change package to PhpDocumentor

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1378 of 1382

In Publisher :

CS cleanup - change package to PhpDocumentor

In Publisher.inc :

CS cleanup - change package to PhpDocumentor

In RecordError :

CS cleanup - change package to PhpDocumentor

In RecordWarning::RecordWarning() :

CS Cleanup - do I need to add $data to the method signature? on the error number

to sprintf based

In RecordWarning :

CS cleanup - change package to PhpDocumentor

In phpDocumentor_setup::setMemoryLimit() :

recognize "K" and "G" in memory_limit settings, rather than just "M"

In parserInlineTag::Strlen() :

CS cleanup - rename to strLen for camelCase rule

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1379 of 1382

In Publisher::subscribe() :

CS Cleanup - there's no way I can get the &$object desc under 85 chars

In TutorialHighlightParser.inc :

CS cleanup - change package to PhpDocumentor CS cleanup - PHPCS needs to ignore CVS Id length

In tutorialLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In varLink :

CS cleanup - change classname to PhpDocumentor_* CS cleanup - change package to PhpDocumentor

In WordParser :

CS cleanup - change package to PhpDocumentor

In WordParser.inc :

CS cleanup - change package to PhpDocumentor

In XMLPackagePageParser :

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1380 of 1382

CS cleanup - change package to PhpDocumentor

In XMLpackagePageParser.inc :

CS cleanup - change package to PhpDocumentor CS cleanup - PHPCS needs to ignore CVS Id length

In Package tests
In ParserClassGetSourceLocationTests.php :

research possibility of refactoring ParserClass->getSourceLocation() and ParserPage->getSourceLocation() into a common method... also, there might be more occurrences of similar getSourceLocation() methods in other classes.

In ParserPageGetSourceLocationTests.php :

research possibility of refactoring ParserClass->getSourceLocation() and ParserPage->getSourceLocation() into a common method... also, there might be more occurrences of similar getSourceLocation() methods in other classes.

In tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearize True():

Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation().

In tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingD otsAndPearizeTrue():

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1381 of 1382

Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation().

In tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAn dPearizeTrue():

Revisit this test... I think it highlights a bug in the getSourceLocation method. Compare it with the same test in bug1574047.php against similar method parserClass>getSourceLocation().

In Package XML_Beautifier
In PHPDoc_XML_Beautifier_Renderer_Plain :

automatically create <![CDATA[ ]]> sections option to specify inline tags option to specify treatment of whitespac in data sections

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Page 1382 of 1382

Index

phpDocumentor Manual phpDocumentor Tutorial

47 16

@
@see @since @return @property @package @param @static @staticvar @var @version @uses @tutorial @subpackage @todo @name @method @deprecated @example @copyright @category @access @author @final @filesource @license @link @internal @ignore @global @abstract 80 82 78 76 71 73 83 85 94 95 91 89 86 88 70 69 57 58 56 55 52 54 60 61 67 68 66 65 62 51

A
abstractLink::$name abstractLink::$fileAlias phpdoc alias _phpdoc_inc for phpdoc.inc abstractLink::$category 789 789 789

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

abstractLink linking classes parent abstractLink::$package abstractLink::$path abstractLink::addLink() sets up the link abstractLink::$type element type linked to. abstractLink::$subpackage addWarning() add a Warning addErrorDie() like addError() but exits parsing a tests linking to methods and vars aa_567059() test links to methods and vars a() test links to methods and vars a::$a a::$c addError() add an Error actions.php phpDocumentor :: docBuilder Web Interface a::b() adv_htmlentities() smart htmlentities, doesn't entity the allowed tags list

789 789 789 790 789 789 757 756 530 518 517 530 530 756 619 530 144

B
brokenlinkstovars baby::$oopsieindexing baby brokenlinkstovars::$broken bug540341 bug557861 this page will not be shown in the package list and should be bug540341::get_header2() b553607_Parser bug-shortdesc.php bug-loseprocedural.php bug-escaping.php bug-eofquotes.php bug-pageleveldocsblocks.php Im a page level docblock bug-quote_new_parser.php bqnp_testie() The tokenizer splits up strings that have inline variables bqnp_tester The tokenizer splits up strings that have inline variables bug_489398 531 531 531 531 531 532 532 530 529 526 525 524 527 528 528 528 532

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

bug_489398::$test_01 Checking the single quote var case builder.php phpDocumentor :: docBuilder Web Interface bug_556894_sub2 Subclass in different subpackage bug_556894_sub1 Subclass in same subpackage bug_772441 Beautifier.php XML/Beautifier.php Beautifier.php Source code builder.php Source code bug_556894_base::test() I'm a test method bug_556894_base::$test I'm a test var bug_489398::$test_03 Checking the no quote cause bug_489398::$test_02 checking the double quote var case bug_489398::$test_04 Checking the empty array case bug_489398::$test_05 Checking the array with data case bug_556894_base Base Class bug-541886.php Test for bug #541886 bug-defineparse.php bug-authoremail.php bug-540368.php bug-445820.php bug-445305.php blah() bug-542586.php bug-551120.php bug-550489.php bug-445298.php bug-443153.php bug-441275.php block.textformat.php Smarty plugin block.strip.php Smarty plugin bug-441278.php bug-441287.php bug-441433.php bug-441289.php bug-553137.php bug-554712.php

532 621 614 613 661 863 1311 1169 613 613 533 533 533 533 613 554 523 522 496 495 494 496 497 499 498 493 492 486 428 427 487 488 491 489 500 501

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

bug-566600.php bug-566200.php bug-562997.php This page returns a class with name "%s"'."\n", and shouldn't find class at all bug-567059.php bug-645588.php Global functions bug698356_Output() Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler to create a CHM file bug-698356.php This is a test of bug 698356. Must be parsed with -pp on to test bug-560595.php bug-560578.php page-level stuff bug-558031.php bug-557861.php bug is fixed. to test, remove this page-level docblock bug-558051.php bug-559467.php bug-559668.php bug-559494.php tests variable names with the word 'array' in them bug-904820.php This is a test of a package with a . in its name

517 516 515

518 519 521

521 514 513 503 502 504 505 507 506 365

C
Cpdf::o_destination() 341 destination object, used to specify the location for the user to jump to, presently on opening Cpdf::o_encryption() 342 encryption object. Cpdf::o_font() 342 an object to hold the font description Cpdf::o_contents() 341 the contents objects hold all of the content which appears on pages Cpdf::o_catalog() 341 define the document catalog, the overall controller for the document Cpdf::o_action() 340 an action object, used to link to URLS initially Cpdf::o_annotation() 341 an annotation object, this will add an annotation to the current page. Cpdf::o_fontDescriptor() 342 a font descriptor, needed for including additional fonts Cpdf::o_fontEncoding() 342 the font encoding Cpdf::o_pages() 344 object which is a parent to the pages in the document Cpdf::o_procset() 344 the document procset, solves some problems with printing to old PS printers

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Cpdf::o_page() 343 a page object, it also creates a contents object to hold its contents Cpdf::o_outlines() 343 define the outlines in the doc, empty for now Cpdf::o_image() 343 an image object, will be an XObject in the document, includes description and data Cpdf::o_info() 343 define the document information Cpdf::output() 340 return the pdf stream as a string returned from the function Cpdf::openObject() 340 make a loose object, the output will go into this object, until it is closed, then will revert to the current one. Cpdf::encryptInit() 337 initialize the encryption for processing a particular object Cpdf::filledEllipse() 338 draw a filled ellipse Cpdf::filledRectangle() 338 a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not Cpdf::ellipse() 337 draw an ellipse note that the part and filled ellipse are just special cases of this function Cpdf::curve() 336 draw a bezier curve based on 4 control points Cpdf::checkAllHere() 336 should be used for internal checks, not implemented as yet Cpdf::closeObject() 336 close an object Cpdf::getFirstPageId() 338 function for the user to find out what the ID is of the first page that was created during startup - useful if they wish to add something to it later. Cpdf::getFontDecender() 338 return the font decender, this will normally return a negative number Cpdf::newPage() 339 add a new page to the document Cpdf::openHere() 340 specify where the document should open when it first starts Cpdf::md5_16() 339 calculate the 16 byte version of the 128 bit md5 digest of the string Cpdf::line() 339 draw a line from one set of coordinates to another Cpdf::getFontHeight() 339 return the height in units of the current font in the given size Cpdf::getTextWidth() 339 calculate how wide a given text string will be on a page, at a given size. Cpdf::o_viewerPreferences() 344 set the viewer preferences Cpdf::partEllipse() 344 draw a part of an ellipse constructor HTML_TreeNode::HTML_TreeNode() 361 Constructor Config_File.class.php 367

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Config_File class. Config_File 371 Config file reading class constructor HTML_TreeMenu_Presentation::HTML_TreeMenu_Presentation() 359 Base constructor simply sets the menu object constructor HTML_TreeMenu_Listbox::HTML_TreeMenu_Listbox() 358 Constructor constructor HTML_TreeMenu::HTML_TreeMenu() 354 Constructor constructor HTML_TreeMenu_DHTML::HTML_TreeMenu_DHTML() 356 Constructor, takes the tree structure as Config_File::$booleanize 371 Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically. Config_File::$fix_newlines 371 Controls whether or not to fix mac or dos formatted newlines. Config_File::clear() 372 Clear loaded config data for a certain file or all files. Config_File::get() 372 Retrieves config info based on the file, section, and variable name. constructor Config_File::Config_File() 372 Constructs a new config file class. Config_File::$_config_data 372 Config_File::$overwrite 371 Controls whether variables with the same name overwrite each other. Config_File::$read_hidden 372 Controls whether hidden config sections/vars are read from the file. constructor DirNode::DirNode() 353 Cpdf::transaction() 349 a few functions which should allow the document to be treated transactionally. Cpdf::saveState() 346 this will be called at a new page to return the state to what it was on the Cpdf::selectFont() 346 if the font is not loaded then load it and make the required object Cpdf::restoreState() 345 restore a previously saved state Cpdf::reopenObject() 345 open an existing object for editing Cpdf::polygon() 345 draw a polygon, the syntax for this is similar to the GD polygon command Cpdf::rectangle() 345 draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not Cpdf::setColor() 346 sets the colour for fill operations Cpdf::setEncryption() 347 set the encryption of the document can be used to turn it on and/or set the passwords which it will have. Cpdf::stopObject() 348 stop an object from appearing on pages from this point on Cpdf::stream() 348 output the pdf code, streaming it to the browser Cpdf::setStrokeColor() 348

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

sets the colour for stroke operations Cpdf::setPreferences() 348 set the viewer preferences of the document, it is up to the browser to obey these. Cpdf::setFontFamily() 347 define font families, this is used to initialize the font families for the default fonts and for the user to add new ones for their fonts. The default bahavious can be overridden should that be desired. Cpdf::setLineStyle() 347 this sets the line drawing style. Cpdf::ARC4_init() 336 initialize the ARC4 encryption Cpdf::ARC4() 336 ARC4 encrypt a text string Cpdf::$currentColour 328 current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active Cpdf::$currentContents 328 object number of the currently active contents block Cpdf::$currentFont 328 a record of the current font Cpdf::$currentBaseFont 328 the current base font Cpdf::$checkpoint 327 store the stack for the transaction commands, each item in here is a record of the values of all the variables within the class, so that the user can rollback at will (from each 'start' command) note that this includes the objects array, so these can be large. Cpdf::$callback 327 array which forms a stack to keep track of nested callback functions Cpdf::$catalogId 327 the objectId (number within the objects array) of the document catalog Cpdf::$currentFontNum 328 the number of the current font within the font array Cpdf::$currentLineStyle 328 current style that lines are drawn in Cpdf::$destinations 329 store label->id pairs for named destinations, these will be used to replace internal links Cpdf::$encrypted 329 a flag to say if a document is to be encrypted or not Cpdf::$currentTextState 329 track if the current font is bolded or italicised Cpdf::$currentStrokeColour 329 current colour for stroke operations (lines etc.) Cpdf::$currentNode 328 Cpdf::$currentPage 329 object number of the current page Cpdf::$arc4_objnum 327 the object Id of the encryption information Cpdf::$arc4 327 the ancryption array for the document encryption is stored here Cezpdf::ezStartPageNumbers() 325 Cezpdf::ezStopPageNumbers() 325

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Cezpdf::ezStream() 325 Cezpdf::ezSetY() 324 Cezpdf::ezSetMargins() 324 Cezpdf::ezSetCmMargins() 324 Cezpdf::ezSetDy() 324 Cezpdf::ezTable() 325 Cezpdf::ezText() 325 Cpdf 326 Cpdf Cpdf::$addLooseObjects 327 array contains infomation about how the loose objects are to be added to the document Cezpdf::uline() 326 Cezpdf::loadTemplate() 326 Cezpdf::ezWhatPageNumber() 326 Cezpdf::ilink() 326 Cpdf::$encryptionKey 329 the ancryption key for the encryption of all the document content (structure is not encrypted) Cpdf::$fileIdentifier 329 the file identifier, used to uniquely identify a pdf document Cpdf::addDestination() 333 create a labelled destination within the document Cpdf::addImage() 333 add an image into the document, from a GD object Cpdf::addInfo() 333 add content to the documents info object constructor Cpdf::Cpdf() 332 class constructor Cpdf::$wordSpaceAdjust 332 used to track the last used value of the inter-word spacing, this is so that it is known when the spacing is changed. Cpdf::$stack 332 object Id storage stack Cpdf::$stateStack 332 an array which is used to save the state of the document, mainly the colours and styles Cpdf::addInternalLink() 334 add a link in the document to an internal destination (ie. within the document) Cpdf::addJpegFromFile() 334 add a JPEG image into the document, from a file Cpdf::addText() 335 add text to the document, at a specified location, size and angle on the page Cpdf::addTextWrap() 335 add text to the page, but ensure that it fits within a certain width if it does not fit then put in as much as possible, splitting at word boundaries and return the remainder. Cpdf::addPngFromFile() 335 add a PNG image into the document, from a file Cpdf::addObject() 335 after an object has been created, it wil only show if it has been added, using this function. Cpdf::addLink() 334 add a link in the document to an external URL Cpdf::addMessage() 334 used to add messages for use in debugging

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Cpdf::$procsetObjectId 332 the object Id of the procset object Cpdf::$options 332 an array containing options about the document Cpdf::$looseObjects 330 an array which contains information about the objects which are not firmly attached to pages Cpdf::$messages 330 messages are stored here during processing, these can be selected afterwards to give some useful debug information Cpdf::$infoObject 330 the objectId of the information object for the document this contains authorship, title etc. Cpdf::$fonts 330 array carrying information about the fonts that the system currently knows about Cpdf::$firstPageId 330 the objectId of the first page of the document Cpdf::$fontFamilies 330 store the information about the relationship between font families this used so that the code knows which font is the bold version of another font, etc. Cpdf::$nCallback 330 the number of callback functions in the callback array Cpdf::$nStack 331 number of elements within the object Id storage stack Cpdf::$numPages 331 number of page objects within the document Cpdf::$objects 331 this array contains all of the pdf objects, ready for final assembly Cpdf::$numObj 331 the current number of pdf objects in the document Cpdf::$numImages 331 number of images being tracked within the document Cpdf::$nStateStack 331 number of elements within the state stack Cpdf::$numFonts 331 number of fonts within the system Config_File::get_file_names() 373 Get all loaded config file names. Config_File::get_key() 373 Retrieves config info based on the key. constructor parserSeeTag::parserSeeTag() 741 sets up the see tag constructor parserTag::parserTag() 743 Set up the tag constructor parserUsedByTag::parserUsedByTag() 746 set up the usedby tag constructor parserReturnTag::parserReturnTag() 740 set up the tag constructor parserPropertyTag::parserPropertyTag() 737 set up the property tag constructor parserLinkTag::parserLinkTag() 733 sets up the link tag constructor parserNameTag::parserNameTag() 735

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

set up the name tag constructor parserUsesTag::parserUsesTag() set up the uses tag constructor RecordWarning::RecordWarning() Constructor constructor parserLinkInlineTag::parserLinkInlineTag() sets up the tag constructor parserSourceInlineTag::parserSourceInlineTag() constructor constructor parserInlineTag::parserInlineTag() sets up the tag constructor parserInheritdocInlineTag::parserInheritdocInlineTag() Does nothing, overrides parent constructor constructor parserExampleInlineTag::parserExampleInlineTag() constructor constructor parserIdInlineTag::parserIdInlineTag() constructor constructor parserLicenseTag::parserLicenseTag() set up the license tag constructor parserFileSourceTag::parserFileSourceTag() Set $source to $value, and set up path Classes::getRoots() Get a list of all root classes indexed by package. Used to generate class trees by Converter Classes::Inherit() Main processing engine for setting up class inheritance. Classes::nextFile() Prepare to parse a new file Classes::getParentClass() Find the parent class of a class in file $file Classes::getDefiniteChildren() Get all classes confirmed in parsing to be descended class $parclass in file $file Classes::getClassesInPath() Used by parserData::getClasses() to retrieve classes defined in file $path Classes::getConflicts() If a package contains two classes with the same name, this function finds that conflict Classes::processChild() This function recursively climbs up the class tree, setting inherited information like package and adds the elements to phpDocumentor_IntermediateParser. Classes::setClassParent() Find the parent class of $class, and set up structures to note this fact constructor parserAccessTag::parserAccessTag() checks $value to make sure it is private, protected or public, otherwise it's not a valid @access tag constructor parserExampleTag::parserExampleTag() Reads and parses the example file indicated constructor parserList::parserList() Constructor - create a new list constructor phpDocumentor_setup::phpDocumentor_setup()

747 771 780 783 779 778 774 776 732 730 665

665 666 665 664

664

664

666

667 726

728 722 696

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Checks PHP version, makes sure it is 4.2.0+, and chooses the constructor Io::Io() creates an array $this->phpDocOptions and sets program options in it. constructor phpDocumentor_IntermediateParser::phpDocumentor_IntermediateParser() sets up basic data structures constructor parserTocInlineTag::parserTocInlineTag() constructor constructor parserTutorialInlineTag::parserTutorialInlineTag() constructor constructor parserXMLDocBookTag::parserXMLDocBookTag() sets up the tag constructor ObjectWordParser::ObjectWordParser() ChangeLog constructor parserEntity::parserEntity() sets up the entity constructor XMLPackagePageParser::XMLPackagePageParser() Set up the wordparser constructor phpDocumentor_XML_Beautifier_Tokenizer::phpDocumentor_XML_Beautifier_Tokenizer() Initialize the $tokenpushEvent, $wordpushEvent arrays constructor ppageParser::ppageParser() set up invariant Parser variables Converter.inc Source code CHMdefaultConverter.inc Source code clone5.inc.php Source code common.inc.php Source code clone.inc.php Source code Classes.inc Source code class.phpdocpdf.php Source code config.php Source code constructor phpDocumentor_TutorialHighlightParser::phpDocumentor_TutorialHighlightParser() Initialize the $tokenpushEvent, $wordpushEvent arrays constructor phpDocumentor_HighlightParser::phpDocumentor_HighlightParser() Initialize the $tokenpushEvent, $wordpushEvent arrays constructor parserPage::parserPage() sets package to default package constructor parserDocBlock::parserDocBlock() sets package to default constLink::$type constLink class constant link classLink class link classLink::$type

669 682 785 787 919 925 952 917 911

906 909 960 1034 1204 1205 1203 1185 1113 1171

902 897 806 817 791 791 790 790

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

constructor parserConst::parserConst() constructor parserMethod::parserMethod() constructor parserDescParser::parserDescParser() sets $wp to be a ObjectWordParser constructor phpDocumentorTParser::phpDocumentorTParser() Constructor constructor Parser::Parser() Set up invariant parsing variables constructor parserVar::parserVar() constructor parserPackagePage::parserPackagePage() constructor parserTutorial::parserTutorial() Classes::getClassByPackage() Search for a class in a package Classes::getClass() Get the parserClass representation of a class from its name and file core.rm_auto.php Smarty plugin core.run_insert_handler.php Smarty plugin core.smarty_include_php.php Smarty plugin core.rmdir.php Smarty plugin core.read_cache_file.php Smarty plugin core.process_cached_inserts.php Smarty plugin core.process_compiled_include.php Smarty plugin core.write_cache_file.php Smarty plugin core.write_compiled_include.php Smarty plugin Config Config file for MLib constructor brokenlinkstovars::brokenlinkstovars() CONSTANT2 blah blah short description CONSTANT1 blah blah short description core.write_compiled_resource.php Smarty plugin core.write_file.php Smarty plugin core.load_resource_plugin.php Smarty plugin core.load_plugins.php Smarty plugin constructor Smarty::Smarty() The class constructor. constructor Smarty_Compiler::Smarty_Compiler() The class constructor. core.assemble_plugin_filepath.php

838 851 893 896 887 860 854 857 664 663 420 421 422 419 418 416 417 423 424 508 531 505 505 425 426 415 414 382 396 405

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Smarty plugin Config_File::set_path() Set the path where configuration files can be found. Config_File::load_file() Load a configuration file manually. Config_File::get_section_names() Get all section names from a loaded file. Config_File::get_var_names() Get all global or section variable names. core.assign_smarty_interface.php Smarty plugin core.create_dir_structure.php Smarty plugin core.is_secure.php Smarty plugin core.is_trusted.php Smarty plugin core.get_php_resource.php Smarty plugin core.get_microtime.php Smarty plugin core.display_debug_console.php Smarty plugin core.get_include_path.php Smarty plugin childofpriv what happens here? testing bug 564135 ClubBase Classes.inc Intermediate class parsing structure. clone.inc.php Object clone method clone5.inc.php Object clone method config.php phpDocumentor :: docBuilder Web Interface constructor testClass::testClass() ctest::btest() constructor kiddie_b587733::kiddie_b587733() common.inc.php Common information needed by all portions of the application checkForBugCondition() Crash in case of known, dangerous bug condition Classes::addPackageToFile() Mark a package as being used in a class Classes::addVar() While parsing, add a variable to the list of parsed variables Classes::addMethod() While parsing, add a method to the list of parsed methods Classes::addConst() While parsing, add a variable to the list of parsed variables Classes Intermediate class parsing structure.

374 373 373 373 406 407 412 413 411 410 408 409 533 534 631 632 634 623 552 538 548 635 652 663 663 662 662 661

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Classes::addClass() While parsing, add a class to the list of parsed classes constructor ctest::ctest() ctest::$t3 ClubBase::getPropType() getPropType gibt den Datentyp eines Objekt-Eigenschaft zurueck. ClubBase::loadClass() ClubBase::getProperty() getProperty() Gibt den Wert einer Eigenschaft zurueck ClubBase::getAllProperties() getAllProperties() Gibt die Wert aller Eigenschaften einer Klasse zurueck ClubBase::$_bPrintFlush constructor ClubBase::ClubBase() ClubBase() Der Konstruktor ClubBase::printFlush() ClubBase::printVar() ctest ctest::$t1 ClubBase::_PHPDOCUMENTOR_DEBUG() _PHPDOCUMENTOR_DEBUG() Debugmeldungen ausgeben ClubBase::_ERROR() _ERROR() Fehler registrieren und ggf. zur Debug-Ausgabe weiterleiten ClubBase::setDebug() set_debug() Debug-Level fuer die Klasse setzen ClubBase::setProperty() setProperty() Setzt den Wert einer Eigenschaft Cezpdf::ezPrvtTableDrawLines() Cezpdf::ezPrvtTableColumnHeadings() Converter::getFormattedDescMethods() Get a list of methods in child classes that override this method Converter::getFormattedDescVars() Get a list of vars in child classes that override this var Converter::getFormattedImplements() returns an array containing the class inheritance tree from the root object to the class. Converter::getFormattedConflicts() Converter::getFileSourcePath() Return the fixed path to the source-code file folder. Converter::getDefineLink() return false or a defineLink to $expr Converter::getFileSourceName() Translate the path info into a unique file name for the highlighted source code. Converter::getFormattedInheritedConsts() Return template-enabled list of inherited class constants Converter::getFormattedInheritedMethods() Return template-enabled list of inherited methods Converter::getGlobalLink() return false or a globalLink to $expr Converter::getGlobalValue() Parse a global variable's default value for class initialization. Converter::getFunctionLink() return false or a functionLink to $expr

662 538 538 535 535 535 534 534 534 536 536 538 538 537 537 536 536 324 323 169 170 170

169 169 168 169

170 171 173 173 172

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Converter::getFormattedOverrides() Get the method this method overrides, if any Converter::getFormattedInheritedVars() Return template-enabled list of inherited variables Converter::getFormattedMethodImplements() Get the method this method(s) implemented from an interface, if any Converter::getCurrentPageURL() Return the path to the current Converter::getCurrentPageLink() Converter::flushHighlightCache() Return the close text for the current token Converter::formatIndex() Called by walk() while converting. Converter::formatLeftIndex() Called by walk() while converting. Converter::exampleProgramExample() Used to convert the {@example} inline tag in a docblock. Converter::endPage() Called by walk() while converting, when the last procedural page element has been parsed. Converter::EncloseParagraph() Used to enclose a paragraph in a docblock Converter::endClass() Called by walk() while converting, when the last class element has been parsed. Converter::formatPkgIndex() Called by walk() while converting. Converter::formatTutorialTOC() Creates a table of contents for a {@toc} inline tag in a tutorial Converter::getConstLink() return false or a constLink to $expr in $class Converter::getConverterDir() Get the absolute path to the converter's base directory Converter::getClassLink() return false or a classLink to $expr Converter::getClassesOnPage() gets a list of all classes declared on a procedural page represented by Converter::generateChildClassList() returns a list of child classes Converter::generateFormattedClassTree() returns an array containing the class inheritance tree from the root object to the class. Converter::getHighlightState() Converter::getId() take abstractLink descendant and text $eltext and return a Converter::Output() do all necessary output Converter::postProcess() This version does nothing Converter::prepareDocBlock() convert the element's DocBlock for output Converter::newSmarty() Return a Smarty template object to operate with

172 171 172 168 168 164 165 165 164 164

163 163

165 165 167 168 167 167 166 166

173 173 183 184 184 183

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Converter::ListItem() 183 Used to convert the contents of <<li>> in a docblock Converter::Italicize() 182 Used to convert the contents of <<i>> in a docblock Converter::Kbdize() 182 Used to convert the contents of <<kbd>> in a docblock Converter::PreserveWhiteSpace() 184 Used to convert the contents of <<pre>> in a docblock Converter::ProgramExample() 185 Used to convert the <<code>> tag in a docblock Converter::setTargetDir() 186 Sets the output directory for generated documentation Converter::setTemplateBase() 187 Set the template directory with a different template base directory Converter::setSourcePaths() 186 Mark a file as having had source code highlighted Converter::Sampize() 186 Used to convert the contents of <<samp>> in a docblock Converter::returnLink() 185 take URL $link and text $text and return a link in the format needed for the Converter Converter::returnSee() 185 take abstractLink descendant and text $eltext and return a link Converter::highlightTutorialSource() 182 Used to allow converters to format the source code of Tutorial XML the way they'd like. Converter::highlightSource() 181 Used to allow converters to format the source code the way they'd like. Converter::getSortedClassTreeFromClass() 176 Return a tree of all classes that extend this class Converter::getSourceLink() 178 Converter::getPageLink() 176 return false or a pageLink to $expr Converter::getMethodLink() 175 return false or a methodLink to $expr in $class Converter::getIncludeValue() 174 Parse an include's file to see if it is a file documented in this project Converter::getLink() 174 The meat of the @see tag and inline {@link} tag Converter::getState() 178 Return parserStringWithInlineTags::Convert() cache state Converter::getTutorialId() 178 Return a converter-specific id to distinguish tutorials and their sections Converter::hasTutorial() 181 Converter::highlightDocBlockSource() 181 Used to allow converters to format the source code of DocBlocks the way they'd like. Converter::hasSourceCode() 181 Determine whether an element's file has generated source code, used for linking to line numbers of source. Converter::getVarLink() 180 return false or a varLink to $expr in $class Converter::getTutorialLink() 179

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

The meat of the @tutorial tag and inline {@tutorial} tag Converter::getTutorialTree() Get a tree structure representing the hierarchy of tutorials Converter::EncloseList() Used to convert the contents of <<ol>> or <<ul>> in a docblock Converter::createParentDir() Recursively creates all subdirectories that don't exist in the $dir path Converter::$package_output set to value of -po commandline Converter::$package_parents Hierarchy of packages Converter::$page name of current page being converted Converter::$package_elements alphabetical index of all elements sorted by package, subpackage, page, and class. Converter::$packagecategories Packages associated with categories Converter::$outputformat output format of this converter Converter::$package package name currently being converted Converter::$page_contents alphabetical index of all elements on a page by package/subpackage Converter::$page_data template for the procedural page currently being processed Converter::$processSpecialRoots This converter knows about the new root tree processing Converter::$quietmode controls display of progress information while parsing. Converter::$pkg_elements alphabetical index of all elements, indexed by package/subpackage Converter::$path path of current page being converted Converter::$page_elements alphabetized index of procedural pages by package Converter::$parseprivate controls processing of elements marked private with @access private Converter::$leftindex Controls which of the one-element-only indexes are generated. Converter::$highlightingSource Flag used to help converters determine whether to do special source highlighting Converter::$class set to a classname if currently parsing a class, false if not Converter::$classes All class information, organized by path, and by package Converter::$class_contents alphabetical index of all methods and vars in a class by package/subpackage Converter::$all_packages All packages encountered in parsing Converter Base class for all output converters. Converter Manual

180 163 163 150 150 151 150

149 149 149 151 151 152 152 152 152 151 152 148 148 146 146 146 145 145 128

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Converter.inc 143 Base class for all Converters Converter::$class_data 146 template for the class currently being processed Converter::$class_elements 147 alphabetized index of classes by package Converter::$function_elements 148 alphabetized index of functions by package Converter::$global_elements 148 alphabetized index of global variables by package Converter::$elements 147 alphabetical index of all elements Converter::$define_elements 147 alphabetized index of defines by package Converter::$curfile 147 full path of the current file being converted Converter::$curpage 147 current procedural page being processed Converter::$smarty_dir 153 Directory that the smarty templates are in Converter::$sort_absolutely_everything 153 This is used if the content must be passed in the order it should be read, i.e. by package, procedural then classes Converter::convertFunction() 159 Converts function for template output Converter::convertGlobal() 159 Converts global variables for template output Converter::convertInclude() 160 Converts includes for template output Converter::ConvertErrorLog() 158 Convert the phpDocumentor parsing/conversion error log Converter::convertDefine() 158 Converts defines for template output Converter::convertClass() 157 Default Class Handler Converter::convertConst() 158 Converts class constants for template output. Converter::convertMethod() 160 Converts method for template output Converter::convertPage() 160 Default Page Handler Converter::Convert_RIC() 162 Convert README/INSTALL/CHANGELOG file contents to output format Converter::copyFile() 162 Copies a file from the template directory to the target directory Converter::convertVar() 162 Converts class variables for template output. Converter::convertTutorial() 161 Default Tutorial Handler Converter::ConvertTitle() 161 Convert the title of a Tutorial docbook tag section Converter::ConvertTodoList() 161 Convert the list of all @todo tags

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Converter::Convert() 157 Convert all elements to output format Converter::cleanup() 157 Finish up parsing/cleanup directories Converter::$templateDir 154 Directory that the template is in, relative to phpDocumentor root directory Converter::$templateName 154 Name of the template, from last part of -o Converter::$targetDir 154 directory that output is sent to. -t command-line sets this. Converter::$subpackage 153 subpackage name currently being converted Converter::$sort_page_contents_by_type 153 This determines whether the $page_contents array should be sorted by element type as well as alphabetically by name Converter::$sourcePaths 153 A list of files that have had source code generated Converter::$template_options 154 Options for each template, parsed from the options.ini file in the template base directory Converter::$title 154 Converter::Br() 156 Used to convert <<br>> in a docblock Converter::checkState() 156 Compare parserStringWithInlineTags::Convert() cache state to $state Converter::Bolden() 156 Used to convert the contents of <<b>> in a docblock Converter::AttrToString() 155 Convert the attribute of a Tutorial docbook tag's attribute list Converter::$todoList 155 List of all @todo tags and a link to the element with the @todo constructor Converter::Converter() 155 Initialize Converter data structures Converter::setTemplateDir() 187 sets the template directory based on the $outputformat and $name Converter::sortPageContentsByElementType() 187 sorts $page_contents by element type as well as alphabetically CHMdefaultConverter::ProgramExample() 213 Used to convert the <<code>> tag in a docblock CHMdefaultConverter::rcNatCmp() 213 does a nat case sort on the specified second level value of the array CHMdefaultConverter::rcNatCmp1() 213 does a nat case sort on the specified second level value of the array. CHMdefaultConverter::postProcess() 213 Uses htmlspecialchars() on the input CHMdefaultConverter::Output() 212 Create the phpdoc.hhp, contents.hhc files needed by MS HTML Help Compiler to create a CHM file CHMdefaultConverter::getTutorialId() 211 CHMdefaultConverter::getVarLink() 212 CHMdefaultConverter::returnLink() 214 CHMdefaultConverter::returnSee() 214 This function takes an abstractLink descendant and returns an html link CHMdefaultConverter::TutorialExample() 215

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

CHMdefaultConverter::unmangle() 215 CHMdefaultConverter::sourceLine() 215 Return a line of highlighted source code with formatted line number CHMdefaultConverter::SmartyInit() 214 CHMdefaultConverter::setTargetDir() 214 calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied CHMdefaultConverter::setTemplateDir() 214 CHMdefaultConverter::getSourceLink() 211 CHMdefaultConverter::getSourceAnchor() 211 Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. CHMdefaultConverter::getCurrentPageLink() 208 CHMdefaultConverter::getDefineLink() 208 CHMdefaultConverter::getExampleLink() 208 CHMdefaultConverter::getConstLink() 207 CHMdefaultConverter::getClassLink() 207 CHMdefaultConverter::generateTOC() 207 CHMdefaultConverter::getCData() 207 CHMdefaultConverter::getFunctionLink() 208 CHMdefaultConverter::getGlobalLink() 209 CHMdefaultConverter::getPageName() 210 CHMdefaultConverter::getRootTree() 211 return formatted class tree for the Class Trees page CHMdefaultConverter::getPageLink() 210 CHMdefaultConverter::getMethodLink() 210 CHMdefaultConverter::getId() 209 CHMdefaultConverter::getIndexInformation() 209 Generate indexing information for given element CHMdefaultConverter::writeExample() 215 CHMdefaultConverter::writefile() 216 Write a file to disk, and add it to the $hhp_files list of files to include in the generated CHM Cezpdf::ezColumnsStop() 322 Cezpdf::ezGetCurrentPageNumber() 322 Cezpdf::ezImage() 322 Cezpdf::ezColumnsStart() 322 Cezpdf::execTemplate() 322 constructor Cezpdf::Cezpdf() 321 Cezpdf::alink() 322 Cezpdf::ezInsertMode() 322 Cezpdf::ezNewPage() 323 Cezpdf::ezPrvtGetTextWidth() 323 Cezpdf::ezPRVTpageNumberSearch() 323 Cezpdf::ezPRVTcleanUp() 323 Cezpdf::ezPRVTaddPageNumbers() 323 Cezpdf::ezOutput() 323 Cezpdf::ezProcessText() 323 Cezpdf::$y 321 Cezpdf::$ezPages 321 class.phpdocpdf.php 258 Cezpdf callback class customized for phpDocumentor constructor PDFdefaultConverter::PDFdefaultConverter() 263

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

constructor HTMLSmartyConverter::HTMLSmartyConverter() 240 constructor HTMLframesConverter::HTMLframesConverter() 221 sets $base_dir to $targetDir CHMdefaultConverter::writeNewPPage() 216 CHMdefaultConverter::writeSource() 216 constructor PDFParser::PDFParser() 273 Sets up the wordparser for this class constructor phpdocpdf::phpdocpdf() 275 Cezpdf::$ez 321 Cezpdf::$ezPageCount 321 Cezpdf 321 This class will take the basic interaction facilities of the Cpdf class and make more useful functions so that the user does not have to know all the ins and outs of pdf presentation to produce something pretty. class.ezpdf.php 320 constructor XMLDocBookConverter::XMLDocBookConverter() 285 sets $base_dir to $targetDir constructor XMLDocBookpeardoc2Converter::XMLDocBookpeardoc2Converter() 303 sets $base_dir to $targetDir CHMdefaultConverter::generatePkgElementIndexes() 207 CHMdefaultConverter::generatePkgElementIndex() 206 Generate alphabetical index of all elements by package and subpackage CHMdefaultConverter::$class_dir 195 output directory for the current class being processed CHMdefaultConverter::$current 195 contains all of the template procedural page element loop data needed for the current template CHMdefaultConverter::$currentclass 195 contains all of the template class element loop data needed for the current template CHMdefaultConverter::$base_dir 195 target directory passed on the command-line. CHMdefaultConverter 194 Generates files that MS HTML Help Worshop can use to create a MS Windows compiled help file (CHM) Converter::_tutorial_path() 193 Returns the path to this tutorial as a string CHMdefaultConverter.inc 194 CHM (Compiled Help Manual) output converter for Smarty Template. CHMdefaultConverter::$juststarted 196 controls formatting of parser informative output CHMdefaultConverter::$KLinks 196 Table of Contents entry for index.hhk CHMdefaultConverter::$page_dir 197 output directory for the current procedural page being processed CHMdefaultConverter::$ric_set 197 CHMdefaultConverter::$package_pages 196 array of converted package page names. CHMdefaultConverter::$outputformat 196 CHMdefaultConverter::$leftindex 196 indexes of elements by package that need to be generated CHMdefaultConverter::$name 196 Converter::_setHighlightCache() 193 Converter::_rmdir() 193

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Completely remove a directory and its contents Converter::TutorialExample() 189 Converter::type_adjust() 189 Called by parserReturnTag::Convert() to allow converters to change type names to desired formatting Converter::TranslateTag() 188 Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template. Converter::TranslateEntity() 188 Used to translate an XML DocBook entity like &rdquo; from a tutorial by reading the options.ini file for the template. Converter::sourceLine() 188 Return a line of highlighted source code with formatted line number Converter::startHighlight() 188 Initialize highlight caching Converter::unmangle() 189 Called by parserSourceInlineTag::stringConvert() to allow converters to format the source code the way they'd like. Converter::vardump_tree() 190 Debugging function for dumping $tutorial_tree Converter::writeFile() 192 Writes a file to target dir Converter::writeSource() 192 Write out the formatted source code for a php file Converter::writeExample() 191 Write out the formatted source code for an example php file Converter::walk_everything() 191 walk over elements by package rather than page Converter::Varize() 190 Used to convert the contents of <<var>> in a docblock Converter::walk() 190 called by phpDocumentor_IntermediateParser::Convert() to traverse the array of pages and their elements, converting them to the output format CHMdefaultConverter::$sort_page_contents_by_type 197 CHMdefaultConverter wants elements sorted by type as well as alphabetically CHMdefaultConverter::$wrote 197 CHMdefaultConverter::endClass() 203 Writes out the template file of $class_data and unsets the template to save memory CHMdefaultConverter::endPage() 203 Writes out the template file of $page_data and unsets the template to save memory CHMdefaultConverter::formatIndex() 203 CHMdefaultConverter uses this function to format template index.html and packages.html CHMdefaultConverter::copyMediaRecursively() 203 CHMdefaultConverter::Convert_RIC() 203 Convert README/INSTALL/CHANGELOG file contents to output format CHMdefaultConverter::convertTutorial() 202 CHMdefaultConverter::convertVar() 202 Converts class variables for template output CHMdefaultConverter::formatLeftIndex() 204 Generate indexes for li_package.html and classtree output files CHMdefaultConverter::formatPkgIndex() 204 CHMdefaultConverter chooses to format both package indexes and the complete index here

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

CHMdefaultConverter::generateFormattedInterfaceTrees() 206 returns a template-enabled array of interface inheritance trees CHMdefaultConverter::generateKLinks() 206 Get the table of contents for index.hhk CHMdefaultConverter::generateFormattedClassTrees() 205 returns a template-enabled array of class trees CHMdefaultConverter::generateFormattedClassTree() 205 returns an array containing the class inheritance tree from the root object to the class CHMdefaultConverter::formatTutorialTOC() 205 Use the template tutorial_toc.tpl to generate a table of contents for HTML CHMdefaultConverter::generateElementIndex() 205 Generate alphabetical index of all elements CHMdefaultConverter::ConvertTodoList() 202 CHMdefaultConverter::convertPage() 202 converts procedural pages for template output CHMdefaultConverter::addTOC() 199 CHMdefaultConverter::convertClass() 199 Converts class for template output CHMdefaultConverter::addSourceTOC() 198 CHMdefaultConverter::addKLink() 198 Add an item to the index.hhk file constructor CHMdefaultConverter::CHMdefaultConverter() 197 sets $base_dir to $targetDir CHMdefaultConverter::addHHP() 198 CHMdefaultConverter::convertConst() 199 Converts class constants for template output CHMdefaultConverter::convertDefine() 200 Converts defines for template output CHMdefaultConverter::convertMethod() 201 Converts class methods for template output CHMdefaultConverter::convertPackagepage() 201 Converts package page and sets its package as used in $package_pages CHMdefaultConverter::convertInclude() 201 Converts include elements for template output CHMdefaultConverter::convertGlobal() 201 Converts global variables for template output CHMdefaultConverter::ConvertErrorLog() 200 Create errors.html template file output CHMdefaultConverter::convertFunction() 200 Converts function for template output Converter Default Template Variables 117

D
defineLink define link DocBlockTags.inc All abstract representations of DocBlock tags are defined by the classes in this file defineLink::$type DescHTML.inc Source code 791 725

791 1253

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

DocBlockTags.inc 1259 Source code DescHTML.inc 715 All abstract representations of html tags in DocBlocks are handled by the classes in this file decideOnOrOff() 652 Fuzzy logic to interpret the boolean args' intent DirNode::$path 353 full path to this node DirNode 353 Directory Node DIR_SEP 368 DIR_SEP isn't used anymore, but third party apps might dummy() 527 Im a dummy function currently you need at least one function in your procedural page for this to work debug() 635 Debugging output Documentable PHP Elements 36

E
ErrorTracker::addErrorReturn() add a new error to the $errors array and returns the error string ErrorTracker::addWarning() add a new warning to the $warnings array ErrorTracker::addError() add a new error to the $errors array ErrorTracker::$warnings array of RecordWarnings ErrorTracker::$linenum ErrorTracker::handleEvent() This function subscribes to two events in the Parser in order to keep track of line number information and file name. ErrorTracker::returnErrors() Get sorted array of all non-fatal errors in parsing/conversion EventStack.inc Source code Errors.inc Source code ErrorTracker::returnWarnings() Get sorted array of all warnings in parsing/conversion ErrorTracker::returnLastWarning() Get the warning message of the last warning ErrorTracker::returnLastError() Get the error message of the last error ErrorTracker::$lastwarning index in $warnings of last warning triggered ErrorTracker::$lasterror index in $errors of last error triggered EventStack::$num The number of events in the stack 768 768 767 767 767 768

769 1210 1277 769 769 769 767 767 668

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

EventStack::$stack The stack EventStack An event Stack EventStack.inc An Event Stack for inter-program communication, particularly for parsing ezStartPageNumbers() tests function param bug EventStack::getEvent() Get the current event EventStack::popEvent() Pop an event from the stack ErrorTracker::$curfile ErrorTracker::$errors array of RecordErrors ErrorTracker contains all the errors/warnings Errors.inc Error handling for phpDocumentor EventStack::pushEvent() Push an event onto the stack element I'm an element

668 667 638 516 668 668 767 767 766 750 668 365

F
func3() few few::$pfh ****===really fancy===**** func2() func1() func 1 function.popup_init.php Smarty plugin function.var_dump.php func() functionincomment functionincomment::process() FAQ file_dialog.php Source code find_phpdoc.php Source code find_phpdoc.php Utility file to locate phpDocumentor for a non-PEAR installation functionLink::$type fancy_debug() Returns a formatted var_dump for debugging purposes. functionLink function link function.popup.php 500 500 455 456 497 539 539 954 1164 1356 914 792 636 792 454 500 538 539

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Smarty plugin function.math.php Smarty plugin function.cycle.php Smarty plugin function.debug.php Smarty plugin function.eval.php Smarty plugin function.counter.php Smarty plugin function.config_load.php Smarty plugin function.assign.php Smarty plugin function.assign_debug_info.php Smarty plugin function.fetch.php Smarty plugin function.html_checkboxes.php Smarty plugin function.html_select_time.php Smarty plugin function.html_table.php Smarty plugin function.mailto.php Smarty plugin function.html_select_date.php Smarty plugin function.html_radios.php Smarty plugin function.html_image.php Smarty plugin function.html_options.php Smarty plugin file_dialog.php phpDocumentor :: docBuilder Web Interface

453 433 435 436 432 431 429 430 437 438 448 449 451 446 444 440 442 351

G
global $phpDocumentor_errors 750 global $_phpDocumentor_setting 652 $_phpDocumentor_setting is either the value from the web interface, or is set up by Io::parseArgv() global $phpDocumentor_error_descrip 754 Error messages for phpDocumentor parser errors global $phpDocumentor_warning_descrip 756 Error messages for phpDocumentor parser warnings globalLink::$type 793 globalLink 792 global variable link global $phpDocumentor_DefaultPackageName 652

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

default package name, set using -dn --defaultpackagename global $phpDocumentor_DefaultCategoryName default package name, set using -dn --defaultcategoryname globalSetVar() Set a variable, used by the template engine but available to all scripts globalGetVar() Get a variable's value global $bqnp_tester The tokenizer splits up strings that have inline variables getDir() global $interface $interface is either 'web' or is not set at all get_include_path() global $_MLIB_GLOBAL_DSN Global DSN to be used by classes

651 519 519 528 625 651 640 508

H
HTMLSmartyConverter::getPageContents() HTMLSmartyConverter::getMethodLink() HTMLSmartyConverter::getPageLeft() HTMLSmartyConverter::getPageLink() HTMLSmartyConverter::getPageName() HTMLSmartyConverter::getIndexInformation() Generate indexing information for given element HTMLSmartyConverter::getId() HTMLSmartyConverter::getDefineLink() HTMLSmartyConverter::getExampleLink() HTMLSmartyConverter::getFunctionLink() HTMLSmartyConverter::getGlobalLink() HTMLSmartyConverter::getRootTree() return formatted class tree for the Class Trees page HTMLSmartyConverter::getSourceAnchor() Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. HTMLSmartyConverter::postProcess() Uses htmlspecialchars() on the input HTMLSmartyConverter::Output() This function is not used by HTMLdefaultConverter, but is required by Converter HTMLSmartyConverter::ProgramExample() Used to convert the <<code>> tag in a docblock HTMLSmartyConverter::rcNatCmp() does a nat case sort on the specified second level value of the array HTMLSmartyConverter::rcNatCmp1() does a nat case sort on the specified second level value of the array. HTMLSmartyConverter::makeLeft() HTMLSmartyConverter::getVarLink() HTMLSmartyConverter::getSourceLink() HTMLSmartyConverter::getTutorialId() HTMLSmartyConverter::getTutorialList() HTMLSmartyConverter::getTutorialTree() HTMLSmartyConverter::getCurrentPageLink() 252 251 252 252 252 251 251 250 250 250 250 252 253

254 254 254 254 255 254 253 253 253 253 253 249

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTMLSmartyConverter::getConstLink() 249 HTMLSmartyConverter::endClass() 245 Writes out the template file of $class_data and unsets the template to save memory HTMLSmartyConverter::copyMediaRecursively() 245 HTMLSmartyConverter::endPage() 245 Writes out the template file of $page_data and unsets the template to save memory HTMLSmartyConverter::formatIndex() 245 HTMLdefaultConverter uses this function to format template index.html and packages.html HTMLSmartyConverter::formatLeftIndex() 246 Generate indexes for li_package.html and classtree output files HTMLSmartyConverter::Convert_RIC() 245 Convert README/INSTALL/CHANGELOG file contents to output format HTMLSmartyConverter::convertVar() 244 Converts class variables for template output HTMLSmartyConverter::convertPackagepage() 243 Converts package page and sets its package as used in $package_pages HTMLSmartyConverter::convertPage() 244 converts procedural pages for template output HTMLSmartyConverter::ConvertTodoList() 244 HTMLSmartyConverter::convertTutorial() 244 HTMLSmartyConverter::formatPkgIndex() 246 HTMLdefaultConverter chooses to format both package indexes and the complete index here HTMLSmartyConverter::formatTutorialTOC() 247 Use the template tutorial_toc.tpl to generate a table of contents for HTML HTMLSmartyConverter::getCData() 249 HTMLSmartyConverter::getClassContents() 249 HTMLSmartyConverter::getClassLeft() 249 HTMLSmartyConverter::getClassLink() 249 HTMLSmartyConverter::generatePkgElementIndexes() 248 HTMLSmartyConverter::generatePkgElementIndex() 248 Generate alphabetical index of all elements by package and subpackage HTMLSmartyConverter::generateElementIndex() 247 Generate alphabetical index of all elements HTMLSmartyConverter::generateFormattedClassTree() 247 returns an array containing the class inheritance tree from the root object to the class HTMLSmartyConverter::generateFormattedClassTrees() 247 returns a template-enabled array of class trees HTMLSmartyConverter::generateFormattedInterfaceTrees() 248 returns a template-enabled array of interface inheritance trees HTMLSmartyConverter::returnLink() 255 HTMLSmartyConverter::returnSee() 255 This function takes an abstractLink descendant and returns an html link HTML_TreeNode::$events 360 Javascript event handlers; HTML_TreeNode::$ensureVisible 360 Should this node be made visible? HTML_TreeNode::$expanded 360 Whether this node is expanded or not HTML_TreeNode::$icon 360 The icon for this node. HTML_TreeNode::$isDynamic 361 Whether this node is dynamic or not

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTML_TreeNode::$cssClass 360 The css class for this node HTML_TreeNode 360 HTML_TreeNode class HTML_TreeMenu_Listbox::toHTML() 358 Returns the HTML generated HTML_TreeMenu_Presentation 358 HTML_TreeMenu_Presentation class HTML_TreeMenu_Presentation::$menu 359 The TreeMenu structure HTML_TreeMenu_Presentation::printMenu() 359 Prints the HTML generated by the toHTML() method. HTML_TreeNode::$items 361 Indexed array of subnodes HTML_TreeNode::$link 361 The link for this node. HighlightParser.inc 868 Source Code Highlighting HighlightParserTests.php 655 HTMLframesConverter.inc 1060 Source code HTMLSmartyConverter.inc 1086 Source code HighlightParser.inc 1323 Source code htmlArraySelect() 625 Returns a select box based on an key,value array where selected is based on key HighlightParserGetInlineTagsTests.php 555 Unit Tests for the HighlightParser->getInlineTags() method HTML_TreeNode::$parent 361 The parent node. Null if top level HTML_TreeNode::$text 361 The text for this node. HTML_TreeNode::addItem() 362 Adds a new subnode to this node. HTML_TreeNode::setOption() 362 Allows setting of various parameters after the initial HTML_TreeMenu_Listbox::$promoText 358 The text that is displayed in the first option HTML_TreeMenu_Listbox::$linkTarget 358 Target for the links generated HTMLSmartyConverter::writeRIC() 257 HTMLSmartyConverter::writeNewPPage() 257 HTMLSmartyConverter::writeSource() 257 HTML_TreeMenu 354 HTML_TreeMenu Class HTML_TreeMenu::$items 354 Indexed array of subnodes HTMLSmartyConverter::writeExample() 257 HTMLSmartyConverter::unmangle() 256 HTMLSmartyConverter::setTargetDir() 255 calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTMLSmartyConverter::SmartyInit() 256 HTMLSmartyConverter::sourceLine() 256 Return a line of highlighted source code with formatted line number HTMLSmartyConverter::TutorialExample() 256 HTML_TreeMenu::addItem() 354 This function adds an item to the the tree. HTML_TreeMenu_DHTML 355 HTML_TreeMenu_DHTML class HTML_TreeMenu_DHTML::toHTML() 357 Returns the HTML for the menu. This method can be used instead of printMenu() to use the menu system with a template system. HTML_TreeMenu_Listbox 357 HTML_TreeMenu_Listbox class HTML_TreeMenu_Listbox::$indentChar 357 The character used for indentation HTML_TreeMenu_Listbox::$indentNum 357 How many of the indent chars to use HTML_TreeMenu_DHTML::$userPersistence 356 Whether to use clientside persistence or not HTML_TreeMenu_DHTML::$noTopLevelImages 356 Whether to skip first level branch images HTML_TreeMenu_DHTML::$defaultClass 355 The default CSS class for the nodes HTML_TreeMenu_DHTML::$images 355 Path to the images HTML_TreeMenu_DHTML::$isDynamic 356 Dynamic status of the treemenu. If true (default) this has no effect. If false it will override all dynamic status vars and set the menu to be fully expanded an non-dynamic. HTML_TreeMenu_DHTML::$linkTarget 356 Target for the links generated HTMLSmartyConverter::convertMethod() 243 Converts class methods for template output HTMLSmartyConverter::convertInclude() 243 Converts include elements for template output HTMLframesConverter::endPage() 226 Writes out the template file of $page_data and unsets the template to save memory HTMLframesConverter::endClass() 226 Writes out the template file of $class_data and unsets the template to save memory HTMLframesConverter::formatIndex() 226 HTMLdefaultConverter uses this function to format template index.html and packages.html HTMLframesConverter::formatLeftIndex() 227 Generate indexes for li_package.html and classtree output files HTMLframesConverter::formatPkgIndex() 227 HTMLdefaultConverter chooses to format both package indexes and the complete index here HTMLframesConverter::copyMediaRecursively() 226 HTMLframesConverter::Convert_RIC() 225 Convert README/INSTALL/CHANGELOG file contents to output format HTMLframesConverter::convertPage() 224 converts procedural pages for template output HTMLframesConverter::ConvertTodoList() 225

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTMLframesConverter::convertTutorial() 225 HTMLframesConverter::convertVar() 225 Converts class variables for template output HTMLframesConverter::formatTutorialTOC() 227 Use the template tutorial_toc.tpl to generate a table of contents for HTML HTMLframesConverter::generateElementIndex() 228 Generate alphabetical index of all elements HTMLframesConverter::getConstLink() 230 HTMLframesConverter::getClassLink() 229 HTMLframesConverter::getCurrentPageLink() 230 HTMLframesConverter::getDefineLink() 230 HTMLframesConverter::getExampleLink() 231 HTMLframesConverter::getCData() 229 HTMLframesConverter::generatePkgElementIndexes() 229 HTMLframesConverter::generateFormattedClassTree() 228 returns an array containing the class inheritance tree from the root object to the class HTMLframesConverter::generateFormattedClassTrees() 228 returns a template-enabled array of class trees HTMLframesConverter::generateFormattedInterfaceTrees() 228 returns a template-enabled array of interface inheritance trees HTMLframesConverter::generatePkgElementIndex() 229 Generate alphabetical index of all elements by package and subpackage HTMLframesConverter::convertPackagepage() 224 Converts package page and sets its package as used in $package_pages HTMLframesConverter::convertMethod() 224 Converts class methods for template output HTMLframesConverter::$leftindex 220 indexes of elements by package that need to be generated HTMLframesConverter::$juststarted 220 controls formatting of parser informative output HTMLframesConverter::$name 220 HTMLframesConverter::$outputformat 220 HTMLframesConverter::$package_pages 220 array of converted package page names. HTMLframesConverter::$currentclass 219 contains all of the template class element loop data needed for the current template HTMLframesConverter::$current 219 contains all of the template procedural page element loop data needed for the current template HTMLSmartyConverter.inc 218 HTML output converter for Smarty Template. HTMLframesConverter 219 HTML output converter. HTMLframesConverter::$base_dir 219 target directory passed on the command-line. HTMLframesConverter::$class_dir 219 output directory for the current class being processed HTMLframesConverter::$page_dir 220 output directory for the current procedural page being processed HTMLframesConverter::$processSpecialRoots 221 This converter knows about the new root tree processing HTMLframesConverter::ConvertErrorLog() 223 Create errors.html template file output

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTMLframesConverter::convertFunction() 223 Converts function for template output HTMLframesConverter::convertGlobal() 223 Converts global variables for template output HTMLframesConverter::convertInclude() 224 Converts include elements for template output HTMLframesConverter::convertDefine() 222 Converts defines for template output HTMLframesConverter::convertConst() 222 Converts class variables for template output HTMLframesConverter::$ric_set 221 HTMLframesConverter::$sort_page_contents_by_type 221 Smarty Converter wants elements sorted by type as well as alphabetically HTMLframesConverter::$wrote 221 HTMLframesConverter::convertClass() 222 Converts class for template output HTMLframesConverter::getFunctionLink() 231 HTMLframesConverter::getGlobalLink() 231 HTMLSmartyConverter::$juststarted 239 controls formatting of parser informative output HTMLSmartyConverter::$currentclass 239 contains all of the template class element loop data needed for the current template HTMLSmartyConverter::$leftindex 239 indexes of elements by package that need to be generated HTMLSmartyConverter::$name 239 HTMLSmartyConverter::$outputformat 239 HTMLSmartyConverter::$current 239 contains all of the template procedural page element loop data needed for the current template HTMLSmartyConverter::$class_dir 239 output directory for the current class being processed HTMLframesConverter::writeNewPPage() 237 HTMLframesConverter::writeSource() 238 HTMLSmartyConverter 238 HTML output converter. HTMLSmartyConverter::$base_dir 238 target directory passed on the command-line. HTMLSmartyConverter::$package_pages 239 array of converted package page names. HTMLSmartyConverter::$page_dir 240 output directory for the current procedural page being processed HTMLSmartyConverter::convertDefine() 241 Converts defines for template output HTMLSmartyConverter::ConvertErrorLog() 242 Create errors.html template file output HTMLSmartyConverter::convertFunction() 242 Converts function for template output HTMLSmartyConverter::convertGlobal() 242 Converts global variables for template output HTMLSmartyConverter::convertConst() 241 Converts class variables for template output HTMLSmartyConverter::convertClass() 241 Converts class for template output

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

HTMLSmartyConverter::$processSpecialRoots 240 This converter knows about the new root tree processing HTMLSmartyConverter::$ric_set 240 HTMLSmartyConverter::$sort_page_contents_by_type 240 Smarty Converter wants elements sorted by type as well as alphabetically HTMLSmartyConverter::$wrote 240 HTMLframesConverter::writeExample() 237 HTMLframesConverter::unmangle() 237 HTMLframesConverter::getSourceLink() 234 HTMLframesConverter::getSourceAnchor() 233 Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. HTMLframesConverter::getTutorialId() 234 HTMLframesConverter::getTutorialTree() 234 HTMLframesConverter::getVarLink() 234 HTMLframesConverter::getRootTree() 233 return formatted class tree for the Class Trees page HTMLframesConverter::getPageName() 233 HTMLframesConverter::getId() 232 HTMLframesConverter::getIndexInformation() 232 Generate indexing information for given element HTMLframesConverter::getMethodLink() 232 HTMLframesConverter::getPageLink() 232 HTMLframesConverter::makeLeft() 235 HTMLframesConverter::Output() 235 This function is not used by HTMLdefaultConverter, but is required by Converter HTMLframesConverter::setTargetDir() 236 calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied HTMLframesConverter::SmartyInit() 236 HTMLframesConverter::sourceLine() 237 Return a line of highlighted source code with formatted line number HTMLframesConverter::TutorialExample() 237 HTMLframesConverter::returnSee() 236 This function takes an abstractLink descendant and returns an html link HTMLframesConverter::returnLink() 236 HTMLframesConverter::postProcess() 235 Uses htmlspecialchars() on the input HTMLframesConverter::ProgramExample() 235 Used to convert the <<code>> tag in a docblock HTMLframesConverter::rcNatCmp() 235 does a nat case sort on the specified second level value of the array HTMLframesConverter::rcNatCmp1() 235 does a nat case sort on the specified second level value of the array. HTMLframesConverter.inc 217 HTML original framed output converter, modified to use Smarty Template.

I
Io::$ignore Format: array(array(regexp-ready string to search for whole path, Io 669 668

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Class to handle file and user io opperations IntermediateParserTests.php Io::$phpDocOptions Holds all the options that are avaible to the cmd line interface Io::$valid_booleans A specific array of values that boolean-based arguments can understand, aided by the decideOnOrOff() helper method. Io::dirList() Io::checkIgnore() Tell whether to ignore a file or a directory allows * and ? wildcards Ioinc_sortfiles() Sorting functions for the file list Ioinc_mystrucsort() Sorting functions for the file list iParser iNewRender::$vars array of class variables by package, subpackage and class iNewRender::$targetDir used to set the output directory iparserElement IntermediateParserAddPrivatePageTests.php Unit Tests for the IntermediateParser->addPrivatePage() method Io.inc File and input handling routines IntermediateParser.inc The phpDocumentor_IntermediateParser Class Io::displayHelpMsg() create the help message for display on the command-line Io::getAllFiles() Take a filename with wildcards and return all files that match the InlineTags.inc All abstract representations of inline tags are in this file Io::_setupIgnore() Construct the $ignore array Io::removeNonMatches() Removes files from the $dir array that do not match the search string in INSTALL IntermediateParser.inc Source code InlineTags.inc Source code Io.inc Source code Io::readPhpFile() Reads a file and returns it as a string Does basic error checking Io::parseArgv() Parses $_SERVER['argv'] and creates a setup array Io::getDirTree() Io::getBase() Retrieve common directory (case-insensitive in windows) Io::getReadmeInstallChangelog()

656 669 669

670 670

641 640 547 547 546 547 557 640 639 670 670 773 674 673 952 1212 1292 1238 673

673 671 671 672

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Io::getRegExpableSearchString() 672 Converts $s into a string that can be used with preg_match Io::isIncludeable() 672 calls http://www.php.net/file_exists for each value in include_path, Io::getTutorials() 672 Retrieve tutorial subdirectories and their contents from the list of iNewRender::$quietMode 546 set in phpdoc.inc to the value of the quitemode commandline option. iNewRender::$private_class 546 this variable is used to prevent parsing of private elements if $parsePrivate is false. iHTMLConverter::Convert() 541 iHTMLConverter 540 Base class for all output converters. iConverter::walk() 540 iiparserBase 541 iiparserBase::$type 542 always base iiparserBase::getType() 542 iiparserBase::$value 542 set to different things by its descendants iConverter 539 Base class for all output converters. inline {@tutorial} 111 inline {@internal}} 101 inline {@id} 99 inline {@inheritdoc} 102 inline {@link} 104 inline {@toc} 109 inline {@source} 106 iiparserBase::getValue() 542 iiparserBase::setValue() 542 iNewRender::$methods 545 array of methods by package, subpackage and class iNewRender::$links 544 the workhorse of linking. iNewRender::$event_handlers 544 the functions which handle output from the Parser iNewRender::$packageoutput 545 array of packages to parser and output documentation for, if not all packages should be documented iNewRender::$pages 545 iNewRender::$pkg_elements 546 iNewRender::$parsePrivate 546 set in phpdoc.inc to the value of the parserprivate commandline option. iNewRender::$elements 544 iNewRender::$data 544 data contains parsed structures for the current page being parsed iNewRender::$classpackage 542 set to the name of the package of the current class being parsed iNewRender 542 iNewRender::$classpackages 543 used in Converter::getClassPackage() to inherit package from parent classes. iNewRender::$classsubpackage 543

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

set to the name of the subpackage of the current class being parsed iNewRender::$class_children An array of extended classes by package and parent class Format: array(packagename => array(parentclass => array(childclassname1, childclassname2,... iNewRender::$classtree a tree of class inheritance by name. inline {@example}

543

543 97

K
kiddie_b587733 548

L
LinkClasses.inc Source code LinkClasses.inc Linking to element documentation is performed by the classes in this file. 1306 788

M
MLIB_LOG_FILE Default log file MLIB_SYSLOG_PRIORITY Syslog priority MLIB_TEMPLATE_PATH Template path MLIB_USE_SYSLOG Use syslog MLIB_INCLUDE_PATH MLib include path MLIB_GLOBAL_DEBUG Global debugging modifier.truncate.php Smarty plugin modifier.upper.php Smarty plugin modifier.wordwrap.php Smarty plugin mama metoo methodLink::$class methodLink::$type methodLink::addLink() sets up the link methodLink method link multipl::func() 509 509 509 510 509 508 478 479 480 548 548 793 793 793 793 549

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

metoo::$mine multipl multipl::$manyvars modifier.strip_tags.php Smarty plugin modifier.strip.php Smarty plugin modifier.date_format.php Smarty plugin modifier.debug_print_var.php Smarty plugin modifier.default.php Smarty plugin modifier.count_words.php Smarty plugin modifier.count_sentences.php Smarty plugin modifier.cat.php Smarty plugin modifier.count_characters.php Smarty plugin modifier.count_paragraphs.php Smarty plugin modifier.escape.php Smarty plugin modifier.htmlentities.php modifier.replace.php Smarty plugin modifier.spacify.php Smarty plugin modifier.string_format.php Smarty plugin modifier.regex_replace.php Smarty plugin modifier.rawurlencode.php modifier.indent.php Smarty plugin modifier.lower.php Smarty plugin modifier.nl2br.php Smarty plugin modifier.capitalize.php Smarty plugin

548 549 549 477 476 463 464 465 462 461 458 459 460 466 467 473 474 475 472 471 468 469 470 457

N
new_phpdoc.php Source code new_phpdoc.php Advanced Web Interface to phpDocumentor notseen 1183 629 554

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

O
ObjectWordParser::nextIsObjectOrNonNL() Determine if the next word is an inline tag ObjectWordParser::setup() Set the word parser to go. ObjectWordParser::getWord() ObjectWordParser Like WordParser but designed to handle an array with strings and one() one outputfilter.trimwhitespace.php Smarty plugin 925 925 925 924 504 514 481

P
parserClass::getInheritedMethods() parserClass::getInheritedConsts() parserClass::getInheritedVars() parserClass::getLink() quick way to link to this element parserClass::getMethodNames() parserClass::getMethod() parserClass::getImplements() parserClass::getExtends() parserClass::addTutorial() parserClass::addImplements() parserClass::getChildClassList() returns a list of all child classes of this class parserClass::getConflicts() Returns all classes in other packages that have the same name as this class parserClass::getConsts() parserClass::getConstNames() parserClass::getMethods() parserClass::getModifiers() Get the PHP5+ modifiers for this class parserClass::hasVar() parserClass::hasMethod() parserClass::isInterface() parserClass::setAccessModifiers() Use this method to set access modifiers for a class parserClass::setInterface() Use this method to set the type of class to be an interface parserClass::setExtends() parserClass::hasConst() parserClass::getVars() parserClass::getParentClassTree() parserClass::getParent() retrieve object that represents the parent class parserClass::getSourceLocation() parserClass::getTutorial() Get the associated tutorial for this class, if any 832 832 832 833 833 833 832 832 831 830 831 831 832 831 833 833 835 835 835 836 836 836 835 835 834 833 834 834

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserClass::getVarNames() 835 parserClass::getVar() 835 parserClass::$_implements 830 parserClass::$type 830 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserDocBlock::replaceInheritDoc() 824 Wrapper for parserDesc::replaceInheritDoc() parserDocBlock::postProcess() 824 Parse out any html tags from doc comments, and make them into parserDocBlock::resetParams() 825 parserDocBlock::setDesc() 825 parserDocBlock::setExplicitCategory() 825 Used if this docblock has a @category tag. parserDocBlock::setEndLineNumber() 825 Sets the ending line number for the DocBlock parserDocBlock::overridePackage() 824 set the element's package to the passed values. Used in phpDocumentor_IntermediateParser to align package of parserDocBlock::listTags() 824 parserDocBlock::getSDesc() 823 parserDocBlock::getLineNumber() 823 Retrieve starting line number parserDocBlock::getType() 823 parserDocBlock::hasInheritDoc() 823 Wrapper for parserDesc::hasInheritDoc() parserDocBlock::listProperties() 824 parserDocBlock::listParams() 824 parserDocBlock::setExplicitPackage() 825 Used if this docblock has a @package tag. parserDocBlock::setLineNumber() 825 Sets the starting line number for the DocBlock parserClass::$extends 829 parserClass::$curfile 829 parserClass::$ignore 829 Used to determine whether a class should be ignored or not. Helps maintain integrity of parsing parserClass::$parent 829 Format: array(file, parent) where parent class is found or false if no parent parserClass::$tutorial 830 parserClass::$sourceLocation 830 parserClass 828 ParserElements.inc 828 Parser Elements, all classes representing documentable elements parserDocBlock::setSource() 826 Passes to parserStringWithInlineTags::setSource() parserDocBlock::setShortDesc() 826 Set the short description of the DocBlock parserDocBlock::updateGlobals() 826 replaces nameless global variables in the $funcglobals array with their names parserDocBlock::updateModifiers() 827 parserDocBlock::updateStatics() 827 replaces nameless static variables in the $statics array with their names

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserDocBlock::updateParams() 827 replaces nameless parameters in the $params array with their names parserClass::setModifiers() 836 Set the PHP5+ modifiers for this class parserClass::setParent() 836 parserFunction::addStatics() 845 Add all "static $var, $var2 = 6" declarations to this function parserFunction::addSource() 845 Set the source code. Always array in PHP 4.3.0+ parserFunction::getConflicts() 845 Returns all functions in other packages that have the same name as this function parserFunction::getFunctionCall() 846 Get a human-friendly description of the function call parserFunction::getLink() 846 quick way to link to this element parserFunction::getIntricateFunctionCall() 846 Like getFunctionCall(), but has no English or pre-determined formatting. parserFunction::addParam() 845 parserFunction::addGlobals() 844 Add all "global $var, $var2" declarations to this function parserFunction::$params 843 parameters parsed from function definition. parserFunction::$globals 843 global declarations parsed from function definition parserFunction::$returnsreference 844 Function returns a reference to an element, instead of a value parserFunction::$source 844 parserFunction::$type 844 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserFunction::$statics 844 static variable declarations parsed from function definition parserFunction::getParam() 846 parserFunction::getReturnsReference() 846 parserGlobal::getConflicts() 847 Returns all global variables in other packages that have the same name as this global variable parserGlobal::$type 847 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserGlobal::getDataType() 848 Retrieve converter-specific representation of the data type parserGlobal::getLink() 848 quick way to link to this element parserInclude 849 parserGlobal::setDataType() 848 Sets the name of the global variable's type parserGlobal::$datatype 847 Name of the global's data type parserGlobal 847 parserFunction::hasSource() 846 Determine whether the source code has been requested via {@source} parserFunction::getSource() 846

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserFunction::listGlobals() 847 parserFunction::listParams() 847 parserFunction::setReturnsReference() 847 sets $returnsreference to true parserFunction::listStatics() 847 parserFunction 843 parserElement::setPath() 842 parserDefine::getConflicts() 839 Returns all defines in other packages that have the same name as this define parserDefine::$type 839 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserDefine::getLink() 839 quick way to link to this element parserElement 840 all elements except parserPackagePage descend from this abstract class parserElement::$docblock 840 parserElement::$conflicts 840 parserDefine 839 parserConst::getLink() 838 quick way to link to this element parserClass::setSourceLocation() 837 parserClass::setParentNoClass() 837 parserConst 837 parserConst::$class 837 parserConst::getClass() 838 Retrieve the class name parserConst::$type 838 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserElement::$endlinenumber 841 line number on file where this element stops parserElement::$file 841 location of this element (filename) parserElement::setDocBlock() 842 parserElement::getPath() 841 parserElement::setEndLineNumber() 842 Sets the ending line number of elements parserElement::setFile() 842 parserElement::setName() 842 parserElement::setLineNumber() 842 Set starting line number parserElement::getPackage() 841 parserElement::getName() 841 parserElement::$name 841 name of this element, or include type if element is a parserInclude parserElement::$linenumber 841 Line number in the source on which this element appears parserElement::$path 841 full path location of this element (filename) parserElement::getEndLineNumber() 841 parserElement::getLineNumber() 841 parserElement::getFile() 841

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserDocBlock::getKeyword() parserDocBlock::getExplicitPackage() If the DocBlock has a @package tag, then this returns true parserPage::$parserVersion parserPage::$packageOutput Used to limit output, contains contents of --packageoutput commandline. parserPage::$path parserPage::$source Tokenized source code of the file parserPage::$subpackage parserPage::$sourceLocation relative source location parserPage::$package parserPage::$origName original phpdoc-safe name (only letters, numbers and _) parserPage::$category parserPage Contains information about a PHP file, used to group procedural elements together. parserPage::$file filename.ext (no path) parserPage::$id not implemented in this version, will be used to link xml output pages parserPage::$name phpdoc-safe name (only letters, numbers and _) parserPage::$modDate not implemented yet parserPage::$type Type is used by many functions to skip the hassle of if parserPage::getFile() gets the file name parserPage::setPath() sets the path to the file parserPage::setPackageOutput() loads the package output array parserPage::setSource() Sets the source code of the file for highlighting. parserPage::setSourceLocation() sets the source location parserStringWithInlineTags::$type Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah'... parserStringWithInlineTags Used to represent strings that contain inline tags, so that they can be properly parsed at link time parserPage::setName() sets the name parserPage::setFile() Sets the name to display in documentation (can be an alias set with @name) parserPage::getPackageOutput() gets the package output array parserPage::getName() gets the name

823 823 805 804 805 805 805 805 804 804 804 803

804 804 804 804 805 806 808 807 808 808 809

809

807 807 806 806

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserPage::getParseData() Not implemented in this version parserPage::getPath() gets the path parserPage::getType() gets the tag type parserPage::getSourceLocation() gets the source location parserData::setParent() sets the parent parserData::setDocBlock() sets the docblock parserData::$clean used by phpDocumentor_IntermediateParser::handleDocBlock() to parserData::$classelements array of parsed class elements parserData::$docblock DocBlock (parserDocBlock) for this page, or false if not set parserData::$elements array of parsed elements parserData::$parent parserPage element that is this parserData's parent, or false if not set. parserData::$links array of links descended from abstractLink parserData Contains an in-memory representation of all documentable elements (parserPage, parserFunction, parserDefine, parserInclude, parserClass, parserMethod, parserVar) and their DocBlocks (parserDocBlock). parserBase::setValue() sets the given value parserBase Base class for all elements ParserData.inc Parser Data Structures parserBase::$type Type is used by many functions to skip the hassle of if parserBase::$value set to different things by its descendants parserBase::getValue() gets the value parserBase::getType() gets the type parserData::$privateclasselements array of parsed class elements with @access private parserData::$privateelements array of parsed elements with @access private parserData::getTutorial() If this file has a tutorial associated with it, returns a link to the tutorial. parserData::getName() Get the output-safe filename (. changed to _)

806 806 807 806 803 803 799 799 800 800 800

800 799

798 797 797 798 798 798 798 800 800 802

802

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserData::hasClasses() Does this package have classes? parserData::hasExplicitDocBlock() If the page-level DocBlock was present in the source, returns true parserData::isClean() checks if the element is "cleaned" already parserData::hasInterfaces() Does this package have interfaces? parserData::getLink() returns a link parserData::getClasses() returns a list of all classes declared in a file parserData::$type Type is used by many functions to skip the hassle of if parserData::$tutorial parserData::addElement() add a new element to the tracking array parserData::addLink() adds a link parserData::explicitDocBlock() Tells this page that its DocBlock was not implicit parserData::addTutorial() adds a tutorial parser parserStringWithInlineTags::$value array of strings and parserInlineTags parserStringWithInlineTags::add() equivalent to the . operator ($a = $b . $c) parserDocBlock::addKeyword() parserDocBlock::addFuncGlobal() adds a function declaration of @global to the $funcglobals array parserDocBlock::addLink() creates a parserLinkTag and adds it to the $tags array parserDocBlock::addName() Adds a @name tag to the tag list parserDocBlock::addParam() parserDocBlock::addPackage() parserDocBlock::addFileSource() Adds a new @filesource tag to the DocBlock parserDocBlock::addExample() adds an @example tag parserDocBlock::$subpackagedescrip description of subpackage parsed from @package tag parserDocBlock::$subpackage parserDocBlock::$tags array of parserTags parserDocBlock::$unknown_tags array of unrecognized parserTags parserDocBlock::addAccess() add an @access tag to the tags array parserDocBlock::$var This is either a parserVarTag or false if no var tag is present parserDocBlock::addProperty() Adds a @property(-read or -write) or @method magic tag to the DocBlock

802 802 802 802 802 802 801 801 801 801 802 801 809 809 819 818 819 819 820 819 818 818 817 817 817 817 818 817 820

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserDocBlock::addReturn() 820 creates a parserReturnTag and adds it to the $tags array parserDocBlock::changeParam() 822 parserDocBlock::changeGlobal() 822 parserDocBlock::changeStatic() 823 parserDocBlock::getDesc() 823 parserDocBlock::getExplicitCategory() 823 If the DocBlock has a @category tag, then this returns true parserDocBlock::getEndLineNumber() 823 Retrieve ending line number parserDocBlock::cantSource() 822 Tells the DocBlock it can't have a @filesource tag parserDocBlock::canSource() 822 Tells the DocBlock it can have a @filesource tag parserDocBlock::addStaticVar() 821 parserDocBlock::addSee() 820 creates a parserLinkTag and adds it to the $tags array parserDocBlock::addTag() 821 Used to insert DocBlock Template tags into a docblock parserDocBlock::addUnknownTag() 821 adds an unknown tag to the $unknown_tags array for use by custom converters parserDocBlock::addVar() 822 creates a parserVarTag and adds it to the $tags array parserDocBlock::addUses() 821 Add a @uses tag to the DocBlock parserDocBlock::$statics 817 array of static variable data. parserDocBlock::$sdesc 817 parserDesc::hasInheritDoc() 813 parserDesc::add() 813 parserDesc::hasSource() 813 parserDesc::replaceInheritDoc() 813 replaces {@inheritdoc} with the contents of the parent DocBlock parserDocBlock::$category 814 parserDocBlock 814 Represents a docblock and its components, $desc, $sdesc, $tags, and also $params for functions parserDesc::$type 813 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserDesc 812 represents a short or long description in a DocBlock (parserDocBlock) parserStringWithInlineTags::getString() 810 return the string unconverted (all inline tags are taken out - this should only be used in pre-parsing to see if any other text is in the string) parserStringWithInlineTags::Convert() 809 Use to convert the string to a real string with all inline tags parsed and linked parserStringWithInlineTags::hasInlineTag() 810 Determine whether the string contains any inline tags parserStringWithInlineTags::setSource() 810 Pass source code to any {@source} tags contained within the string

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

for later conversion. ParserDocBlock.inc 812 DocBlock Parser Classes parserStringWithInlineTags::trimmedStrlen() 811 equivalent to trim(strlen($string)) parserDocBlock::$desc 814 parserDocBlock::$endlinenumber 814 Line number in the source on which this docblock ends parserDocBlock::$params 816 array of param data. parserDocBlock::$packagedescrip 816 description of package parsed from @package tag parserDocBlock::$processed_desc 816 parserDocBlock::$processed_sdesc 816 parserDocBlock::$return 816 This is either a parserReturnTag or false if no return tag is present parserDocBlock::$properties 816 array of parserPropertyTag, parserPropertyReadTag, parserPropertyWriteTag, parserMethodTag magic tags parserDocBlock::$package 815 parserDocBlock::$linenumber 815 Line number in the source on which this docblock begins parserDocBlock::$explicitpackage 815 fix for bug 591396 parserDocBlock::$explicitcategory 814 fix for bug 708559 parserDocBlock::$funcglobals 815 array of global variable data. parserDocBlock::$hasaccess 815 whether this DocBlock has an @access tag parserDocBlock::$hasname 815 whether this DocBlock has a @name tag parserInclude::$type 849 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserMethod 849 parserDescParser::getParserEventName() 894 parserDescParser::doSimpleList() 893 Return a simple list, if found parserDescParser::parse() 894 Parse a long or short description for tags parserDescParser::setupStates() 894 setup the parser tokens, and the pushEvent/popEvent arrays phpDocumentorTParser::$eventHandlers 896 phpDocumentorTParser 895 Tokenizer-based parser for PHP source code parserDescParser 893 Parses a DocBlock description to retrieve abstract representations of Parser::varTagHandler() 892 handles @var Parser::propertyTagHandler() 891 Handles @property(-read or -write) and @method magic tag Parser::parse() 890

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Parse a new file Parser::returnTagHandler() 891 handles @return Parser::setupStates() 891 setup the parser tokens, and the pushEvent/popEvent arrays Parser::usesTagHandler() 892 handles @uses Parser::staticvarTagHandler() 892 handles @staticvar phpDocumentorTParser::$inlineTagHandlers 896 phpDocumentorTParser::$source_location 896 relative path of the parsed file from the base parse directory phpDocumentor_HighlightWordParser::getWord() 900 Retrieve the next token phpDocumentor_HighlightWordParser::backupPos() 900 back the word parser to the previous token as defined by $last_token phpDocumentor_HighlightWordParser::nextToken() 900 Retrieve the position of the next token that will be parsed in the internal token array phpDocumentor_HighlightWordParser::setup() 900 Initialize the parser object phpDocumentor_peardoc2_XML_Beautifier::formatFile() 901 format a file or URL phpDocumentor_peardoc2_XML_Beautifier 901 This is just like XML_Beautifier, but uses phpDocumentor_XML_Beautifier_Tokenizer phpDocumentor_HighlightWordParser 899 Retrieve tokens from an array of tokens organized by line numbers phpDocumentor_HighlightParser::setupStates() 899 Initialize all parser state variables phpDocumentor_HighlightParser 897 Highlights source code using parse() phpDocumentorTParser::parse() 896 Parse a new file phpDocumentor_HighlightParser::configWordParser() 897 Give the word parser necessary data to begin a new parse phpDocumentor_HighlightParser::newLineNum() 898 wraps the current line (via the converter) and resets it to empty phpDocumentor_HighlightParser::setLineNum() 899 Start the parsing at a certain line number phpDocumentor_HighlightParser::parse() 898 Parse a new file Parser::paramTagHandler() 890 handles @param Parser::packageTagHandler() 890 handles @package PHPDOCUMENTOR_PDP_EVENT_ATTRIBUTES 885 when tag attributes name="value" are found phpDocumentorTParser.inc 881 tokenizer extension-based parser for PHP code PHPDOCUMENTOR_PDP_EVENT_CDATA 885 when <![CDATA[ ]]> is found PHPDOCUMENTOR_PDP_EVENT_ENTITY 886 when tag attributes name="value" are found

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PHPDOCUMENTOR_PDP_EVENT_TAG 886 when a DocBook <tag> is found PHPDOCUMENTOR_PDP_EVENT_PROGRAMLISTING 886 when <programlisting> is found PHPDOCUMENTOR_EVENT_VAR 876 Class Variable published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_TUTORIAL 876 Tutorial published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_NEWLINENUM 875 use to inform ErrorTracker of the next line number being parsed PHPDOCUMENTOR_EVENT_NEWFILE 875 use to inform ErrorTracker of a new file being parsed PHPDOCUMENTOR_EVENT_NEWSTATE 875 use to inform IntermediateParser of a new element being parsed PHPDOCUMENTOR_EVENT_PACKAGEPAGE 875 Package-level page published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_README_INSTALL_CHANGELOG 875 Contents of README/INSTALL/CHANGELOG files published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_PAGE 875 New File (page) published to IntermediateParser with this event PHPDOCUMENTOR_PDP_STATE_ATTRIBUTES 886 when tag attributes name="value" are found PHPDOCUMENTOR_PDP_STATE_CDATA 886 when <![CDATA[ ]]> is found Parser::endTag() 888 Called to clean up at the end of parsing a @tag in a docblock Parser::defaultTagHandler() 888 Handles all standard tags that only have a description Parser::exampleTagHandler() 888 handles @example Parser::getParserEventName() 889 Debugging function, takes an event number and attempts to return its name Parser::invalidTagHandler() 889 Handles tags like '@filesource' that only work in PHP 4.3.0+ Parser::globalTagHandler() 889 handles @global Parser::configWordParser() 888 tell the parser's WordParser $wp to set up tokens to parse words by. Parser::checkEventPush() 887 this function checks whether parameter $word is a token for pushing a new event onto the Event Stack. PHPDOCUMENTOR_PDP_STATE_PROGRAMLISTING 886 when <programlisting> is found PHPDOCUMENTOR_PDP_STATE_ENTITY 886 when tag attributes name="value" are found PHPDOCUMENTOR_PDP_STATE_TAG 886 when a DocBook <tag> is found Parser 886 PHP Parser for PHP 4.2.3Parser::checkEventPop() 887 this function checks whether parameter $word is a token for popping the current event off of the Event Stack.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Parser::categoryTagHandler() handles @category phpDocumentor_peardoc2_XML_Beautifier::formatString() format an XML string phpDocumentor_TutorialHighlightParser Highlights source code using parse() parserXMLDocBookTag::hasTitle() Determine whether the docbook element has a title parserXMLDocBookTag::getTOC() Retrieve either the table of contents index, or the location that the TOC will go parserXMLDocBookTag::setId() If the id attribute is present, this method will set its id parserXMLDocBookTag::setTitle() Set the title of a DocBook tag section. parserXMLDocBookTag::startCData() Begin a new CData section parserXMLDocBookTag::setTOC() sets the TOC value parserXMLDocBookTag::getTitle() Retrieve Converter-specific formatting of the title of this element parserXMLDocBookTag::getSubsection() Retrieve the contents of a subsection parserXMLDocBookTag::addAttribute() Add an xml tag attribute name="value" pair parserXMLDocBookTag::add() Add contents to this tag. parserXMLDocBookTag::addCData() add a word to CData parserXMLDocBookTag::Convert() calls the output conversion parserXMLDocBookTag::getId() Return converter-specific formatting of ID. parserXMLDocBookTag::endCData() Adds $_cdata to $value phpDocumentorTWordParser.inc tokenizer extension-based lexer for PHP code phpDocumentorTWordParser Like WordParser, but expects an array of tokens from the tokenizer instead of a string. phpDocumentorTWordParser::tokenEquals() Utility function to determine whether two tokens from the tokenizer are equal phpDocumentorTWordParser::setup() Uses http://www.php.net/token_get_all to tokenize the source code. ParserPDF.inc Source code PDFdefaultConverter.inc Source code phpdoc.inc Source code phpdoc.php Source code phpDocumentorTWordParser::getWord()

887 901 902 921 921

921 922 922 922 921 921 919 919 920 920 920 920 923 925

928 928 1118 1126 1252 1184 928

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Retrieve a token for the phpDocumentorTParser phpDocumentorTWordParser::getSource() 928 loads up next set of source code phpDocumentorTWordParser::addSource() 926 Generate source token arrays organized by line number phpDocumentorTWordParser::addFileSource() 926 Wrapper for addSource() used to retrieve the entire source code organized by line number in setup() phpDocumentorTWordParser::backupPos() 926 backs the parser up to the previous position phpDocumentorTWordParser::concatTokens() 927 Utility function to convert a series of tokens into a string phpDocumentorTWordParser::getFileSource() 927 gets the source code tokens phpDocumentorTWordParser::findGlobal() 927 Tell the phpDocumentorTWordParser to return the entire global variable if it is found. parserXMLDocBookTag::$name 919 Name of the tag parserXMLDocBookTag::$attributes 918 Attributes from the XML tag phpDocumentor_XML_Beautifier_Tokenizer::$eventHandlers 906 phpDocumentor_XML_Beautifier_Tokenizer 905 Highlights source code using parse() phpDocumentor_XML_Beautifier_Tokenizer::checkEventPop() 906 this function checks whether parameter $word is a token for popping the current event off of the Event Stack. phpDocumentor_XML_Beautifier_Tokenizer::checkEventPush() 906 this function checks whether parameter $word is a token for pushing a new event onto the Event Stack. phpDocumentor_XML_Beautifier_Tokenizer::getParserEventName() 907 phpDocumentor_XML_Beautifier_Tokenizer::configWordParser() 907 tell the parser's WordParser $wp to set up tokens to parse words by. phpDocumentor_TutorialHighlightParser::setupStates() 905 Initialize all parser state variables phpDocumentor_TutorialHighlightParser::setLineNum() 905 Start the parsing at a certain line number phpDocumentor_TutorialHighlightParser::checkEventPush() 903 This function checks whether parameter $word is a token for pushing a new event onto the Event Stack. phpDocumentor_TutorialHighlightParser::checkEventPop() 902 This function checks whether parameter $word is a token for popping the current event off of the Event Stack. phpDocumentor_TutorialHighlightParser::configWordParser() 903 Tell the parser's WordParser $wp to set up tokens to parse words by. phpDocumentor_TutorialHighlightParser::getParserEventName() 904 searches for a parser event name based on its number phpDocumentor_TutorialHighlightParser::parse() 904 Parse a new file phpDocumentor_TutorialHighlightParser::newLineNum() 904 advances output to a new line phpDocumentor_XML_Beautifier_Tokenizer::incdataHandler() 907 Handler for real character data

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

phpDocumentor_XML_Beautifier_Tokenizer::parseString() 907 Parse a new file parserCData 916 Represents <![CDATA[ ]]> sections. PackagePageElements.inc 915 Data structures used in parsing XML DocBook-based tutorials parserCData::Convert() 916 calls the output conversion parserEntity 917 a standard entity like &rdquo; parserXMLDocBookTag 918 a standard XML DocBook Tag parserEntity::Convert() 917 calls the output conversion ppageParser::setupStates() 910 set up invariant Parser variables ppageParser::parse() 910 Parse a new file ppageParser 909 Global package page parser phpDocumentor_XML_Beautifier_Tokenizer::setupStates() 908 Initialize all parser state variables ppageParser::$package 909 ppageParser::$subpackage 909 ppageParser::handleInlineDockeyword() 910 handler for INLINE_DOCKEYWORD. ppageParser::defaultHandler() 909 Handles all non-inline tags PHPDOCUMENTOR_EVENT_MESSAGE 875 PHPDOCUMENTOR_EVENT_INCLUDE 875 Include (include/require/include_once/include_once) published to IntermediateParser with this event parserTutorial::isChildOf() 858 Determine if this parserTutorial object is a child of another parserTutorial::getTitle() 858 Retrieve the title of the tutorial, or of any subsection parserTutorial::setNext() 858 parserTutorial::setParent() 859 parserVar 860 parserTutorial::setPrev() 859 parserTutorial::getPrev() 858 Retrieve converter-specific link to the previous tutorial's documentation parserTutorial::getParent() 857 Retrieve converter-specific link to the parent tutorial's documentation parserTutorial::$type 856 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserTutorial::$tutorial_type 856 Either cls, pkg, or proc parserTutorial::$_xml 856 parserTutorial::Convert() 857 parserTutorial::getNext() 857 Retrieve converter-specific link to the next tutorial's documentation

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserTutorial::getLink() 857 Get a link to this tutorial, or to any subsection of this tutorial parserVar::$class 860 parserVar::$type 860 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' PHPDOC_XMLTOKEN_EVENT_ATTRIBUTE 864 used when a <tag attr="attribute"> is found PHPDOC_BEAUTIFIER_CDATA 864 do not remove, needed in plain renderer PHPDOC_XMLTOKEN_EVENT_CDATA 865 used when a <! is found PHPDOC_XMLTOKEN_EVENT_CLOSETAG 865 used when a close </tag> is found PHPDOC_XMLTOKEN_EVENT_DEF 865 used when a <! is found PHPDOC_XMLTOKEN_EVENT_COMMENT 865 used when a <!-- comment --> is found parserVar::setModifiers() 861 Return name of the class that contains this method parserVar::getOverridingVarsForClass() 861 parserVar::getClass() 860 Retrieve the class name parserVar::$_modifiers 860 parserVar::getLink() 861 quick way to link to this element parserVar::getModifiers() 861 Return a list of access modifiers (static/private/etc.) parserVar::getOverridingVars() 861 parserVar::getOverrides() 861 parserTutorial::$prev 856 link to the previous tutorial in a document series, or false if none parserTutorial::$path 856 path to the tutorial page parserMethod::getIntricateFunctionCall() 851 parserMethod::getImplements() 851 parserMethod::getLink() 852 quick way to link to this element parserMethod::getModifiers() 852 Return name of the class that contains this method parserMethod::getOverridingMethods() 852 parserMethod::getOverrides() 852 parserMethod::getFunctionCall() 851 adds "constructor " to start of function call if $isConstructor is true parserMethod::getClass() 851 Return name of the class that contains this method parserMethod::$isConstructor 850 parserMethod::$class 850 parserMethod::$isDestructor 850 parserMethod::$type 850 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' parserMethod::addParam() 851

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserMethod::$_modifiers 851 parserMethod::getOverridingMethodsForClass() 852 parserMethod::setConstructor() 853 Use this method to tell the parser that this method is the class constructor parserTutorial::$linked_element 855 The documentable element this tutorial is linked to parserTutorial::$ini 854 output from tutorialname.ext.ini parserTutorial::$name 855 filename minus extension of this tutorial (used for @tutorial tag) parserTutorial::$next 855 link to the next tutorial in a document series, or false if none parserTutorial::$parent 855 link to the parent tutorial in a document series, or false if none parserTutorial::$package 855 parserTutorial::$children 854 links to the child tutorials, or false if none parserTutorial 854 parserMethod::setModifiers() 853 Return name of the class that contains this method parserMethod::setDestructor() 853 Use this method to tell the parser that this method is the class constructor parserPackagePage 853 parserPackagePage::$package 853 parserPackagePage::Convert() 854 parserPackagePage::$type 853 Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah' PHPDOC_XMLTOKEN_EVENT_DOUBLEQUOTE 865 used when a <!-- comment --> is found PHPDOC_XMLTOKEN_EVENT_ENTITY 865 used when an &entity; is found PARSER_EVENT_NOEVENTS 873 used for the beginning of parsing, before first < ? php encountered PARSER_EVENT_METHOD_LOGICBLOCK 873 used by the HighlightParser only, when a method body is parsed PARSER_EVENT_OUTPHP 873 used when a ? > (with no space) is encountered in parsing PARSER_EVENT_PHPCODE 873 used when php code processor instruction (< ? php) is encountered in parsing PARSER_EVENT_QUOTE_VAR 873 used by the HighlightParser only, when {$var} is encountered in a string PARSER_EVENT_QUOTE 873 used when double quotation mark (") encountered in parsing PARSER_EVENT_METHOD 873 used by the HighlightParser only, when a method starts PARSER_EVENT_LOGICBLOCK 873 { encountered in parsing a function or php code PARSER_EVENT_IMPLEMENTS 872 used when a class implements interfaces PARSER_EVENT_GLOBAL_VALUE 872 used when parsing the default value in a global variable declaration PARSER_EVENT_INCLUDE 872

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

used when an include/require/include_once/include_once statement is encountered in parsing PARSER_EVENT_INCLUDE_PARAMS 872 used when an opening parenthesis of an include/require/include_once/include_once statement is encountered in parsing PARSER_EVENT_INLINE_DOCKEYWORD 873 used when an inline {@tag} is encountered in parsing a DocBlock PARSER_EVENT_INCLUDE_PARAMS_PARENTHESIS 873 used when an inner ( ) is encountered while parsing an include/require/include_once/include_once statement PARSER_EVENT_SINGLEQUOTE 873 used when a single quote (') is encountered in parsing PARSER_EVENT_STATIC_VAR 873 used when parsing a "static $var1, $var2;" declaration in a function PHPDOCUMENTOR_EVENT_DOCBLOCK_TEMPLATE 874 used when a docblock template is encountered in the source PHPDOCUMENTOR_EVENT_DOCBLOCK 874 DocBlock published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_END_DOCBLOCK_TEMPLATE 874 used when a docblock template is encountered in the source PHPDOCUMENTOR_EVENT_END_PAGE 874 used to inform phpDocumentor_IntermediateParser that the current file has been completely parsed. PHPDOCUMENTOR_EVENT_GLOBAL 875 used when a global variable definition is encountered in the source PHPDOCUMENTOR_EVENT_FUNCTION 875 Function published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_DEFINE 874 Constant (define) published to IntermediateParser with this event PHPDOCUMENTOR_EVENT_CONST 874 Class Constant published to IntermediateParser with this event PARSER_EVENT_TAGS 874 used when parsing the @tag block of a docblock PARSER_EVENT_STATIC_VAR_VALUE 874 used when parsing the value in a "static $var1 = x" declaration in a function PARSER_EVENT_VAR 874 used when a var statement is encountered in parsing a class definition PARSER_EVENT_VAR_ARRAY 874 used when a variable value is an array PHPDOCUMENTOR_EVENT_CLASS 874 Class published to IntermediateParser with this event PARSER_EVENT_VAR_ARRAY_COMMENT 874 used when a comment is found in a variable array value PARSER_EVENT_FUNC_GLOBAL 872 used when parsing a "global $var1, $var2;" declaration in a function PARSER_EVENT_FUNCTION_PARAM_VAR 872 used when a $param is encountered in a function definition PARSER_EVENT_CLASS 870 used when a class definition is encountered in parsing PARSER_EVENT_ARRAY 870 used when an array definition is encountered in parsing PARSER_EVENT_CLASS_CONSTANT 871 used when a class implements interfaces

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PARSER_EVENT_CLASS_MEMBER 871 used by the HighlightParser only, when ->var or ->function() is encountered in a method PARSER_EVENT_COMMENTBLOCK 871 used when long comment /x x/ where x is an asterisk is encountered in parsing PARSER_EVENT_COMMENT 871 used when short comment // is encountered in parsing PARSER_EVENT_ACCESS_MODIFIER 870 used when parsing an access modifier Parser.inc 870 Base parser for all parsers PHPDOC_XMLTOKEN_EVENT_NOEVENTS 865 starting state PHPDOC_XMLTOKEN_EVENT_IN_CDATA 865 used when a <![CDATA[ section is found PHPDOC_XMLTOKEN_EVENT_OPENTAG 865 used when an open <tag> is found PHPDOC_XMLTOKEN_EVENT_PI 865 used when a processor instruction is found PHPDOC_XMLTOKEN_EVENT_XML 865 used when a <?xml is found PHPDOC_XMLTOKEN_EVENT_SINGLEQUOTE 865 used when a <!-- comment --> is found PARSER_EVENT_DEFINE 871 used when a define statement is encountered in parsing PARSER_EVENT_DEFINE_GLOBAL 871 used when parsing a global variable declaration PARSER_EVENT_END_STATEMENT 872 PARSER_EVENT_END_DOCBLOCK_TEMPLATE 872 used when encountering a /**#@-* / comment (no space) marking the end of using a docblock template PARSER_EVENT_EOFQUOTE 872 used when a <<< is encountered in parsing PARSER_EVENT_ESCAPE 872 used when a backslash is encountered in parsing a string or other escapable entity PARSER_EVENT_FUNCTION_PARAMS 872 used when a function statement opening parenthesis is encountered in parsing PARSER_EVENT_FUNCTION 872 used when a function definition is encountered in parsing PARSER_EVENT_DOCKEYWORD_EMAIL 872 used when a <email@address> is encountered in parsing an @author tag PARSER_EVENT_DOCKEYWORD 871 used when a @tag is encountered in DocBlock parsing PARSER_EVENT_DEFINE_PARAMS_PARENTHESIS 871 used when a define statement's opening parenthesis is encountered in parsing PARSER_EVENT_DEFINE_PARAMS 871 used when a define statement opening parenthesis is encountered in parsing PARSER_EVENT_DESC 871 used when parsing the desc part of a docblock PARSER_EVENT_DOCBLOCK 871 used when a DocBlock is encountered in parsing PARSER_EVENT_DOCBLOCK_TEMPLATE 871 used when encountering a /**#@+ comment marking a new docblock template

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

pageLink::$type pageLink procedural page link phpDocumentorTParserTests.php phpDocumentorSetupTests.php PHPUnit_MAIN_METHOD phpDocumentor_IntermediateParser The phpDocumentor_IntermediateParser Class phpDocumentor_IntermediateParser::$classes used to keep track of inheritance at the smartest level possible for a phpDocumentor_IntermediateParser::$all_packages list of all packages encountered while documenting. Used in automatic linking. ParserPageTests.php ParserClassTests.php PHPDOCUMENTOR_PDP_STATE_VAR when <<var>> is found in a desc PHPDOCUMENTOR_PDP_STATE_SIMLIST when a simple list is found in a desc phpdoc.inc startup file ProceduralPages.inc Intermediate procedural page parsing structure. phpDocumentor_out() Print parse information if quiet setting is off Publisher.inc a class for handling the publishing of data phpDocumentor_IntermediateParser::$converters an array of template names indexed by converter name phpDocumentor_IntermediateParser::$cur_class Name of the class currently being parsed. phpDocumentor_IntermediateParser::$pages phpDocumentor_IntermediateParser::$package_parents Keeps track of packages of classes that have parent classes in another package. Used in automatic linking. phpDocumentor_IntermediateParser::$parsePrivate set in Setup.inc.php to the value of the parseprivate commandline phpDocumentor_IntermediateParser::$privatepages Put away a page that has been @ignored or @access private if !$parsePrivate phpDocumentor_IntermediateParser::$proceduralpages used to keep track of all elements in a procedural page. Handles name phpDocumentor_IntermediateParser::$private_class this variable is used to prevent parsing of elements with an @ignore tag phpDocumentor_IntermediateParser::$package_pages array of parsed package pages phpDocumentor_IntermediateParser::$packageoutput array of packages to parser and output documentation for, if not all packages should be documented phpDocumentor_IntermediateParser::$db_template phpDocumentor_IntermediateParser::$data $data contains parsed structures for the current page being parsed phpDocumentor_IntermediateParser::$event_handlers

794 794 660 659 660 674 675 675

658 657 647 647 648 649 654 650 675 676 679 678

679 679

680 679 678 678

676 676 676

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

the functions which handle output from the Parser phpDocumentor_IntermediateParser::$last phpDocumentor_IntermediateParser::$packagecategories Used to determine the category for tutorials. phpDocumentor_IntermediateParser::$lasttype type of the last parser Element handled PHPDOCUMENTOR_PDP_STATE_SAMP when <<samp>> is found in a desc PHPDOCUMENTOR_PDP_STATE_PRE when <<pre>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_ESCAPE_CODE when << /code>> is found in a <<code>><</code>> section PHPDOCUMENTOR_PDP_EVENT_ESCAPE when the << potential escape for tags is found in a desc PHPDOCUMENTOR_PDP_EVENT_ESCAPE_PRE when << /pre>> is found in a <<pre>><</pre>> section PHPDOCUMENTOR_PDP_EVENT_I when <<i>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_LIST when <<ul>>/<<ol>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_KBD when <<kbd>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_DOUBLECR when \n\n is found in a desc PHPDOCUMENTOR_PDP_EVENT_CODE when <<code>> is found in a desc PHPDOCUMENTOR_WEBSITE PHPDOCUMENTOR_VER PHPDOCUMENTOR_WINDOWS ParserDescCleanup.inc All of the functions to clean up and handle the long description of a DocBlock are in this file. PHPDOCUMENTOR_PDP_EVENT_BR when <<br>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_B when <<b>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_P when <<p>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_PRE when <<pre>> is found in a desc PHPDOCUMENTOR_PDP_STATE_ESCAPE_PRE when << /pre>> is found in a <<pre>><</pre>> section PHPDOCUMENTOR_PDP_STATE_ESCAPE_CODE when << /code>> is found in a <<code>><</code>> section PHPDOCUMENTOR_PDP_STATE_I when <<i>> is found in a desc PHPDOCUMENTOR_PDP_STATE_KBD when <<kbd>> is found in a desc PHPDOCUMENTOR_PDP_STATE_P when <<p>> is found in a desc PHPDOCUMENTOR_PDP_STATE_LIST when <<ul>>/<<ol>> is found in a desc PHPDOCUMENTOR_PDP_STATE_ESCAPE

677 677 677 647 647 644 644 644 644 645 644 644 644 637 637 637 643

644 643 645 645 646 646 646 646 646 646 646

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

when the << potential escape for tags is found in a desc PHPDOCUMENTOR_PDP_STATE_DOUBLECR 646 when \n\n is found in a desc PHPDOCUMENTOR_PDP_EVENT_SIMLIST 645 when a simple list is found in a desc PHPDOCUMENTOR_PDP_EVENT_SAMP 645 when <<samp>> is found in a desc PHPDOCUMENTOR_PDP_EVENT_VAR 645 when <<var>> is found in a desc PHPDOCUMENTOR_PDP_STATE_B 645 when <<b>> is found in a desc PHPDOCUMENTOR_PDP_STATE_CODE 645 when <<code>> is found in a desc PHPDOCUMENTOR_PDP_STATE_BR 645 when <<br>> is found in a desc phpDocumentor_IntermediateParser::$quietMode 680 set in Setup.inc.php to the value of the quitemode commandline option. phpDocumentor_IntermediateParser::$ric 680 Stores parsed CHANGELOG/INSTALL/README files phpDocumentor_setup::$ignoresymlinks 695 contents of --ignoresymlinks commandline phpDocumentor_setup::$hidden 695 contents of --hidden commandline phpDocumentor_setup::$ignore_files 695 contents of --ignore commandline phpDocumentor_setup::$packages 695 Packages to create documentation for phpDocumentor_setup::$render 695 Used to organize output from the Parser before Conversion phpDocumentor_setup::$parse 695 The main parser phpDocumentor_setup::$files 694 contents of --filename commandline phpDocumentor_setup::$dirs 694 contents of --directory commandline phpDocumentor_IntermediateParser::setTargetDir() 692 Sets the output directory phpDocumentor_IntermediateParser::setQuietMode() 692 set parsing information output mode (quiet or verbose) phpDocumentor_IntermediateParser::setTemplateBase() 693 Sets the template base directory phpDocumentor_IntermediateParser::setUndocumentedElementWarningsMode() 693 show warnings for undocumented elements phpDocumentor_setup 694 phpDocumentor_IntermediateParser::_guessPackage() 693 Guess the package/subpackage based on subdirectory if the --pear option phpDocumentor_setup::$setup 696 Used to parse command-line options phpDocumentor_setup::checkIgnoreTag() 696 phpDocumentor_setup::setMemoryLimit() 697 Allow a memory_limit setting in phpDocumentor.ini to override php.ini or default memory limit

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

phpDocumentor_setup::setJavadocDesc() 697 phpDocumentor_setup::setPackageOutput() 698 phpDocumentor_setup::setParsePrivate() 698 phpDocumentor_setup::setTargetDir() 698 phpDocumentor_setup::setQuietMode() 698 phpDocumentor_setup::setIgnore() 697 phpDocumentor_setup::setFilesToParse() 697 phpDocumentor_setup::parseHiddenFiles() 696 phpDocumentor_setup::createDocs() 696 phpDocumentor_setup::parseIni() 696 Parse configuration file phpDocumentor.ini phpDocumentor_setup::readCommandLineSettings() 697 Get phpDocumentor settings from command-line or web interface phpDocumentor_setup::setDirectoriesToParse() 697 phpDocumentor_setup::readConfigFile() 697 Get phpDocumentor settings from a user configuration file phpDocumentor_IntermediateParser::setParsePrivate() 692 set display of elements marked with @access private phpDocumentor_IntermediateParser::parsePackagePage() 692 Backward-compatibility only, use the new tutorials for more power phpDocumentor_IntermediateParser::addPage() 683 Replaces the parserPage represented by $this->pages[$path] with $page phpDocumentor_IntermediateParser::addPackageParent() 683 If the parent class of $class is in a different package, adds it to the phpDocumentor_IntermediateParser::addPageIfNecessary() 684 add a new parserPage to the $pages array if none is found phpDocumentor_IntermediateParser::addPrivatePage() 684 Adds a parserPage element to the parserData element in $this->privatepages[$path] phpDocumentor_IntermediateParser::ClasselementCmp() 685 does a natural case sort on two class elements (either parserClass, parserMethod or parserVar phpDocumentor_IntermediateParser::addUses() 684 Add all the @uses tags from $element to the $uses array so that @usedby phpDocumentor_IntermediateParser::addElementToPage() 683 adds a processed descendant of parserElement to the $pages array or $privatepages array phpDocumentor_IntermediateParser::addConverter() 682 Add a converter name to use to the list of converters phpDocumentor_IntermediateParser::$templateBase 681 used to set the template base directory phpDocumentor_IntermediateParser::$targetDir 681 used to set the output directory phpDocumentor_IntermediateParser::$title 681 phpDocumentor_IntermediateParser::$type 681 type of the current parser Element being handled phpDocumentor_IntermediateParser::$uses 682 phpDocumentor_IntermediateParser::$undocumentedElementWarnings 682 set in Setup.inc.php to the value of the undocumentedElementWarnings commandline option. phpDocumentor_IntermediateParser::Convert() 685 Interface to the Converter

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

phpDocumentor_IntermediateParser::elementCmp() does a natural case sort on two parserElement descendants phpDocumentor_IntermediateParser::handlePackagePage() handles post-parsing of Package-level documentation pages. phpDocumentor_IntermediateParser::handleMethod() handles post-parsing of class methods phpDocumentor_IntermediateParser::handlePage() handles post-parsing of procedural pages phpDocumentor_IntermediateParser::handleTutorial() handle post-parsing of Tutorials. phpDocumentor_IntermediateParser::Output() call this method once parsing has completed. phpDocumentor_IntermediateParser::handleVar() handles post-parsing of class vars phpDocumentor_IntermediateParser::handleInclude() handles post-parsing of include/require/include_once/require_once phpDocumentor_IntermediateParser::handleGlobal() handles post-parsing of global variables phpDocumentor_IntermediateParser::handleConst() handles post-parsing of class constants phpDocumentor_IntermediateParser::handleClass() handles post-parsing of classes phpDocumentor_IntermediateParser::handleDefine() handles post-parsing of defines phpDocumentor_IntermediateParser::handleDocBlock() handles post-parsing of DocBlocks phpDocumentor_IntermediateParser::handleFunction() handles post-parsing of functions phpDocumentor_IntermediateParser::HandleEvent() called via Parser::parse() and Parser's inherited method Publisher::publishEvent() phpDocumentor_parse_ini_file() Parse an .ini file phpDocumentor_get_class() Returns a lower-cased version of get_class for PHP 5 PDFdefaultConverter::convertVar() PDFdefaultConverter::convertTutorial() PDFdefaultConverter::Convert_RIC() Convert README/INSTALL/CHANGELOG file contents to output format PDFdefaultConverter::generateFormattedClassTrees() returns a template-enabled array of class trees PDFdefaultConverter::getClassLink() PDFdefaultConverter::getCData() PDFdefaultConverter::convertParams() PDFdefaultConverter::convertPage() PDFdefaultConverter::convertFunction() PDFdefaultConverter::convertDocBlock() PDFdefaultConverter::convertGlobal() PDFdefaultConverter::convertInclude() PDFdefaultConverter::convertPackagepage() PDFdefaultConverter::convertMethod() PDFdefaultConverter::getConstLink() PDFdefaultConverter::getDefineLink()

686 690 689 690 690 691 691 689 689 686 686 687 687 688 688

637 636 266 266 266 266 267 266 265 265 264 264 265 265 265 265 267 267

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PDFdefaultConverter::getSourceAnchor() Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. PDFdefaultConverter::getRootTree() return formatted class tree for the Class Trees page PDFdefaultConverter::getSourceLink() PDFdefaultConverter::getState() PDFdefaultConverter::getVarLink() PDFdefaultConverter::getTutorialId() PDFdefaultConverter::getPageName() PDFdefaultConverter::getPageLink() PDFdefaultConverter::getFileSourceName() PDFdefaultConverter::getExampleLink() PDFdefaultConverter::getFunctionLink() PDFdefaultConverter::getGlobalLink() PDFdefaultConverter::getMethodLink() PDFdefaultConverter::getGlobalValue() PDFdefaultConverter::convertDefine() PDFdefaultConverter::convertConst() PHPDOCUMENTOR_PDF_EVENT_TEXT when <text> is found in an ezText input PHPDOCUMENTOR_PDF_EVENT_PDFFUNCTION when <pdffunction> is found in an ezText input PHPDOCUMENTOR_PDF_STATE_CONTENT used for parsing stuff between <text> PHPDOCUMENTOR_PDF_STATE_FONT when <font> is found in an ezText input PHPDOCUMENTOR_PDF_STATE_PDFFUNCTION when <pdffunction> is found in an ezText input PHPDOCUMENTOR_PDF_STATE_NEWPAGE when <newpage/> is found in an ezText input PHPDOCUMENTOR_PDF_EVENT_NEWPAGE when <newpage/> is found in an ezText input PHPDOCUMENTOR_PDF_EVENT_FONT when <font> is found in an ezText input phpDocumentor Tutorials phpDocumentor Quickstart phpDocumentor tags phpDocumentor Inline tags PHPDOCUMENTOR_PDF_EVENT_CONTENT used for parsing stuff between <text> ParserPDF.inc This class handles the XML-based CezPDF markup language created to allow templates for the PDFdefaultConverter PHPDOCUMENTOR_PDF_STATE_TEXT when <text> is found in an ezText input PDFdefaultConverter.inc Outputs documentation in PDF format PDFdefaultConverter::$ric_set PDFdefaultConverter::$pdf PDFdefaultConverter::$smarty_dir PDFdefaultConverter::$sort_absolutely_everything default PDF Converter wants elements sorted by type as well as alphabetically

270

270 270 270 271 270 270 269 268 268 268 268 269 269 264 264 260 260 260 260 260 260 260 259 41 3 49 96 259 259

260 261 263 263 263 263

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PDFdefaultConverter::convertClass() 264 PDFdefaultConverter::$_sourcecode 263 Source files for appendix C are stored here PDFdefaultConverter::$pagepackage_pagenums 263 PDFdefaultConverter::$outputformat 262 PDFdefaultConverter::$classpackage_pagenums 262 PDFdefaultConverter 262 PDF output converter. PDFdefaultConverter::$curclasspackage 262 PDFdefaultConverter::$curpagepackage 262 PDFdefaultConverter::$name 262 PDFdefaultConverter::$leftindex 262 PDFdefaultConverter::mystrnatcasecmp() 271 PDFdefaultConverter::Output() 271 calls Cezpdf::ezOutput() and writes documentation.pdf to targetDir phpdocpdf::validHTMLColor() 278 phpdocpdf::textcolor() 278 phpdocpdf::_ezText() 278 PHPDOC_WEBROOT_DIR 352 PDERROR_MULTIPLE_PARENT 515 warning triggered when inheritance could be from more than one class passbyref() 501 passes a variable by reference phpdocpdf::setupTOC() 278 phpdocpdf::setHTMLColor() 278 phpdocpdf::index() 277 phpdocpdf::indent() 277 phpdocpdf::IndexLetter() 277 phpdocpdf::orderedBullet() 278 phpdocpdf::setColorArray() 278 phpdocpdf::rf() 278 parent_b587733 549 inherited functions with @access private should not be shown in inherited list of child priv1 549 PHPDoc_XML_Beautifier_Renderer_Plain::serialize() 617 Serialize the XML tokens PHPDoc_XML_Beautifier_Renderer_Plain 617 Basic XML Renderer for XML Beautifier phpdoc.php 630 Original Web Interface to phpDocumentor phpDocumentor_clone() 632 Clone an object in PHP 4 phpDocumentor_ConfigFileList() 636 used in phpdoc.php and new_phpdoc.php PATH_DELIMITER 636 Plain.php 616 XML/Beautifier/Renderer/Plain.php phpDocumentorTParserGetInlineTagsTests.php 567 Unit Tests for the phpDocumentorTParser->getInlineTags() method ParserPageGetSourceLocationTests.php 561 Unit Tests for the ParserPage->getSourceLocation() method ParserClassGetSourceLocationTests.php 559 Unit Tests for the ParserClass->getSourceLocation() method

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

phpDocumentorSetupCleanConverterNamePieceTests.php Unit Tests for the phpDocumentor_setup->cleanConverterNamePiece() method phpDocumentorSetupDecideOnOrOffTests.php Unit Tests for the phpDocumentor_setup->decideOnOrOff() method PHPUnit_MAIN_METHOD PHPUnit main() hack PHPDOCUMENTOR_BASE Base directory of code phpdocpdf::getYPlusOffset() phpdocpdf::getColor() This really should be in the parent class PDFParser::getParserEventName() Return the name of the parser event PDFParser PDFParser::parse() Parse text for PDFParser XML tags, and add the text to the PDF file PDFParser::setupStates() setup the parser tokens, and the pushEvent/popEvent arrays phpdocpdf::$converter phpdocpdf PDFdefaultConverter::writeSource() PDFdefaultConverter::writeExample() PDFdefaultConverter::returnLink() PDFdefaultConverter::postProcess() PDFdefaultConverter::returnSee() Returns a bookmark using Cezpdf 009 PDFdefaultConverter::setTemplateDir() PDFdefaultConverter::unmangle() PDFdefaultConverter::TranslateTag() Used to translate an XML DocBook tag from a tutorial by reading the options.ini file for the template. phpdocpdf::$font_dir phpdocpdf::$indents phpdocpdf::dots() phpdocpdf::bullet() phpdocpdf::ezNewPage() phpdocpdf::ezOutput() phpdocpdf::ezText() phpdocpdf::ezProcessText() phpdocpdf::addMessage() phpdocpdf::$_save phpdocpdf::$listType phpdocpdf::$indexContents phpdocpdf::$reportContents phpdocpdf::$set_pageNumbering phpdocpdf::$_colorStack phpDocumentor_setup::setTemplateBase() phpDocumentor_setup::setTitle() PDERROR_MULTIPLE_PARENT warning triggered when inheritance could be from more than one class PDERROR_MULTIPLE_PACKAGE_TAGS warning triggered when there are multiple @package tags in a docblock PDERROR_MULTIPLE_RETURN_TAGS

563 565 565 565 277 277 274 273 274 274 275 274 273 273 272 271 272 272 272 272

275 275 276 276 276 276 277 276 276 275 275 275 275 275 275 698 698 762 762 762

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

warning triggered when there are multiple @return tags in a docblock PDERROR_MULTIPLE_SUBPACKAGE_TAGS warning triggered when there are multiple @subpackage tags in a docblock PDERROR_NAME_ALIAS_SAME_AS_TARGET warning triggered when the alias value in an page-level docblock's @name tag PDERROR_MULTIPLE_VAR_TAGS warning triggered when there are multiple @var tags in a docblock PDERROR_MULTIPLE_NAME_TAGS warning triggered when there are multiple @name tags in a docblock PDERROR_MULTIPLE_GLOBAL_TAGS warning triggered when there are multiple @name tags in a docblock PDERROR_MALFORMED_GLOBAL_TAG warning triggered when there are multiple @name tags in a docblock PDERROR_LOOP_RECURSION_LIMIT_REACHED warning triggered when the a loop recursion tripwire has been tripped PDERROR_MALFORMED_TAG warning triggered by an empty tag PDERROR_MISSING_PROPERTY_TAG_NAME warning triggered when any of {@property}}, {@property-read}}, PDERROR_MULTIPLE_CATEGORY_TAGS warning triggered by more than 1 @category tag PDERROR_MULTIPLE_ACCESS_TAGS warning triggered when there are multiple @access tags in a docblock PDERROR_NEED_WHITESPACE warning triggered when an entire page is ignored because of @access private PDERROR_NESTED_INTERNAL warning triggered when {@internal}} is nested inside another {@internal}} PDERROR_PACKAGEOUTPUT_DELETES_PARENT_FILE warning triggered when there are multiple @name tags in a docblock PDERROR_PACKAGECAT_SET warning triggered when a package is already associated with a category, and PDERROR_PARENT_NOT_FOUND warning triggered when parent class doesn't exist PDERROR_PARSEPRIVATE warning triggered when an entire page is ignored because of @access private PDERROR_PDF_METHOD_DOESNT_EXIST warning triggered when a <pdffunction:funcname /> tag is used in the PDF PDERROR_PDFFUNCTION_NO_FUNC warning triggered when a <pdffunction:funcname /> tag is used in the PDF PDERROR_OVERRIDDEN_SUBPACKAGE_TAGS warning triggered when there a @subpackage tag is used in a function, PDERROR_OVERRIDDEN_PACKAGE_TAGS warning triggered when there a @package tag is used in a function, PDERROR_NO_CONVERTERS warning triggered when a converter is passed to PDERROR_NOTODO_INCLUDE warning triggered when @todo is used on an include element PDERROR_NO_CONVERTER_HANDLER warning triggered when an example's path from @example /path/to/example.php PDERROR_NO_DOCBOOK_ID warning triggered in tutorial parsing if there is a missing {@id} inline tag PDERROR_NO_PAGE_LEVELDOCBLOCK warning triggered when a file does not contain a page-level docblock

762 762 762 761 761 761 761 761 761 761 761 762 762 763 763 763 764 764 764 763 763 762 762 763 763 763

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PDERROR_NO_PACKAGE_TAG warning triggered when no @package tag is used in a page-level PDERROR_INVALID_VALUES warning triggered if a command line option does not have a valid value passed in PDERROR_INTERNAL_NOT_CLOSED warning triggered when an {@internal}} tag is not closed PDERROR_CLASS_EXISTS warning triggered when inheritance could be from more than one class PDERROR_CLASS_CONFLICT warning triggered when classes in the same package have the same name PDERROR_CLASS_NOT_IN_PACKAGE warning triggered when a getClassByPackage is called and can't find the class PDERROR_CLASS_PARENT_NOT_FOUND warning triggered when an entire page is ignored because of @access private PDERROR_CONVERTER_OVR_GFCT warning triggered when a child converter doesn't override PDERROR_CONVERTER_NOT_FOUND warning triggered when a converter is passed to PDERROR_CHILD_TUTORIAL_NOT_FOUND warning triggered when a tutorial's child in the .ini file doesn't exist in the PDERROR_CANT_NEST_IN_B warning triggered when another tag is nested in &lt;b&gt; parserVarTag::$returnType the type a var has parserVarTag::$keyword always 'var' PDERROR_ACCESS_WRONG_PARAM warning triggered when the arguments to @access are neither public nor private PDERROR_BEAUTIFYING_FAILED warning triggered by an unterminated entity in a tutorial PDERROR_CANT_HAVE_INLINE_IN_TAGNAME warning triggered when an inline tag is found inside an xml tag name PDERROR_CANNOT_EXTEND_SELF warning triggered if someone brilliant tries "class X extends X {" PDERROR_DANGEROUS_PHP_BUG_EXISTS warning triggered when the PHP version being used has dangerous bug/behavior PDERROR_DB_TEMPLATE_UNTERMINATED warning triggered when a docblock template is never turned off PDERROR_IGNORE_TAG_IGNORED warning triggered when an @ignore tag is used in a DocBlock preceding PDERROR_ID_MUST_BE_INLINE warning triggered when an id attribute in a tutorial docbook tag is not PDERROR_ILLEGAL_PACKAGENAME warning triggered when the package or subpackage name is illegal PDERROR_INHERITANCE_CONFLICT warning triggered when inheritance could be from more than one class PDERROR_INLINETAG_IN_SEE warning triggered when an example's path from @example /path/to/example.php PDERROR_INHERITDOC_DONT_WORK_HERE warning triggered by {@inheritdoc} in a non-inheritable situation PDERROR_GLOBAL_NOT_FOUND warning triggered when there are multiple @name tags in a docblock PDERROR_FUNCTION_HAS_NONAME

763 761 760 758 758 758 758 758 758 758 758 749 749 757 757 758 757 759 759 760 760 760 760 760 760 760 759

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

warning triggered by a function with no name PDERROR_DOCBLOCK_GOES_CLASS warning triggered when the first docblock in a file with a @package tag precedes a class. In this case, the class gets the docblock. PDERROR_DOCBLOCK_CONFLICT warning triggered by a page-level docblock preceding a source element PDERROR_DUMB_USES warning triggered by improper "@uses blah" PDERROR_ELEMENT_IGNORED warning triggered when a duplicate element is encountered that will be PDERROR_EXAMPLE_NOT_FOUND warning triggered when an example's path from @example /path/to/example.php PDERROR_EMPTY_EXAMPLE_TITLE warning triggered by @example path/to/example with no title PDERROR_PDF_TEMPVAR_DOESNT_EXIST warning triggered when a <pdffunction:funcname arg=$tempvar/> tag PDERROR_PRIVATE_ASSUMED warning triggered when no @access private tag is used in a parserLinkInlineTag::$linktext text to display in the link, can be different from the link for standard parserLinkInlineTag represents inline links parserLinkInlineTag::Convert() calls the output conversion parserLinkInlineTag::ConvertPart() convert part of the tag parserSourceInlineTag::$end Last line to display parserSourceInlineTag represents inline source tag, used for function/method source parserInlineTag::Strlen() get length of the tag parserInlineTag::getString() always gets an empty string parserInheritdocInlineTag::$inlinetype always 'inheritdoc' parserInheritdocInlineTag Represents the inheritdoc inline tag, used by classes/methods/vars to inherit documentation from the parent class if possible parserInheritdocInlineTag::Convert() only sets a warning and returns empty parserInlineTag Use this element to represent an {@inline tag} like {@link} parserInlineTag::$type Element type parserInlineTag::$inlinetype the name of the inline tag (like link) parserSourceInlineTag::$inlinetype always 'source' parserSourceInlineTag::$source tokenized source organized by line numbers for php 4.3.0+, the old parserTocInlineTag::Convert() converter method

759

759 759 759 759 759 764 764 780 780 781 781 782 781 779 779 778 777

778 778 779 779 782 782 785

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserTocInlineTag::$inlinetype always 'toc' parserTocInlineTag::setPath() set the path parserTocInlineTag::setTOC() set the TOC parserTutorialInlineTag::Convert() convert part of the tag parserTutorialInlineTag Represents inline links to external tutorial documentation parserTocInlineTag Represents {@toc} for table of contents generation in tutorials parserSourceInlineTag::Strlen() only used to determine blank lines. {@source} will not be blank, probably parserSourceInlineTag::arrayConvert() converter helper used in PHP 4.3.0+ parserSourceInlineTag::$start First line of source code to display parserSourceInlineTag::Convert() convert the tag parserSourceInlineTag::getString() gets the source string parserSourceInlineTag::stringConvert() converter helper used in PHP 4.2.3parserSourceInlineTag::setSource() sets the source tag's value parserIdInlineTag::Convert() converter parserIdInlineTag::$tutorial full name of the tutorial PDERROR_TUTORIAL_SUBSECTION_NOT_FOUND warning triggered when a subsection's title is asked for, but the subsection PDERROR_TUTORIAL_NOT_FOUND warning triggered when a tutorial is referenced PDERROR_UL_IN_UL warning triggered if <<ul>> is nested inside <<ul>> and not <<li>> PDERROR_UNCLOSED_TAG warning triggered when a DocBlock html tag is unclosed PDERROR_UNKNOWN_COMMANDLINE warning triggered when an entire page is ignored because of @access private PDERROR_UNDOCUMENTED_ELEMENT warning triggered when a class or method hasn't got docblock PDERROR_TUTORIAL_IS_OWN_GRANDPA warning triggered when a tutorial's child lists the parent tutorial PDERROR_TUTORIAL_IS_OWN_CHILD warning triggered when a tutorial lists itself as a child tutorial PDERROR_SOURCE_TAG_FUNCTION_NOT_FOUND warning triggered when a { @source } inline tag is used in a docblock not PDERROR_SOURCECODE_IGNORED warning triggered by sourcecode="on", if PHP < 4.3.0 PDERROR_SOURCE_TAG_IGNORED warning triggered when an {@source} tag is found in a short description

785 786 786 787 786 785 784 783 782 783 784 784 784 777 776 765 765 765

765 765 765 765 765 764 764 764

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PDERROR_TAG_NOT_HANDLED warning triggered by @filesource, if PHP < 4.3.0 PDERROR_TEXT_OUTSIDE_LI warning triggered when text in a docblock list is not contained in PDERROR_TEMPLATEDIR_DOESNT_EXIST warning triggered by non-existent template directory PDERROR_UNKNOWN_TAG warning triggered when classes in the same package have the same name PDERROR_UNMATCHED_LIST_TAG warning triggered when a docblock has an unmatched &lt;ol&gt; or &lt;ul&gt; parserIdInlineTag::$category category of the {@id} parserIdInlineTag Represents the inline {@id} tag for tutorials parserIdInlineTag::$id section/subsection name parserIdInlineTag::$inlinetype always 'id' parserIdInlineTag::$subpackage subpackage of the {@id} parserIdInlineTag::$package package of the {@id} parserExampleInlineTag::setSource() sets the source parserExampleInlineTag::getProgramListing() Return the source for the example file, enclosed in a <programlisting> tag to use in a tutorial PDERROR_UNTERMINATED_ATTRIB warning triggered when a subsection's title is asked for, but the subsection PDERROR_UNMATCHED_TUTORIAL_TAG warning triggered when a docbook tag is not properly matched PDERROR_UNTERMINATED_ENTITY warning triggered by an unterminated entity in a tutorial PDERROR_UNTERMINATED_INLINE_TAG warning triggered when an {@inline tag} is not terminated parserExampleInlineTag::arrayConvert() converter helper for PHP 4.3.0+ parserExampleInlineTag Represents the example inline tag, used to display an example file inside a docblock or tutorial parserVarTag represents the "@var" tag parserUsesTag::getDescription() Get the description of how the element used is being used. Publisher::subscribe() Adds a subscriber to the $subscriber array(). Publisher::publishEvent() Publish an event parserB Used for <<b>> in a description parserB::Convert() performs the conversion of bold tags

764 765 764 766 766

776 775 776 776 776 776 775 775

766 766 766 766 774 773

748 748 709 709 716 716

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserBr::Convert() performs the conversion of linebreak tags parserBr Used for <<br>> in a description Publisher::$tokens Publisher::$subscriber Array of references objects that have Subscribed to this publisher ProceduralPages::setupPagePackages() if there is one class package in a file, the parent path inherits the package if its package is default. ProceduralPages::setParseBase() sets the parser base ProceduralPages::setupPages() Adjusts packages of all pages and removes name conflicts within a package Publisher a class for handling the publishing of data Publisher::$pushEvent Publisher::$popEvent parserCode Used for <<code>> in a description parserCode::Convert() performs the conversion of code tags parserList::addItem() add an item to a list parserList::$numbered parserList::addList() add a list parserList::Convert() performs the conversion of list tags parserPre::Convert() performs the conversion of code tags parserPre Used for <<pre>> in a description parserList::$items parserList Used for lists <<ol>> and <<ul>> parserDescVar::Convert() performs the conversion of variable tags parserDescVar Used for <<var>> in a description parserI Used for <<i>> in a description parserI::Convert() performs the conversion of italic tags parserKbd::Convert() performs the conversion of keyboard tags parserKbd Used for <<kbd>> in a description ProceduralPages::setName() Change a page's name from its file to alias $name ProceduralPages::replaceElement() Used to align an element with the package of its parent page prior to Conversion.

717 717 709 709 707

707 708 708 709 709 718 718 722 722 722 722 723 723 721 721 719 718 719 720 721 720 707 707

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

ProceduralPages::$globalconflicts Namespace conflicts within all documented packages of functions ProceduralPages::$functionsbynamefile array of file names organized by functions that are in the file. ProceduralPages::$globalsbyfile array of parsed global variables organized by the full path of the file that contains the global variable definition. ProceduralPages::$globalsbynamefile array of file names organized by global variables that are in the file. ProceduralPages::$includesbyfile array of parsed includes organized by the full path of the file that contains the include. ProceduralPages::$ignorepages array of all procedural pages ordered by name ProceduralPages::$functionsbyfile array of parsed functions organized by the full path of the file that contains the function. ProceduralPages::$functionconflicts Namespace conflicts within all documented packages of functions ProceduralPages Intermediate procedural page parsing structure. phpDocumentor_setup::setUndocumentedElementWarnings() ProceduralPages::$curfile file being parsed, used in every add function to match up elements with the file that contains them ProceduralPages::$defineconflicts Namespace conflicts within all documented packages of functions ProceduralPages::$definesbynamefile array of file names organized by defines that are in the file. ProceduralPages::$definesbyfile array of parsed defines organized by the full path of the file that contains the define. ProceduralPages::$pageclasspackages array of packages assigned to classes in a file, ordered by fullpath ProceduralPages::$pageconflicts Namespace conflicts within all documented pages ProceduralPages::addPagePackage() Changes the package of the page represented by $path ProceduralPages::addPage() sets up the $pages array ProceduralPages::getPathInfo() gathers path-related info about a given element ProceduralPages::getRealPath() Ensures the path to the file is an absolute path ProceduralPages::pathMatchesParsedFile() checks to see if the parsed file matches the given path ProceduralPages::ignorePage() moves a page from the $pages array to the $ignorepages array ProceduralPages::addInclude() sets up the $includesbyfile array using $curfile ProceduralPages::addGlobal() sets up the $globalsbyfile array using $curfile ProceduralPages::$pages

701 701 702

702 702

702 701

700 699 698 699

699 700 700

703 703 705 705 706 706 707 706 705 705 704

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

array of all procedural pages ordered by name ProceduralPages::$pagepackages array of packages ordered by full path ProceduralPages::$pathpages array of all procedural page names ordered by full path to the file ProceduralPages::addClassPackageToFile() adds a package from a class to the current file ProceduralPages::addFunction() sets up the $functionsbyfile array using $curfile ProceduralPages::addDefine() sets up the $definesbyfile array using $curfile parserSamp Used for <<samp>> in a description parserSamp::Convert() performs the conversion of sample tags parserReturnTag::Convert() process this tag through the given output converter (sets up the $converted_returnType) parserReturnTag::$returnType the type a function returns parserSeeTag represents the "@see" tag parserSeeTag::$keyword always 'see' parserStaticvarTag represents the "@staticvar" tag parserSeeTag::Convert() process this tag through the given output converter parserReturnTag::$keyword always 'return' parserReturnTag::$converted_returnType contains a link to the documentation for a class passed as a type in @return, @var or @param parserPropertyTag::$keyword always 'property' parserPropertyTag represents the "@property" tag parserPropertyTag::$returnType the type a property has parserPropertyWriteTag represents the "@property-write" tag parserReturnTag represents the "@return" tag parserPropertyWriteTag::$keyword always 'property-write' parserStaticvarTag::$keyword always 'staticvar' parserTag used to represent standard tags like @access, etc. parserUsedByTag::$keyword Always "usedby" parserUsedByTag This is a virtual tag, it is created by @uses to cross-reference the used element

703 704 704 705 704 724 724 740

739 740 741 741 741 739 739

737 737 737 738 738 738 742 742 746 746

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

parserUsedByTag::Convert() process this tag through the given output converter parserUsesTag represents the "@uses" tag parserUsesTag::Convert() Return a link to documentation for other element, and description of how it is used parserUsesTag::$keyword Always "uses" parserTutorialTag::Convert() process this tag through the given output converter parserTutorialTag::$keyword Always "tutorial" parserTag::$type Type is used by many functions to skip the hassle of parserTag::$keyword tag name (see, access, etc.) parserTag::Convert() Perform the output conversion on this parserTag using the output converter that is passed in parserTag::getString() Returns the text minus any inline tags parserTutorialTag represents "@tutorial" parserTag::HandleEvent() Called by the parserDescParser when processing a description. parserPropertyReadTag::$keyword always 'property-read' parserPropertyReadTag represents the "@property-read" tag parserFileSourceTag represents "@filesource" parserExampleTag::getSourceLink() Retrieve a converter-specific link to the example parserFileSourceTag::$keyword Always "filesource" parserFileSourceTag::$path parserFileSourceTag::Convert() Return a link to the highlighted source and generate the source parserFileSourceTag::$source parserExampleTag::ConvertSource() convert the source code parserExampleTag::$keyword always "example" parserAccessTag::$isvalid set to true if the returned tag has a value type of private, protected parserAccessTag This class represents the @access tag parserAccessTag::$keyword tag name parserAccessTag::Convert() process this tag through the given output converter parserExampleTag

746 747 748

747 745 745 743 743 743

744 744 744 736 736 729 729 729 730 730 730 728 728 726 726 726 727 727

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

represents "@example" parserAccessTag::getString() No inline tags are possible, returns 'public', 'protected' or 'private' parserFileSourceTag::ConvertSource() convert the source code parserFileSourceTag::getSourceLink() gets path to the sourcecode file parserNameTag This class represents the @name tag parserMethodTag::$returnType the return type a method has parserNameTag::$keyword tag name parserNameTag::Convert() process this tag through the given output converter parserParamTag::$keyword always 'param' parserParamTag represents the "@param" tag parserMethodTag::$keyword always 'method' parserMethodTag represents the "@method" tag parserLicenseTag represents the "@see" tag parserFileSourceTag::writeSource() have the output converter write the source code parserLicenseTag::$keyword always 'license' parserLinkTag represents the "@link" tag parserLinkTag::$keyword always 'link' phpDocumentor Guide to Creating Fantastic Documentation

727 730 731 734 734 735 735 736 735 734 733 732 731 732 732 733 1

R
RecordWarning::$linenum line number of the file this error occurred in RecordWarning::$file file this error occurred in RecordWarning::$num error number RecordWarning::$type name of global variable that descriptors for this warning/error is kept README RecordWarning::output() prints the warning RecordWarning::$data error string RecordWarning encapsulates warning information 771 771 771 771 949 772 770 770

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

recurseDir() RecordWarning RecordError encapsulates error information RecordError::$type name of global variable that descriptors for this warning/error is kept RecordError::output() prints the error returnsme() returns a reference

626 550 769 770 770 501

S
smarty_modifier_htmlentities() Smarty plugin smarty_modifier_escape() Smarty escape modifier plugin smarty_modifier_default() Smarty default modifier plugin smarty_modifier_indent() Smarty indent modifier plugin smarty_modifier_lower() Smarty lower modifier plugin smarty_modifier_regex_replace() Smarty regex_replace modifier plugin smarty_modifier_rawurlencode() Smarty plugin smarty_modifier_nl2br() Smarty plugin smarty_modifier_debug_print_var() Smarty debug_print_var modifier plugin smarty_modifier_date_format() Smarty date_format modifier plugin smarty_modifier_cat() Smarty cat modifier plugin smarty_modifier_capitalize() Smarty capitalize modifier plugin smarty_function_var_dump() Smarty plugin smarty_modifier_count_characters() Smarty count_characters modifier plugin smarty_modifier_count_paragraphs() Smarty count_paragraphs modifier plugin smarty_modifier_count_words() Smarty count_words modifier plugin smarty_modifier_count_sentences() Smarty count_sentences modifier plugin smarty_modifier_replace() Smarty replace modifier plugin smarty_modifier_spacify() Smarty spacify modifier plugin smarty_make_timestamp() 467 466 465 468 469 472 471 470 464 463 458 457 456 459 460 462 461 473 474 484

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Function: smarty_make_timestamp<br> Purpose: used by other smarty functions to make a timestamp from a string. shared.make_timestamp.php Smarty shared plugin smarty_function_escape_special_chars() escape_special_chars common function SendEMail() This is a Test SMART_PATH_DELIMITER does not parse correctly because of function in definition summary_form::blah() summary_form::$dp summary_form shared.escape_special_chars.php Smarty shared plugin smarty_outputfilter_trimwhitespace_replace() smarty_modifier_strip_tags() Smarty strip_tags modifier plugin smarty_modifier_strip() Smarty strip modifier plugin smarty_modifier_string_format() Smarty string_format modifier plugin smarty_modifier_truncate() Smarty truncate modifier plugin smarty_modifier_upper() Smarty upper modifier plugin smarty_outputfilter_trimwhitespace() Smarty trimwhitespace outputfilter plugin smarty_modifier_wordwrap() Smarty wordwrap modifier plugin smarty_function_popup_init() Smarty {popup_init} function plugin smarty_function_popup() Smarty {popup} function plugin smarty_block_strip() Smarty {strip}{/strip} block plugin smarty_core_write_file() write out a file to disk smarty_core_write_compiled_resource() write the compiled resource smarty_block_textformat() Smarty {textformat}{/textformat} block plugin smarty_function_assign() Smarty {assign} function plugin smarty_function_counter() Smarty {counter} function plugin smarty_function_config_load() Smarty {config_load} function plugin smarty_function_assign_debug_info() Smarty {assign_debug_info} function plugin smarty_core_write_compiled_include() Extract non-cacheable parts out of compiled template and write it

484 483 491 523 550 550 550 483 481 477 476 475 478 479 481 480 455 454 427 426 425 428 429 432 431 430 424

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

smarty_core_write_cache_file() Prepend the cache information to the cache file and write it smarty_core_read_cache_file() read a cache file, determine if it needs to be regenerated or not smarty_core_process_compiled_include() Replace nocache-tags by results of the corresponding non-cacheable functions and return it smarty_core_process_cached_inserts() Replace cached inserts with the actual results smarty_core_rmdir() delete a dir recursively (level=0 -> keep root) WARNING: no tests, it will try to remove what you tell it! smarty_core_rm_auto() delete an automagically created file by name and id smarty_core_smarty_include_php() called for included php files within templates smarty_core_run_insert_handler() Handle insert tags smarty_function_cycle() Smarty {cycle} function plugin smarty_function_debug() Smarty {debug} function plugin smarty_function_html_select_time() Smarty {html_select_time} function plugin smarty_function_html_select_date() Smarty {html_select_date} plugin smarty_function_html_radios_output() smarty_function_html_table() Smarty {html_table} function plugin smarty_function_html_table_cycle() smarty_function_math() Smarty {math} function plugin smarty_function_mailto() Smarty {mailto} function plugin smarty_function_html_radios() Smarty {html_radios} function plugin smarty_function_html_options_optoutput() smarty_function_html_checkboxes() Smarty {html_checkboxes} function plugin smarty_function_fetch() Smarty {fetch} plugin smarty_function_eval() Smarty {eval} function plugin smarty_function_html_checkboxes_output() smarty_function_html_image() Smarty {html_image} function plugin smarty_function_html_options_optgroup() smarty_function_html_options() Smarty {html_options} function plugin summary_form::get_header2() showImage()

423

418

417

416 419

420 422 421 433 435 448 446 445 449 450 453 451 444 443 438 437 436 439 440 442 442 550 626

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Allows png's with alpha transparency to be displayed in IE 6 STATE_LOGICBLOCK currently parsing a { } block STATE_INLINE_DOCKEYWORD currently parsing an inline tag like { @link} in a DocBlock STATE_INCLUDE_PARAMS_PARENTHESIS currently parsing an inner parenthetical statement of an include/includeonce/require/requireonce( ) STATE_METHOD currently parsing a method using the HighlightParser STATE_METHOD_LOGICBLOCK currently parsing the method body using the HighlightParser STATE_PHPCODE currently parsing php code STATE_OUTPHP currently out of php code STATE_NOEVENTS out of < ? php tag STATE_INCLUDE_PARAMS currently parsing the stuff in ( ) of a define statement STATE_INCLUDE currently parsing an include/require/include_once/include_once STATE_FUNCTION_PARAM_VAR currently parsing a $param in a function definition STATE_FUNCTION_PARAMS currently parsing the stuff in ( ) of a function definition STATE_FUNCTION currently parsing a Function or Method STATE_FUNC_GLOBAL currently parsing a "global $var1, $var2;" declaration in a function STATE_GLOBAL currently parsing a global variable declaration STATE_IMPLEMENTS currently parsing an implements clause STATE_GLOBAL_VALUE currently parsing the default value in a global variable declaration STATE_QUOTE currently parsing a quote STATE_QUOTE_VAR currently parsing a {$encapsed_var} using the HighlightParser STATE_TUTORIAL_ENTITY currently parsing an &entity; STATE_TUTORIAL_DOUBLEQUOTE currently parsing a <!-- comment --> STATE_TUTORIAL_COMMENT currently parsing a <!-- comment --> STATE_TUTORIAL_ITAG currently parsing an {@inline tag} STATE_TUTORIAL_NOEVENTS currently in starting state STATE_TUTORIAL_SINGLEQUOTE currently parsing a <!-- comment --> STATE_TUTORIAL_OPENTAG

878 878 878

878 878 879 878 878 878 878 877 877 877 878 878 878 878 879 879 883 883 883 883 883 883 883

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

currently parsing an open <tag> STATE_TUTORIAL_CLOSETAG 883 currently parsing a close </tag> STATE_TUTORIAL_ATTRIBUTE 883 currently parsing an open <tag> STATE_STATIC_VAR_VALUE 879 currently parsing the value in a "static $var1 = x" declaration in a function STATE_STATIC_VAR 879 currently parsing a "static $var1, $var2;" declaration in a function STATE_SINGLEQUOTE 879 currently parsing a string enclosed in single quotes (') STATE_TAGS 879 currently parsing the @tag block of a docblock STATE_VAR 879 currently parsing a Class variable STATE_VAR_ARRAY_COMMENT 879 currently parsing a comment in a variable array value STATE_VAR_ARRAY 879 currently parsing a variable value is an array STATE_ESCAPE 877 used when a backslash is encountered in parsing a string or other escapable entity STATE_EOFQUOTE 877 currently parsing a string defined using Perl <<< STATE_XMLTOKEN_ENTITY 866 currently parsing an &entity; STATE_XMLTOKEN_DOUBLEQUOTE 866 currently parsing a <!-- comment --> STATE_XMLTOKEN_DEF 866 currently parsing a <! STATE_XMLTOKEN_IN_CDATA 866 currently parsing a <![CDATA[ ]]> STATE_XMLTOKEN_NOEVENTS 866 currently in starting state STATE_XMLTOKEN_SINGLEQUOTE 866 currently parsing a <!-- comment --> STATE_XMLTOKEN_PI 866 currently in processor instruction STATE_XMLTOKEN_OPENTAG 866 currently parsing an open <tag> STATE_XMLTOKEN_COMMENT 866 currently parsing a <!-- comment --> STATE_XMLTOKEN_CLOSETAG 866 currently parsing a close </tag> setup_dirs() 641 Recursively move contents of $struc into associative array SMART_PATH_DELIMITER 637 switchDirTree() 626 set_dir() 641 Recursively add all the subdirectories of $contents to $dir without erasing anything in Setup.inc.php 651 This was all in phpdoc.inc, and now encapsulates the complexity STATE_XMLTOKEN_CDATA 866 currently parsing a <!

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

STATE_XMLTOKEN_ATTRIBUTE currently parsing an open <tag> STATE_XMLTOKEN_XML currently parsing a <?xml STATE_ACCESS_MODIFIER currently parsing an access modifier STATE_DOCBLOCK_TEMPLATE currently parsing the value in a "static $var1 = x" declaration in a function STATE_DOCBLOCK currently parsing a DocBlock STATE_DESC currently parsing the desc part of a docblock STATE_DOCKEYWORD currently parsing a @tag in a DocBlock STATE_DOCKEYWORD_EMAIL currently parsing an email in brackets in an @author tag of a DocBlock STATE_END_DOCBLOCK_TEMPLATE currently parsing the value in a "static $var1 = x" declaration in a function STATE_END_CLASS used to tell Render that a class has been completely parsed, and to flush buffers STATE_DEFINE_PARAMS_PARENTHESIS currently parsing an inner parenthetical statement of a define( ) STATE_DEFINE_PARAMS currently parsing the stuff in ( ) of a define statement STATE_CLASS_CONSTANT currently parsing a class constant STATE_CLASS currently parsing a class definition STATE_ARRAY currently parsing an array STATE_CLASS_MEMBER currently parsing a class member using the HighlightParser STATE_COMMENT currently parsing a short comment // STATE_DEFINE currently parsing a define statement STATE_COMMENTBLOCK currently parsing a long comment /x x/ where x is an asterisk smarty_core_load_resource_plugin() load a resource plugin smarty_core_load_plugins() Load requested plugins Smarty::append() appends values to template variables Smarty::$use_sub_dirs This tells Smarty whether or not to use sub dirs in the cache/ and templates_c/ directories. sub directories better organized, but may not work well with PHP safe mode enabled. Smarty::$undefined The value of "undefined". Leave it alone :-) Smarty::append_by_ref() appends values to template variables by reference Smarty::assign()

866 867 876 877 877 877 877 877 877 877 876 876 876 876 876 876 876 876 876 415 414 383 382

382 383 383

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

assigns values to template variables Smarty::clear_all_cache() clear the entire contents of cache (all templates) Smarty::clear_all_assign() clear all the assigned template variables. Smarty::assign_by_ref() assigns values to template variables by reference Smarty::$trusted_dir This is an array of directories where trusted php scripts reside. Smarty::$template_dir The name of the directory where templates are located. Smarty::$request_vars_order The order in which request variables are registered, similar to variables_order in php.ini E = Environment, G = GET, P = POST, C = Cookies, S = Server Smarty::$request_use_auto_globals Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false) Smarty::$plugins_dir An array of directories searched for plugins. Smarty::$right_delimiter The right delimiter used for the template tags. Smarty::$secure_dir This is the list of template directories that are considered secure. This is used only if $security is enabled. One directory per array element. $template_dir is in this list implicitly. Smarty::$security_settings These are the security settings for Smarty. They are used only when $security is enabled. Smarty::$security This enables template security. When enabled, many things are restricted Smarty::clear_assign() clear the given assigned template variable. Smarty::clear_cache() clear cached content for the given template and cache id Smarty::register_compiler_function() Registers compiler function Smarty::register_block() Registers block function to be used in templates Smarty::load_filter() load a filter of specified type and name Smarty::register_function() Registers custom function to be used in templates Smarty::register_modifier() Registers modifier to be used in templates Smarty::register_postfilter() Registers a postfilter function to apply to a compiled template after compilation Smarty::register_outputfilter() Registers an output filter function to apply to a template output Smarty::register_object() Registers object to be used in templates Smarty::is_cached()

384 384 383 382 382 381

380 380 381 381

381

381 384 384 387 387 386 387 388 388

388

388 386

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

test to see if valid cache exists for this template Smarty::get_template_vars() Returns an array containing template variables Smarty::config_load() load configuration values Smarty::clear_config() clear configuration values Smarty::clear_compiled_tpl() clears compiled version of specified template resource, or all compiled template files if one is not specified. Smarty::display() executes & displays the template results Smarty::fetch() executes & returns or displays the template results Smarty::get_registered_object() return a reference to a registered object Smarty::get_config_vars() Returns an array containing config variables Smarty::$php_handling This determines how Smarty handles "<?php ... ?>" tags in templates. Smarty::$left_delimiter The left delimiter used for the template tags. Smarty::$cache_dir The name of the directory for cache files. Smarty::$autoload_filters This indicates which filters are automatically loaded into Smarty. Smarty Smarty::$cache_handler_func The function used for cache file handling. If not set, built-in caching is used. Smarty::$cache_lifetime This is the number of seconds cached content will persist. Smarty::$compiler_class The class used for compiling templates. Smarty::$caching This enables template caching. Smarty::$cache_modified_check Only used when $caching is enabled. If true, then If-Modified-Since headers are respected with cached content, and appropriate HTTP headers are sent. Smarty_Compiler.class.php Project: Smarty: the PHP compiling template engine File: Smarty_Compiler.class.php SMARTY_PHP_REMOVE Smarty.class.php Project: Smarty: the PHP compiling template engine File: Smarty.class.php Source code for sample3.php Source code for sample2.php SMARTY_DIR set SMARTY_DIR to absolute path to Smarty library files. SMARTY_PHP_ALLOW SMARTY_PHP_QUOTE SMARTY_PHP_PASSTHRU Smarty::$compiler_file

386 385 385 384

385 385 386 386 380 380 375 374 374 375 375 376 375 375

370

369 368

15 12 368 369 369 369 376

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

The file that contains the compiler class. This can a full pathname, or relative to the php_include path. Smarty::$compile_check This tells Smarty whether to check for recompiling or not. Recompiling does not need to happen unless a template or config file is changed. Smarty::$default_modifiers This is a list of the modifiers to apply to all template variables. Smarty::$debug_tpl This is the path to the debug console template. If not set, the default one will be used. Smarty::$debugging_ctrl This determines if debugging is enable-able from the browser. Smarty::$default_resource_type This is the resource type to be used when not specified Smarty::$default_template_handler_func If a template cannot be found, this PHP function will be executed. Smarty::$global_assign These are the variables from the globals array that are assigned to all templates automatically. This isn't really necessary any more, you can use the $smarty var to access them directly. Smarty::$force_compile This forces templates to compile every time. Useful for development or debugging. Smarty::$debugging If debugging is enabled, a debug console window will display when the page loads (make sure your browser allows unrequested popup windows) Smarty::$config_read_hidden This tells whether hidden sections [.foobar] are readable from the tempalates or not. Normally you would never allow this since that is the point behind hidden sections: the application can access them, but the templates cannot. Smarty::$config_booleanize This tells whether or not to automatically booleanize config file variables. Smarty::$compile_id Set this if you want different sets of compiled files for the same templates. This is useful for things like different languages. Smarty::$compile_dir The directory where compiled templates are located. Smarty::$config_class The class used to load config vars. Smarty::$config_dir The directory where config files are located. Smarty::$config_overwrite This tells if config file vars of the same name overwrite each other or not. Smarty::$config_fix_newlines This tells whether or not automatically fix newlines in config files. Smarty::register_prefilter() Registers a prefilter function to apply to a template before compiling Smarty::register_resource() Registers a resource to fetch a template

376

378 378

378 379 379 379

379

378

377

377 376

376 377 377 377 377 388

389

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Smarty_Compiler::_expand_quoted_text() expand quoted text with embedded variables Smarty_Compiler::_compile_tag() Compile a template tag Smarty_Compiler::_compile_smarty_ref() Compiles references of type $smarty.foo Smarty_Compiler::_load_filters() load pre- and post-filters Smarty_Compiler::_parse_attrs() Parse attribute string Smarty_Compiler::_parse_modifiers() parse modifier chain into PHP code Smarty_Compiler::_parse_is_expr() Parse is expression Smarty_Compiler::_parse_conf_var() parse configuration variable expression into PHP code Smarty_Compiler::_compile_section_start() Compile {section ...} tag Smarty_Compiler::_compile_registered_object_tag() compile a registered object tag Smarty_Compiler::_compile_if_tag() Compile {if ...} tag Smarty_Compiler::_compile_foreach_start() Compile {foreach ...} tag. Smarty_Compiler::_compile_file() compile a resource Smarty_Compiler::_compile_include_php_tag() Compile {include ...} tag Smarty_Compiler::_compile_include_tag() Compile {include ...} tag Smarty_Compiler::_compile_plugin_call() compiles call to plugin of type $type with name $name Smarty_Compiler::_compile_insert_tag() Compile {insert ...} tag Smarty_Compiler::_parse_parenth_args() parse arguments in function call parenthesis Smarty_Compiler::_parse_section_prop() parse section property expression into PHP code smarty_core_get_include_path() Get path to file from include_path smarty_core_display_debug_console() Smarty debug_console function plugin smarty_core_create_dir_structure() create full directory structure smarty_core_get_microtime() Get seconds and microseconds smarty_core_get_php_resource() Retrieves PHP script resource smarty_core_is_trusted() determines if a resource is trusted or not smarty_core_is_secure() determines if a resource is secure or not. smarty_core_assign_smarty_interface()

401 400 400 401 401 402 401 401 400 400 399 398 398 399 399 399 399 402 402 409 408 407 410 411 413 412 406

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Smarty assign_smarty_interface core plugin smarty_core_assemble_plugin_filepath() assemble filepath of requested plugin Smarty_Compiler::_parse_var_props() compile single variable and section properties token into PHP code Smarty_Compiler::_parse_vars_props() compile multiple variables and section properties tokens into PHP code Smarty_Compiler::_parse_var() parse variable expression into PHP code Smarty_Compiler::_pop_cacheable_state() check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition. Smarty_Compiler::_push_cacheable_state() check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. return php-code to reflect the transition. Smarty_Compiler::_syntax_error() display Smarty syntax error Smarty_Compiler::_quote_replace() Quote subpattern references Smarty_Compiler::_compile_custom_tag() compile custom function tag Smarty_Compiler::_compile_compiler_tag() compile the custom compiler tag Smarty::_compile_resource() compile the template Smarty::unregister_resource() Unregisters a resource Smarty::unregister_prefilter() Unregisters a prefilter function Smarty::_compile_source() compile the given source Smarty::_dequote() Remove starting and ending quotes from the string Smarty::_get_auto_filename() get a concrete filename for automagically created content Smarty::_fetch_resource_info() fetch the template info. Gets timestamp, and source if get_source is true Smarty::_eval() wrapper for eval() retaining $this Smarty::unregister_postfilter() Unregisters a postfilter function Smarty::unregister_outputfilter() Unregisters an outputfilter function Smarty::unregister_block() Unregisters block function Smarty::trigger_error() trigger Smarty error Smarty::template_exists()

405 403

403

402 403

403

404 403 398 398 391 391 391 391 392 393 392

392 391 390 389 389 389

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Checks whether requested template exists. Smarty::unregister_compiler_function() Unregisters compiler function Smarty::unregister_function() Unregisters custom function Smarty::unregister_object() Unregisters object Smarty::unregister_modifier() Unregisters modifier Smarty::_get_auto_id() returns an auto_id for auto-file-functions Smarty::_get_compile_path() Get the compile path for this resource Smarty_Compiler Template compiling class Smarty::_unlink() unlink a file, possibly using expiration time Smarty::_trigger_fatal_error() trigger Smarty plugin error Smarty_Compiler::_add_plugin() add plugin Smarty_Compiler::_compile_arg_list() Smarty_Compiler::_compile_capture_tag() Compile {capture} .. {/capture} tags Smarty_Compiler::_compile_block_tag() compile block function tag Smarty::_smarty_include() called for included templates Smarty::_smarty_cache_attrs() get or set an array of cached attributes for function that is Smarty::_is_compiled() test if resource needs compiling Smarty::_include() wrapper for include() retaining $this Smarty::_get_plugin_filepath() get filepath of requested plugin Smarty::_parse_resource_name() parse out the type and name from the resource Smarty::_process_compiled_include_callback() callback function for preg_replace, to call a non-cacheable block Smarty::_run_mod_handler() Handle modifiers Smarty::_read_file() read in a file from line $start for $lines. Source code for sample1.php

390 390 390 390 393 393 396 396 396 397 397 397 397 395 395 394 394 393 394 394 395 395 10

T
tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoC() Shows correct behavior for handling the fuzzy "NO" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoB() Shows correct behavior for handling the fuzzy "No" value 604 603

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOffA() Shows correct behavior for handling the fuzzy "Off" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOffB() Shows correct behavior for handling the fuzzy "OFF" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOnB() Shows correct behavior for handling the fuzzy "ON" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOnA() Shows correct behavior for handling the fuzzy "On" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyNoA() Shows correct behavior for handling the fuzzy "no" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseC() Shows correct behavior for handling the fuzzy "FALSE" value tests_phpDocumentorSetupDecideOnOrOffTests::testBasicOff() Shows correct behavior for handling the perfect expected "off" value tests_phpDocumentorSetupDecideOnOrOffTests::tearDown() Tears down the fixture, for example, close a network connection. tests_phpDocumentorSetupDecideOnOrOffTests::testBasicOn() Shows correct behavior for handling the perfect expected "on" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyEmpty() Shows correct behavior for handling the fuzzy "" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseB() Shows correct behavior for handling the fuzzy "False" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyFalseA() Shows correct behavior for handling the fuzzy "false" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyOne() Shows correct behavior for handling the fuzzy "1" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueA() Shows correct behavior for handling the fuzzy "true" value tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedGreatLiterature() Shows correct behavior for handling an odd "ash nazg durbatuluk" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyZero() Shows correct behavior for handling the fuzzy "0" value tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedLargeNumber() Shows correct behavior for handling an odd "10" value tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedNegative() Shows correct behavior for handling an odd "-1" value tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedSpaces() Shows correct behavior for handling an odd " " value tests_phpDocumentorSetupDecideOnOrOffTests::testUnexpectedNull() Shows correct behavior for handling an odd NULL value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesE() Shows correct behavior for handling the fuzzy "YES" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesD() Shows correct behavior for handling the fuzzy "Yes" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueC() Shows correct behavior for handling the fuzzy "TRUE" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyTrueB() Shows correct behavior for handling the fuzzy "True" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesA() Shows correct behavior for handling the fuzzy "y" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesB() Shows correct behavior for handling the fuzzy "Y" value tests_phpDocumentorSetupDecideOnOrOffTests::testFuzzyYesC()

604 604 605 604 603 603 602 601 602 602 603 602 605 605 607 607 607 608 608 608 607 606 605 605 606 606 606

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

Shows correct behavior for handling the fuzzy "yes" value tests_phpDocumentorSetupDecideOnOrOffTests::setUp() 601 Sets up the fixture, for example, open a network connection. tests_phpDocumentorSetupDecideOnOrOffTests::main() 601 Runs the test methods of this class. tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryHands() 595 Shows correct behavior for handling the perfect expected "HandS" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryEarthli() 594 Shows correct behavior for handling the perfect expected "earthli" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryL0l33t() 595 Shows correct behavior for handling the perfect expected "l0l33t" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPear() 595 Shows correct behavior for handling the perfect expected "PEAR" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhpdocde( ) 596 Shows correct behavior for handling the perfect expected "phpdoc.de" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhp() 595 Shows correct behavior for handling the perfect expected "PHP" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomPhpht mllib() 594 Shows correct behavior for handling the perfect expected "DOM/phphtmllib" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomPhpdo cde() 594 Shows correct behavior for handling the perfect expected "DOM/phpdoc.de" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondarySmarty( ) 592 Shows correct behavior for handling the perfect expected "Smarty" secondary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryFrames( ) 592 Shows correct behavior for handling the perfect expected "frames" secondary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDefault() 592 Shows correct behavior for handling the perfect expected "default" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomDefaul t() 593 Shows correct behavior for handling the perfect expected "DOM/default" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomL0l33t () 593 Shows correct behavior for handling the perfect expected "DOM/l0l33t" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryDomEarthli () 593 Shows correct behavior for handling the perfect expected "DOM/earthli" tertiary value

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalTertiaryPhphtmllib( ) 596 Shows correct behavior for handling the perfect expected "phphtmllib" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimar yCHM() 596 Shows correct behavior for handling the perfect expected "CHM" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathin gOnPrimaryWithTwoArgs() 599 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathin gOnPrimaryWithOneArg() 599 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathin gOnSecondary() 600 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::testPreventUpToParentPathin gOnTertiary() 600 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupDecideOnOrOffTests 601 Unit Testing of the phpDocumentor_setup's decideOnOrOff() method tests_phpDocumentorSetupCleanConverterNamePieceTests::testUserDefinedTertiaryValue () 600 Shows correct behavior for handling the perfect expected "b2evo.v-1-10" tertiary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrim aryXML() 599 Shows correct behavior for handling the perfect expected "XML" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrim aryPDF() 598 Shows correct behavior for handling the perfect expected "PDF" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimar yPDF() 597 Shows correct behavior for handling the perfect expected "PDF" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimar yHTML() 597 Shows correct behavior for handling the perfect expected "HTML" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithOneArgPrimar yXML() 597 Shows correct behavior for handling the perfect expected "XML" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrim aryCHM() 598 Shows correct behavior for handling the perfect expected "CHM" primary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalWithTwoArgsPrim aryHTML() 598 Shows correct behavior for handling the perfect expected "HTML" primary value tests_phpDocumentorTParserGetInlineTagsTests 608 Unit Testing of the phpDocumentorTParser's getInlineTags() method tests_phpDocumentorTParserGetInlineTagsTests::main() 609 Runs the test methods of this class. T_DOC_COMMENT 879

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

T_CONST T_FINAL T_IMPLEMENTS T_ML_COMMENT T_INTERFACE T_ABSTRACT Tokenizer.php XML/Beautifier.php tutorialLink tutorial link tests_phpDocumentorTParserTests::suite() tutorialLink::$section tutorialLink::$title tutorialLink::addLink() sets up the link tutorialLink::$type T_PRIVATE T_PROTECTED TUTORIAL_EVENT_NOEVENTS starting state TUTORIAL_EVENT_ITAG used when an {@inline tag} is found TUTORIAL_EVENT_OPENTAG used when an open <tag> is found TUTORIAL_EVENT_SINGLEQUOTE used when a <!-- comment --> is found Tokenizer.php Source code top.php Source code TUTORIAL_EVENT_ENTITY used when an &entity; is found TUTORIAL_EVENT_DOUBLEQUOTE used when a <!-- comment --> is found TutorialHighlightParser.inc Source Code Highlighting T_PUBLIC TUTORIAL_EVENT_ATTRIBUTE used when a <tag attr="attribute"> is found TUTORIAL_EVENT_CLOSETAG used when a close </tag> is found TUTORIAL_EVENT_COMMENT used when a <!-- comment --> is found tests_phpDocumentorTParserTests::main() tests_phpDocumentorTParserTests tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineSourceW henParsePrivateOn() Shows correct behavior for handling an inline source tag e.g. {at-source} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineSourceW henParsePrivateOff() Shows correct behavior for handling an inline source tag e.g. {at-source}

879 879 879 879 879 879 864 794 713 795 795 795 795 879 879 884 884 884 884 1313 1181 884 884 882 880 883 883 883 713 713 612

611

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineTutorialW henParsePrivateOff() 612 Shows correct behavior for handling an inline tutorial tag e.g. {at-tutorial path-to-pkgfile} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineTutorialW henParsePrivateOn() 612 Shows correct behavior for handling an inline tutorial tag e.g. {at-tutorial path-to-pkgfile} tokenizer_ext 637 top.php 628 phpDocumentor :: docBuilder Web Interface tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineLinkWhen ParsePrivateOn() 611 Shows correct behavior for handling an inline link tag e.g. {at-link URL link-text} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineLinkWhen ParsePrivateOff() 611 Shows correct behavior for handling an inline link tag e.g. {at-link URL link-text} tests_phpDocumentorTParserGetInlineTagsTests::tearDown() 609 Tears down the fixture, for example, close a network connection. tests_phpDocumentorTParserGetInlineTagsTests::setUp() 609 Sets up the fixture, for example, open a network connection. tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineExample WhenParsePrivateOff() 610 Shows correct behavior for handling an inline example tag e.g. {at-example path-to-file} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineExample WhenParsePrivateOn() 610 Shows correct behavior for handling an inline example tag e.g. {at-example path-to-file} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineInternalW henParsePrivateOn() 611 Shows correct behavior for handling an inline internal tag e.g. {at-internal blah-blah-blah} tests_phpDocumentorTParserGetInlineTagsTests::testShowCorrectBehaviorInlineInternalW henParsePrivateOff() 610 Shows correct behavior for handling an inline internal tag e.g. {at-internal blah-blah-blah} tests_HighlightParserTests 710 tests_HighlightParserTests::main() 710 tests_ParserPageTests::main() 712 tests_ParserPageTests 712 tests_ParserPageTests::suite() 712 tests_phpDocumentorSetupTests 712 tests_phpDocumentorSetupTests::suite() 713 tests_phpDocumentorSetupTests::main() 713 tests_ParserClassTests::suite() 712 tests_ParserClassTests::main() 711 tests_IntermediateParserTests 711 tests_HighlightParserTests::suite() 710 tests_IntermediateParserTests::main() 711 tests_IntermediateParserTests::suite() 711

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_ParserClassTests 711 tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryDocboo kPeardoc2() 591 Shows correct behavior for handling the perfect expected "DocBook/peardoc2" secondary value tests_phpDocumentorSetupCleanConverterNamePieceTests::testNormalSecondaryDefault( ) 591 Shows correct behavior for handling the perfect expected "default" secondary value testClass 552 testarraybug::$myarrayName1 552 test with no default, should be myarrayName1 testme 552 testme::$me 553 tests_HighlightParserGetInlineTagsTests 568 Unit Testing of the HighlightParser's getInlineTags() method test_541886 554 Test for bug #541886 testarraybug::$myarrayName 552 testarraybug::$arrayType1 552 test with no default, should be arrayType1 testContantBlah5 529 Short Desc 2.0 Test This is still the short desc Comment and so is this testContantBlah4 529 Short Desc 2.0 Test This is still the short desc Comment test 551 I'm a odd test case test2 551 tags demonstration, but this @version tag is ignored testarraybug::$arrayType 552 testarraybug 551 tests variable names with the word 'array' in them tests_HighlightParserGetInlineTagsTests::main() 568 Runs the test methods of this class. tests_HighlightParserGetInlineTagsTests::setUp() 568 Sets up the fixture, for example, open a network connection. tests_IntermediateParserAddPrivatePageTests::testShowCorrectBehaviorWhenPrivatePage ArrayIsEmpty() 571 Shows correct behavior for adding a private page object, tests_IntermediateParserAddPrivatePageTests::tearDown() 571 Tears down the fixture, for example, close a network connection. tests_IntermediateParserAddPrivatePageTests::testShowCorrectBehaviorWhenPrivatePage ArrayIsNotAlreadyEmpty() 571 Shows correct behavior for adding a private page object, tests_ParserClassGetSourceLocationTests 572 Unit Testing of the ParserClass's getSourceLocation() method tests_ParserClassGetSourceLocationTests::setUp() 572 Sets up the fixture, for example, open a network connection. tests_ParserClassGetSourceLocationTests::main() 572 Runs the test methods of this class. tests_IntermediateParserAddPrivatePageTests::setUp() 570 Sets up the fixture, for example, open a network connection.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_IntermediateParserAddPrivatePageTests::main() 570 Runs the test methods of this class. tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyA rg() 569 Shows correct behavior when called with no actual value tests_HighlightParserGetInlineTagsTests::tearDown() 569 Tears down the fixture, for example, close a network connection. tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyA rgAndFalse() 569 Shows correct behavior when called with no actual value tests_HighlightParserGetInlineTagsTests::testShowCorrectBehaviorWhenGivenOneEmptyA rgAndTrue() 569 Shows correct behavior when called with no actual value tests_IntermediateParserAddPrivatePageTests 570 Unit Testing of the IntermediateParser's addPrivatePage() method testContantBlah3 529 Short Desc 2.0 Test. This is the Extended Comment testContantBlah2 529 Short Desc 2.0 Test. This is the Extended Comment test_4412893() 489 I am using just the first line as my short desc test_4412892() 489 I started my short desc on the first line. test_4412894() 490 I am using a blank line to end my short desc test_4412895() 490 This is a test to see if the desc is fooled by 2.4 the short desc ends here. test_bug_567455_2() 490 This example is also really tricky test_bug_567455() 490 This example is really tricky test_441289() 489 This is a long comment which needs more than one line. test8() 489 This is a test case where i think things break test_441278() 487 Test description. test_441275() 486 This makes sure the basic element of bug 44127 is fixed test_441287() 488 sdesc test_4412872() 488 Check to see if we are stripping whitespace before the * test7() 489 This desc tries to fool the non period short desc systems test6() 489 This desc test_441433() 491 a second test.

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

test_443153() 492 test function test_escape() 525 tests test_eofquotes() 524 tests test_escape2() 525 test() 526 test2 was lost, isn't any more testContantBlah 529 Short Desc Test. This is the Extended Comment test2() 526 test_authoremail() 522 test function test_558031() 503 test_445305() 494 test_445298() 493 test function test_445820() 495 test function testie 497 testie thisisdumbbutworks 498 ! tests_ParserClassGetSourceLocationTests::tearDown() 572 Tears down the fixture, for example, close a network connection. tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeFalse() 573 Shows correct behavior when tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeFalse() 585 Include a ".." in an absolute, PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeTrue() 585 Show correct behavior when tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeNull() 585 Include a ".." in an absolute, PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeTrue() 585 Include a ".." in an absolute, PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeN ull() 586 Include a ".." in a relative, PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeF alse() 586 Include a ".." in a relative, PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeNull() 584 Show correct behavior when tests_ParserPageGetSourceLocationTests::testWhenPearLocationSetAndPearizeFalse() 584 Show correct behavior when tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAnd PearizeNull() 582 Include a ".." in an absolute, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAnd

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

PearizeFalse() 582 Include a ".." in an absolute, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAnd PearizeTrue() 583 Include a ".." in an absolute, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeFalse() 583 Include a ".." in a relative, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeTrue() 584 Include a ".." in a relative, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeNull() 583 Include a ".." in a relative, non-PEAR path, tests_ParserPageGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeTr ue() 586 Include a ".." in a relative, PEAR path, tests_phpDocumentorSetupCleanConverterNamePieceTests 587 Unit Testing of the phpDocumentor_setup's cleanConverterNamePiece() method tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvali dTertiaryA() 590 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvali dSecondary() 589 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleAndInvali dTertiaryB() 590 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValid PrimaryWithOneArg() 590 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValid Secondary() 591 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testExtremeExampleButValid PrimaryWithTwoArgs() 591 Extreme example of messy input... tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingO nTertiary() 589 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingO nSecondary() 589 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::setUp() 587 Sets up the fixture, for example, open a network connection. tests_phpDocumentorSetupCleanConverterNamePieceTests::main() 587 Runs the test methods of this class. tests_phpDocumentorSetupCleanConverterNamePieceTests::tearDown() 588 Tears down the fixture, for example, close a network connection. tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingO nPrimaryWithOneArg() 588 Verify no up-to-parent pathing is allowed... tests_phpDocumentorSetupCleanConverterNamePieceTests::testDoNotAllowTruePathingO

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

nPrimaryWithTwoArgs() 588 Verify no up-to-parent pathing is allowed... tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeTrue()582 Shows correct behavior when tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeNull() 581 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeFalse() 575 Include a ".." in a relative, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAn dPearizeTrue() 575 Include a ".." in an absolute, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeNull() 576 Include a ".." in a relative, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenNonPearRelativeLocationSetAndPeari zeTrue() 576 Include a ".." in a relative, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeNull() 577 Show correct behavior when tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeFalse() 576 Show correct behavior when tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAn dPearizeNull() 575 Include a ".." in an absolute, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetIncludingDotsAn dPearizeFalse() 575 Include a ".." in an absolute, non-PEAR path, tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeTrue() 573 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenLocationNotSetAndPearizeNull() 573 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeFalse () 574 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeNull() 574 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeTrue( ) 574 Shows correct behavior when tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetAndPearizeTrue() 577 Show correct behavior when tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeFalse() 577 Include a ".." in an absolute, PEAR path, tests_ParserPageGetSourceLocationTests::tearDown() 580 Tears down the fixture, for example, close a network connection. tests_ParserPageGetSourceLocationTests::setUp() 580 Sets up the fixture, for example, open a network connection. tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeFalse() 580 Shows correct behavior when tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeNull() 580 Shows correct behavior when

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

tests_ParserPageGetSourceLocationTests::testWhenNonPearLocationSetAndPearizeFalse( ) 581 Shows correct behavior when tests_ParserPageGetSourceLocationTests::testWhenLocationNotSetAndPearizeTrue() 581 Shows correct behavior when tests_ParserPageGetSourceLocationTests::main() 579 Runs the test methods of this class. tests_ParserPageGetSourceLocationTests 579 Unit Testing of the ParserPage's getSourceLocation() method tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeTrue() 578 Include a ".." in an absolute, PEAR path, tests_ParserClassGetSourceLocationTests::testWhenPearLocationSetIncludingDotsAndPea rizeNull() 578 Include a ".." in an absolute, PEAR path, tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeF alse() 578 Include a ".." in a relative, PEAR path, tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeN ull() 578 Include a ".." in a relative, PEAR path, tests_ParserClassGetSourceLocationTests::testWhenPearRelativeLocationSetAndPearizeT rue() 579 Include a ".." in a relative, PEAR path, test2_441275() 486 This tests some more advanced cases to make sure to handle them

U
utilities.php phpDocumentor :: docBuilder Web Interface Using the PDFParser XML templating language 625 131

V
varLink::$type varLink class variable link vdump_par() 796 795 626

W
WordParser::getSource() Retrieve source code for the last function/method WordParser::getPos() Returns the current pointer position, or 1 character after the end of the word WordParser::getBlock() Unused WordParser::getWord() Retrieve a token from the token list 929 929 929 930

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

WordParser::setPos() Set the internal cursor within the source code WordParser::setWhitespace() set parser to return or strip whitespace WordParser::setup() Initialize the WordParser WordParser::setSeperator() Sets the list of possible separator tokens WordParser::backupPos() Backup to the previous token so that it can be retrieved again in a new context. WordParser Retrieves tokens from source code for use by the Parser Writing templates for the CHMdefault Converter Writing templates for the PDFdefault Converter Writing a Converter, Methods Writing templates for the XMLDocBook Converter Writing templates for the HTMLSmarty Converter WordParser.inc a generic lexer Writing templates for the HTMLframes Converter Writing a New Converter

930 931 931 930 929

928 134 133 122 135 136 924 137 113

X
XMLDocBookpeardoc2Converter::convertVar() 307 Does nothing in this converter XMLDocBookpeardoc2Converter::endClass() 307 Writes out the template file of $class_data and unsets the template to save memory XMLDocBookpeardoc2Converter::exampleProgramExample() 307 Used to convert the {@example} inline tag in a docblock. XMLDocBookpeardoc2Converter::flushPackageXml() 308 XMLDocBookpeardoc2Converter::convertTutorial() 306 Convert tutorials for output XMLDocBookpeardoc2Converter::convertPage() 306 converts procedural pages for template output XMLDocBookpeardoc2Converter::convertInclude() 305 Converts include elements for template output XMLDocBookpeardoc2Converter::convertMethod() 305 Converts method for template output XMLDocBookpeardoc2Converter::convertPackagePage() 306 Does nothing - use tutorials for DocBook XMLDocBookpeardoc2Converter::formatIndex() 308 Does nothing XMLDocBookpeardoc2Converter::formatLeftIndex() 308 Creates package/lang/categoryname/packagename.xml for each package XMLDocBookpeardoc2Converter::generateFormattedInterfaceTrees() 309 returns a template-enabled array of interface inheritance trees XMLDocBookpeardoc2Converter::generatePkgElementIndex() 310 Generate alphabetical index of all elements by package and subpackage XMLDocBookpeardoc2Converter::generatePkgElementIndexes() 310 XMLDocBookpeardoc2Converter::getCData() 310

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

XMLDocBookpeardoc2Converter::generateFormattedClassTrees() 309 returns a template-enabled array of class trees XMLDocBookpeardoc2Converter::generateFormattedClassTree() 309 returns an array containing the class inheritance tree from the root object to the class XMLDocBookpeardoc2Converter::formatPkgIndex() 308 Does nothing XMLDocBookpeardoc2Converter::generateChildClassList() 308 returns a list of child classes XMLDocBookpeardoc2Converter::generateElementIndex() 308 does nothing XMLDocBookpeardoc2Converter::convertGlobal() 305 Converts global variables for template output XMLDocBookpeardoc2Converter::convertFunction() 305 Converts function for template output - does nothing in peardoc2! XMLDocBookpeardoc2Converter::$path 301 path of current page being converted XMLDocBookpeardoc2Converter::$processSpecialRoots 302 This converter knows about the new root tree processing XMLDocBookpeardoc2Converter::$sort_absolutely_everything 302 Pass elements by package, simplifies generation of package.xml/category.xml XMLDocBookpeardoc2Converter::$sort_page_contents_by_type 302 XMLDocBookConverter wants elements sorted by type as well as alphabetically XMLDocBookpeardoc2Converter::$page_dir 301 output directory for the current procedural page being processed XMLDocBookpeardoc2Converter::$page_data 301 template for the procedural page currently being processed XMLDocBookpeardoc2Converter::$packagexml 301 Contents of the packagename.xml file are stored in this template variable XMLDocBookpeardoc2Converter::$package_pages 301 array of converted package page names. XMLDocBookpeardoc2Converter::$page 301 name of current page being converted XMLDocBookpeardoc2Converter::$sourceloc 302 XMLDocBookpeardoc2Converter::$template_options 302 template options. Currently only 1 recognized option usepear XMLDocBookpeardoc2Converter::Br() 304 XMLDocBookpeardoc2Converter::convertClass() 304 Converts class for template output XMLDocBookpeardoc2Converter::convertDefine() 304 Converts defines for template output XMLDocBookpeardoc2Converter::ConvertErrorLog() 304 Create errors.html template file output XMLDocBookpeardoc2Converter::addSummaryToPackageXml() 303 XMLDocBookpeardoc2Converter::$_write_globals_xml 303 XMLDocBookpeardoc2Converter::$_peardoc2_constants 303 Constants, used for constants.tpl XMLDocBookpeardoc2Converter::$_peardoc2_globals 303 Global Variables, used for globals.tpl XMLDocBookpeardoc2Converter::$_write_constants_xml 303 XMLDocBookpeardoc2Converter::getClassLink() 310 XMLDocBookpeardoc2Converter::getDefineLink() 311 XMLDocBookpeardoc2Converter::writeFile() 317 Writes a file to target dir, beautify any .xml files first

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

XMLDocBookpeardoc2Converter::writeNewPPage() Does nothing XMLDocBookpeardoc2Converter::writeSource() Does nothing XMLpackagePageParser.inc Parser for XML DocBook-based phpDocumentor tutorials XMLDocBookpeardoc2Converter::writeExample() XMLDocBookpeardoc2Converter::wordwrap() XMLDocBookpeardoc2Converter::setTemplateDir() XMLDocBookpeardoc2Converter::type_adjust() XMLDocBookpeardoc2Converter::unmangle() XMLPackagePageParser Used to parse XML DocBook-based tutorials XMLPackagePageParser::$context XMLPackagePageParser::getParserEventName() debugging function XMLPackagePageParser::parse() Parse a new file XMLPackagePageParser::setupStates() setup the parser tokens, and the pushEvent/popEvent arrays XMLDocBookpeardoc2Converter.inc Source code XMLPackagePageParser::$refsect3id XMLPackagePageParser::$refsect2id XMLPackagePageParser::$eventHandlers XMLPackagePageParser::$pars XMLPackagePageParser::$refsect1id XMLDocBookpeardoc2Converter::returnSee() This function takes an abstractLink descendant and returns an html link XMLDocBookpeardoc2Converter::returnLink() XMLDocBookpeardoc2Converter::getMethodLink() XMLDocBookpeardoc2Converter::getPageLink() XMLDocBookpeardoc2Converter::getPageName() XMLDocBookpeardoc2Converter::getRootTree() return formatted class tree for the Class Trees page XMLDocBookpeardoc2Converter::getLink() do that stuff in $template_options XMLDocBookpeardoc2Converter::getId() Get the id value needed to allow linking XMLDocBookpeardoc2Converter::getExampleLink() XMLDocBookpeardoc2Converter::getFunctionLink() XMLDocBookpeardoc2Converter::getGlobalLink() XMLDocBookpeardoc2Converter::getSourceAnchor() Retrieve a Converter-specific anchor to a segment of a source code file parsed via a @filesource tag. XMLDocBookpeardoc2Converter::getTutorialId() XMLDocBookpeardoc2Converter::ProgramExample() XMLDocBookpeardoc2Converter::rcNatCmp() does a nat case sort on the specified second level value of the array XMLDocBookpeardoc2Converter::rcNatCmp1() does a nat case sort on the specified second level value of the array. XMLDocBookpeardoc2Converter::prepareDocBlock() XMLDocBookpeardoc2Converter::postProcess()

318 318 885 317 317 316 317 317 910 911 912 913 913 1140 911 911 911 911 911 316 316 313 313 313 313 312 312 311 311 312 314

314 315 316 316 315 315

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

XMLDocBookpeardoc2Converter::getVarLink() 314 XMLDocBookpeardoc2Converter::makeLeft() 315 XMLDocBookpeardoc2Converter::Output() 315 Generate the constants.xml, packagename.xml, and globals.xml files XMLDocBookpeardoc2Converter::$outputformat 301 XMLDocBookpeardoc2Converter::$name 301 XMLDocBookConverter::convertFunction() 286 Converts function for template output XMLDocBookConverter::convertGlobal() 287 Converts global variables for template output XMLDocBookConverter::convertInclude() 287 Converts include elements for template output XMLDocBookConverter::convertMethod() 287 Converts method for template output XMLDocBookConverter::ConvertErrorLog() 286 Create errors.html template file output XMLDocBookConverter::convertDefine() 286 Converts defines for template output XMLDocBookConverter::$sourceloc 284 XMLDocBookConverter::$template_options 284 template options. Currently only 1 recognized option usepear XMLDocBookConverter::convertClass() 285 Converts class for template output XMLDocBookConverter::convertPackagePage() 288 Converts package page and sets its package as used in $package_pages XMLDocBookConverter::convertPage() 288 converts procedural pages for template output XMLDocBookConverter::formatLeftIndex() 289 Generate indexes for li_package.html and classtree output files XMLDocBookConverter::formatPkgIndex() 290 HTMLdefaultConverter chooses to format both package indexes and the complete index here XMLDocBookConverter::generateElementIndex() 290 Generate alphabetical index of all elements XMLDocBookConverter::generateFormattedClassTree() 290 returns an array containing the class inheritance tree from the root object to the class XMLDocBookConverter::formatIndex() 289 HTMLdefaultConverter uses this function to format template index.html and packages.html XMLDocBookConverter::endPage() 289 Writes out the template file of $page_data and unsets the template to save memory XMLDocBookConverter::convertTutorial() 288 XMLDocBookConverter::convertVar() 288 Converts class variables for template output. XMLDocBookConverter::endClass() 289 Writes out the template file of $class_data and unsets the template to save memory XMLDocBookConverter::$sort_page_contents_by_type 284 XMLDocBookConverter wants elements sorted by type as well as alphabetically XMLDocBookConverter::$path 284 path of current page being converted XMLDocBookConverter::$class_data 282 template for the class currently being processed XMLDocBookConverter::$class_dir 282 output directory for the current class being processed

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

XMLDocBookConverter::$current 282 contains all of the template procedural page element loop data needed for the current template XMLDocBookConverter::$currentclass 282 contains all of the template class element loop data needed for the current template XMLDocBookConverter::$class 282 name of current class being converted XMLDocBookConverter::$category 282 peardoc2 Category XMLDocBookConverter.inc 281 XML output converter for DocBook. XMLDocBookConverter 281 XML DocBook converter. XMLDocBookConverter::$base_dir 281 target directory passed on the command-line. XMLDocBookConverter::$function_data 282 XMLDocBookConverter::$juststarted 283 controls formatting of parser informative output XMLDocBookConverter::$package_pages 283 array of converted package page names. XMLDocBookConverter::$page 284 name of current page being converted XMLDocBookConverter::$page_data 284 template for the procedural page currently being processed XMLDocBookConverter::$page_dir 284 output directory for the current procedural page being processed XMLDocBookConverter::$outputformat 283 XMLDocBookConverter::$name 283 XMLDocBookConverter::$leftindex 283 indexes of elements by package that need to be generated XMLDocBookConverter::$local 283 whether a @see is going to be in the $base_dir, or in a package/subpackage subdirectory of $base_dir XMLDocBookConverter::$method_data 283 XMLDocBookConverter::generateFormattedClassTrees() 291 returns a template-enabled array of class trees XMLDocBookConverter::generatePkgElementIndex() 291 Generate alphabetical index of all elements by package and subpackage XMLDocBookConverter::unmangle() 298 XMLDocBookConverter::writeNewPPage() 298 XMLDocBookpeardoc2Converter 298 XML DocBook converter. XMLDocBookpeardoc2Converter::$base_dir 299 target directory passed on the command-line. XMLDocBookConverter::type_adjust() 298 XMLDocBookConverter::SmartyInit() 298 XMLDocBookConverter::returnSee() 297 This function takes an abstractLink descendant and returns an html link XMLDocBookConverter::setTargetDir() 297 calls the converter setTargetDir, and then copies any template images and the stylesheet if they haven't been copied XMLDocBookConverter::setTemplateDir() 297 XMLDocBookpeardoc2Converter::$category 299

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

peardoc2 Category XMLDocBookpeardoc2Converter::$class 299 name of current class being converted XMLDocBookpeardoc2Converter::$juststarted 300 controls formatting of parser informative output XMLDocBookpeardoc2Converter::$leftindex 300 indexes of elements by package that need to be generated XMLDocBookpeardoc2Converter::$local 300 whether a @see is going to be in the $base_dir, or in a package/subpackage subdirectory of $base_dir XMLDocBookpeardoc2Converter::$method_data 300 XMLDocBookpeardoc2Converter::$function_data 300 XMLDocBookpeardoc2Converter::$currentclass 300 contains all of the template class element loop data needed for the current template XMLDocBookpeardoc2Converter::$class_data 299 template for the class currently being processed XMLDocBookpeardoc2Converter::$class_dir 299 output directory for the current class being processed XMLDocBookpeardoc2Converter::$current 300 contains all of the template procedural page element loop data needed for the current template XMLDocBookConverter::returnLink() 297 XMLDocBookConverter::rcNatCmp1() 296 does a nat case sort on the specified second level value of the array. XMLDocBookConverter::getGlobalLink() 293 XMLDocBookConverter::getId() 293 Get the id value needed to allow linking XMLDocBookConverter::getLink() 294 do that stuff in $template_options XMLDocBookConverter::getMethodLink() 294 XMLDocBookConverter::getFunctionLink() 293 XMLDocBookConverter::getDefineLink() 292 XMLDocBookConverter::generatePkgElementIndexes() 292 XMLDocBookConverter::getCData() 292 XMLDocBookConverter::getClassLink() 292 XMLDocBookConverter::getPageLink() 294 XMLDocBookConverter::getPageName() 295 XMLDocBookConverter::postProcess() 296 XMLDocBookConverter::prepareDocBlock() 296 XMLDocBookConverter::rcNatCmp() 296 does a nat case sort on the specified second level value of the array XMLDocBookConverter::Output() 296 This function is not used by HTMLdefaultConverter, but is required by Converter XMLDocBookConverter::makeLeft() 296 XMLDocBookConverter::getRootTree() 295 return formatted class tree for the Class Trees page XMLDocBookConverter::getTutorialId() 295 XMLDocBookConverter::getVarLink() 295 XMLDocBookpeardoc2Converter.inc 280 Outputs documentation in XML DocBook format, in the version expected by pear.php.net's documentation team

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

_
_IN_PHP5 637

Generated by phpDocumentor v1.4.3 http://www.phpdoc.org - http://pear.php.net/package/PhpDocumentor - http://www.sourceforge.net/projects/phpdocu

You might also like