Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/PHPDoc/analyser/PhpdocClassAnalyser.php
PEAR Repository - PHPDoc

PhpdocClassAnalyser

PhpdocObject
   |
  +-- PhpdocAnalyser
     |
    +-- PhpdocClassAnalyser

Analyses a class.

 

private class PhpdocClassAnalyser extends PhpdocAnalyser

Analyses a class.

AuthorsUlf Wendel <ulf.wendel@phpdoc.de>
Version1.0beta

 

Methods inherited from PhpdocAnalyser

add_number_suffix, checkargdocs

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Public Method Summary

void

setClasses(array $classes, string $baseclass)

Sets the class data and the name of the baseclass.
mixed

getClass()

Returns an analysed class or false if there're no classes any more.
boolean

updateAccessReturnElements(string $classname, string $type)

Updates @access and @return for certain elements.

Private Method Summary

void

findUndocumented(string $classname)

Looks for undocumented elements in a certain class
void

checkFunctionArgs(string $classname)

Checks the function documentation of a certain class.
void

buildBottomUpClasslist(string $classname)

Builds an internal list of all classes.
boolean

inheritClassElements(string $classname)

Adds inherited elements to a class.
boolean

addInheritedElements(string $classname, string $parentclass, string $type)

Adds inherited functions, variables, constants or included files to a class.
boolean

isUndocumented(string $classname, string $type, string $elementname)

Returns true if the requested element is undocumented and false if it's documented.
void

updateAccessElements(string $classname, string $type)

Updates @access tags.
void

analyse()

Starts the analysing of the raw parsing data.
void

updateBrothersSisters()

Handles @brother and @sister.
void

updateBrotherSisterElements( $classname, $type)

Updates certain elements that use @brother and @sister.
void

updateAccessReturn()

Updates the @access and @return tag values.

Fields inherited from PhpdocAnalyser

$flag_get

Fields inherited from PhpdocObject

$err, $flag_output, $application, $warn

Private Field Summary

array

$classes

Class data.
string

$baseclass

Name of the baseclass of the given classes.
array

$classlist

Ordered list of all classes.
array

$notinherited

List of not inherited elements.
array

$undocumentedFields

Puuuh - findUndocumented() needs this.

Public Method Details

setClasses

public void setClasses( array $classes, string $baseclass )

  Sets the class data and the name of the baseclass.

Parameter
array $classes
Raw class data from the parser
string $baseclass
Name of the baseclass of the given classes
Returns void


getClass

public mixed getClass( )

  Returns an analysed class or false if there're no classes any more.

Returns mixed

False if there no classes anymore, otherwise an array with
the data of the class.


updateAccessReturnElements

public boolean updateAccessReturnElements( string $classname, string $type )

  Updates

Parameter
string $classname
Classname
string $type
Element type: functions (, variables, consts, uses)
Returns boolean $ok

See Also updateAccessReturn()

Private Method Details

findUndocumented

private void findUndocumented( string $classname )

  Looks for undocumented elements in a certain class

Parameter
string $classname
Classname
Returns void


checkFunctionArgs

private void checkFunctionArgs( string $classname )

  Checks the function documentation of a certain class.

Parameter
string $classname
Classname
Returns void


buildBottomUpClasslist

private void buildBottomUpClasslist( string $classname )

  Builds an internal list of all classes.

The analyser needs an ordered list of all classes
to inherit information effective.

Parameter
string $classname
Name of the class that starts the recursive build process.
Returns void

See Also $classlist

inheritClassElements

private boolean inheritClassElements( string $classname )

  Adds inherited elements to a class.

Parameter
string $classname
Classname
Returns boolean $ok

See Also $classes, $notinherited, addInheritedElements()

addInheritedElements

private boolean addInheritedElements( string $classname, string $parentclass, string $type )

  Adds inherited functions, variables, constants or included files to a class.

Parameter
string $classname
Name of the class that inherits the informations.
string $parentclass
Name of the parentclass
string $type
Type of elements inherited: "functions", "variables", "uses", "consts"
Returns boolean $ok

See Also $classes, $notinherited, isUndocumented()

isUndocumented

private boolean isUndocumented( string $classname, string $type, string $elementname )

  Returns true if the requested element is undocumented and false if it's documented.

The function checks if the element might inherit documentation
from any parentclass.

Parameter
string $classname
Name of the class of the element
string $type
Element type: functions, variables, uses, consts.
string $elementname
Element name
Returns boolean $ok


updateAccessElements

private void updateAccessElements( string $classname, string $type )

  Updates

Parameter
string $classname
Classname
string $type
Element type: functions, variables, consts (, uses)
Returns void

See Also updateAccessReturnElements()

analyse

private void analyse( )

  Starts the analysing of the raw parsing data.

Returns void


updateBrothersSisters

private void updateBrothersSisters( )

  Handles

Returns void

See Also u::u

updateBrotherSisterElements

private void updateBrotherSisterElements( $classname, $type )

  Updates certain elements that use

Parameter
$classname
$type
Returns void


updateAccessReturn

private void updateAccessReturn( )

  Updates the

Returns void

See Also updateAccessReturnElements(), updateAccessElements()

Private Field Details

$classes

private array $classes

>>array()<<


$baseclass

private string $baseclass

>>""<<


$classlist

private array $classlist

>>array()<<


$notinherited

private array $notinherited

>>array( "class" => array( "name" => true, "extends" => true, "undoc" => true, "variables" => true, "functions" => true, "consts" => true, "uses" => true, "filename" => true, "subclasses"=> true, "path" => true, "baseclass" => true, "abstract" => true ), "functions" => array( "name" => true, "undoc" => true, "inherited" => true, "overrides" => true, "abstract" => true ), "variables" => array( "name" => true, "undoc" => true, "inherited" => true, "overrides" => true, "abstract" => true ), "uses" => array( "name" => true, "undoc" => true, "inherited" => true, "overrides" => true ), "consts" => array( "name" => true, "undoc" => true, "inherited" => true, "overrides" => true ) )<<


$undocumentedFields

private array $undocumentedFields

>>array( "functions" => "function", "variables" => "variable", "uses" => "included file", "consts" => "constant" )<<

See Also findUndocumented()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta