PHP Class phpDoctor

Afficher le fichier Open project: peej/phpdoctor Class Usage Examples

Méthodes publiques

Свойство Type Description
$_constants boolean Parse out global constants.
$_currentFilename str The path and filename of the current file being parsed.
$_defaultPackage str Package to use for elements not in a package.
$_doclet str Specifies the name of the class that starts the doclet used in generating the documentation.
$_docletPath str Specifies the path to the doclet starting class file. If the doclet class is not in a file named <_doclet>/<_doclet>.php then this path should include the filename of the class file also.
$_files str[] Array of files to parse.
$_formatter str Specifies the name of the text formatter class.
$_formatterPath str Specifies the path to the formatters to use.
$_globals boolean Parse out global variables.
$_ignore str[] Array of files not to parse.
$_ignorePackageTags boolean Ignore any package tags in the source code.
$_options str[] Options from config file.
$_overview str Overview file. The "source" file that contains the overview documentation.
$_packageCommentDir str Package comment directory. if set, PHPDoctor will look in this directory for package comment files. Otherwise it looks in a directory named after the package ala Javadoc.
$_path str The path PHPDoctor is running from.
$_pearCompat boolean Whether or not to use PEAR compatibility mode for first sentence tags.
$_private boolean Parse all classes and members.
$_protected boolean Parse protected and public classes and members.
$_public boolean Parse only public classes and members.
$_quiet boolean Turn off all output other than warnings and errors.
$_sourceIndex
$_sourcePath str Directory containing files for parsing.
$_startTime integer The time in microseconds at the start of execution.
$_subdirs boolean Traverse sub-directories
$_tagletPath str Specifies the path to the taglets to use.
$_tree boolean Display class tree.
$_useClassPathAsPackage boolean Use the filesystem path of the class as the package it should be in.
$_verbose boolean Turn on verbose output.
$_version str The version of PHPDoctor.

Méthodes publiques

Méthode Description
_buildFileList ( $files, $dir ) Build a complete list of file to parse. Expand out wildcards and traverse directories if asked to.
_getNext ( &$tokens, $key, $whatToGet, $maxDist ) : str Get next token of a certain type from token array
_getPrev ( &$tokens, $key, $whatToGet ) : str Get previous token of a certain type from token array
_getProgramElementName ( &$tokens, $key ) : str Get the next program element name from the token list
_getTime ( ) : integer Get the current time in microseconds.
_hasPrivateName ( $name ) : boolean Does the given element name conform to the format that is used for private elements?
_includeElements ( &$element ) : boolean Is an element private and we are including private elements, or element is protected and we are including protected elements.
_mergeArrays ( $one, $two ) : mixed[] Recursively merge two arrays into a single array. This differs from the PHP function array_merge_recursive as it replaces values with the same index from the first array with items from the second.
_mergeSuperClassData ( &$rootDoc, $parent = NULL )
createTag ( $name, $text, &$data, &$root ) : Tag Create a tag. This method first tries to load a Taglet for the given tag name, upon failing it then tries to load a PHPDoctor specialised tag class (e.g. classes/paramtag.php), if it still has not found a tag class it uses the standard tag class.
defaultPackage ( ) : str Return the default package.
docletPath ( ) : str Return the path PHPDoctor is running from.
error ( $msg ) Write an error message to standard error.
execute ( &$rootDoc ) : boolean Loads and runs the doclet.
fixPath ( $path ) : str Add a trailing slash to a path if it does not have one.
getFormatter ( ) : TextFormatter Creates the formatter and returns it.
getOption ( $option ) : str Get a configuration option.
makeAbsolutePath ( $path, $prefix ) : str Turn path into an absolute path using the given prefix?
message ( $msg ) Write a message to standard output.
options ( ) : str[] Return a reference to the set options.
parse ( ) : RootDoc Parse files into tokens and create rootDoc.
phpDoctor ( $config = 'default.ini' ) Constructor
processDocComment ( $comment, &$root ) : mixed[] Process a doc comment into a doc tag array.
sourcePath ( ) : str Return the source path.
verbose ( $msg ) Write a message to standard output.
version ( ) : str Return the version of PHPDoctor.
warning ( $msg ) Write a warning message to standard error.

Method Details

_buildFileList() public méthode

Build a complete list of file to parse. Expand out wildcards and traverse directories if asked to.
public _buildFileList ( $files, $dir )

_getNext() public méthode

Get next token of a certain type from token array
public _getNext ( &$tokens, $key, $whatToGet, $maxDist ) : str
Résultat str Value of found token

_getPrev() public méthode

Get previous token of a certain type from token array
public _getPrev ( &$tokens, $key, $whatToGet ) : str
Résultat str Value of found token

_getProgramElementName() public méthode

Get the next program element name from the token list
public _getProgramElementName ( &$tokens, $key ) : str
Résultat str

_getTime() public méthode

Get the current time in microseconds.
public _getTime ( ) : integer
Résultat integer

_hasPrivateName() public méthode

Does the given element name conform to the format that is used for private elements?
public _hasPrivateName ( $name ) : boolean
Résultat boolean

_includeElements() public méthode

Is an element private and we are including private elements, or element is protected and we are including protected elements.
public _includeElements ( &$element ) : boolean
Résultat boolean

_mergeArrays() public méthode

Recursively merge two arrays into a single array. This differs from the PHP function array_merge_recursive as it replaces values with the same index from the first array with items from the second.
public _mergeArrays ( $one, $two ) : mixed[]
Résultat mixed[] Merged array

_mergeSuperClassData() public méthode

public _mergeSuperClassData ( &$rootDoc, $parent = NULL )

createTag() public méthode

Create a tag. This method first tries to load a Taglet for the given tag name, upon failing it then tries to load a PHPDoctor specialised tag class (e.g. classes/paramtag.php), if it still has not found a tag class it uses the standard tag class.
public createTag ( $name, $text, &$data, &$root ) : Tag
Résultat Tag

defaultPackage() public méthode

Return the default package.
public defaultPackage ( ) : str
Résultat str

docletPath() public méthode

Return the path PHPDoctor is running from.
public docletPath ( ) : str
Résultat str

error() public méthode

Write an error message to standard error.
public error ( $msg )

execute() public méthode

Loads and runs the doclet.
public execute ( &$rootDoc ) : boolean
Résultat boolean

fixPath() public méthode

Add a trailing slash to a path if it does not have one.
public fixPath ( $path ) : str
Résultat str

getFormatter() public méthode

Creates the formatter and returns it.
public getFormatter ( ) : TextFormatter
Résultat TextFormatter

getOption() public méthode

Get a configuration option.
public getOption ( $option ) : str
Résultat str

makeAbsolutePath() public méthode

Turn path into an absolute path using the given prefix?
public makeAbsolutePath ( $path, $prefix ) : str
Résultat str

message() public méthode

Write a message to standard output.
public message ( $msg )

options() public méthode

Return a reference to the set options.
public options ( ) : str[]
Résultat str[] An array of strings.

parse() public méthode

Parse files into tokens and create rootDoc.
public parse ( ) : RootDoc
Résultat RootDoc

phpDoctor() public méthode

Constructor
public phpDoctor ( $config = 'default.ini' )

processDocComment() public méthode

Process a doc comment into a doc tag array.
public processDocComment ( $comment, &$root ) : mixed[]
Résultat mixed[] Array of doc comment data

sourcePath() public méthode

Return the source path.
public sourcePath ( ) : str
Résultat str

verbose() public méthode

Write a message to standard output.
public verbose ( $msg )

version() public méthode

Return the version of PHPDoctor.
public version ( ) : str
Résultat str

warning() public méthode

Write a warning message to standard error.
public warning ( $msg )

Property Details

$_constants public_oe property

Parse out global constants.
public bool $_constants
Résultat boolean

$_currentFilename public_oe property

The path and filename of the current file being parsed.
public str $_currentFilename
Résultat str

$_defaultPackage public_oe property

Package to use for elements not in a package.
public str $_defaultPackage
Résultat str

$_doclet public_oe property

Specifies the name of the class that starts the doclet used in generating the documentation.
public str $_doclet
Résultat str

$_docletPath public_oe property

Specifies the path to the doclet starting class file. If the doclet class is not in a file named <_doclet>/<_doclet>.php then this path should include the filename of the class file also.
public str $_docletPath
Résultat str

$_files public_oe property

Array of files to parse.
public str[] $_files
Résultat str[]

$_formatter public_oe property

Specifies the name of the text formatter class.
public str $_formatter
Résultat str

$_formatterPath public_oe property

Specifies the path to the formatters to use.
public str $_formatterPath
Résultat str

$_globals public_oe property

Parse out global variables.
public bool $_globals
Résultat boolean

$_ignore public_oe property

Array of files not to parse.
public str[] $_ignore
Résultat str[]

$_ignorePackageTags public_oe property

Ignore any package tags in the source code.
public bool $_ignorePackageTags
Résultat boolean

$_options public_oe property

Options from config file.
public str[] $_options
Résultat str[]

$_overview public_oe property

Overview file. The "source" file that contains the overview documentation.
public str $_overview
Résultat str

$_packageCommentDir public_oe property

Package comment directory. if set, PHPDoctor will look in this directory for package comment files. Otherwise it looks in a directory named after the package ala Javadoc.
public str $_packageCommentDir
Résultat str

$_path public_oe property

The path PHPDoctor is running from.
public str $_path
Résultat str

$_pearCompat public_oe property

Whether or not to use PEAR compatibility mode for first sentence tags.
public bool $_pearCompat
Résultat boolean

$_private public_oe property

Parse all classes and members.
public bool $_private
Résultat boolean

$_protected public_oe property

Parse protected and public classes and members.
public bool $_protected
Résultat boolean

$_public public_oe property

Parse only public classes and members.
public bool $_public
Résultat boolean

$_quiet public_oe property

Turn off all output other than warnings and errors.
public bool $_quiet
Résultat boolean

$_sourceIndex public_oe property

public $_sourceIndex

$_sourcePath public_oe property

Directory containing files for parsing.
public str $_sourcePath
Résultat str

$_startTime public_oe property

The time in microseconds at the start of execution.
public int $_startTime
Résultat integer

$_subdirs public_oe property

Traverse sub-directories
public bool $_subdirs
Résultat boolean

$_tagletPath public_oe property

Specifies the path to the taglets to use.
public str $_tagletPath
Résultat str

$_tree public_oe property

Display class tree.
public bool $_tree
Résultat boolean

$_useClassPathAsPackage public_oe property

Use the filesystem path of the class as the package it should be in.
public bool $_useClassPathAsPackage
Résultat boolean

$_verbose public_oe property

Turn on verbose output.
public bool $_verbose
Résultat boolean

$_version public_oe property

The version of PHPDoctor.
public str $_version
Résultat str