Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//analyser/PhpdocClassAnalyser.php
PHPDOC 2000/12/03 - PHPDoc

PhpdocClassAnalyser

PhpdocObject
   |
  +-- PhpdocAnalyser
     |
    +-- PhpdocClassAnalyser

Analyses a class.

 

private class PhpdocClassAnalyser extends PhpdocAnalyser

Analyses a class.

AuthorsUlf Wendel <ulf.wendel@phpdoc.de>
Version$Id: $

 

Methods inherited from PhpdocAnalyser

addnumbersuffix, copybrothersisterfields, checkseeelement, 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.

Private Method Summary

void

findUndocumented(string $classname)

Looks for undocumented elements in a certain classWarning: documentation is missing.
void

checkFunctionArgs(string $classname)

Checks the function documentation of a certain class.Warning: documentation is missing.
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.
boolean

updateBrotherSisterElements(string $classname, string $type)

Warning: documentation is missing.
boolean

updateAccessReturnElements(string $classname, string $type)

Updates access and return for certain elements.Warning: documentation is missing.
void

updateAccessElements(string $classname, string $type)

Updates access tags.Warning: documentation is missing.
void

checkSeeElements(array $elements, string $classname, string $eltype)

Checks see references in the given element array (functions, variables...)
void

buildElementlist(string $classname)

Builds an array with all elements of a class and saves it to $this->elementlist.Warning: documentation is missing.
void

analyse()

Starts the analysing of the raw parsing data.Warning: documentation is missing.
void

updateBrothersSisters()

Handles brother and sister.Warning: documentation is missing.
void

updateAccessReturn()

Updates the access and return tag values.Warning: documentation is missing.
void

checkSee()

Checks all see references in the given classes/modulegroup.Warning: documentation is missing.

Fields inherited from PhpdocAnalyser

$flag_get, $elementlist

Fields inherited from PhpdocObject

$err, $application, $warn, $flag_output

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
class data from the parser
string $baseclass
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.


Private Method Details

findUndocumented

private void findUndocumented( string $classname )

  Looks for undocumented elements in a certain class

Warning: documentation is missing.

Parameter
string $classname
Returns void


checkFunctionArgs

private void checkFunctionArgs( string $classname )

  Checks the function documentation of a certain class.

Warning: documentation is missing.

Parameter
string $classname
Returns void


buildBottomUpClasslist

private void buildBottomUpClasslist( string $classname )

  Builds an internal list of all classes.
The analyser needs an ordered list of all classesto inherit information effective.

Parameter
string $classname
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
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
of the class that inherits the informations.
string $parentclass
of the parentclass
string $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 documentationfrom any parentclass.

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


updateBrotherSisterElements

private boolean updateBrotherSisterElements( string $classname, string $type )

 

Warning: documentation is missing.

Parameter
string $classname
of the class to update
string $type
: functions, variables, ...
Returns boolean


updateAccessReturnElements

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

  Updates access and return for certain elements.
This function should only be used to update functions.Functions that have the same name as the class (constructors)get return void and access public. Functions withoutaccess get access public and functions without return getreturn void.

Warning: documentation is missing.

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

See Also updateAccessReturn()

updateAccessElements

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

  Updates access tags.

Warning: documentation is missing.

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

See Also updateAccessReturnElements()

checkSeeElements

private void checkSeeElements( array $elements, string $classname, string $eltype )

  Checks see references in the given element array (functions, variables...)
References to variables and functions within the same class get checked.It the references element does not exist, the reference gets deleted anda doc warning gets generated.

Parameter
array $elements
of functions, variables,...
string $classname
of the class that contains the given elements.
string $eltype
: functions, variables, consts, uses.
Returns void


buildElementlist

private void buildElementlist( string $classname )

  Builds an array with all elements of a class and saves it to $this->elementlist.

Warning: documentation is missing.

Parameter
string $classname
of the class to scan.
Returns void

See Also $elementlist

analyse

private void analyse( )

  Starts the analysing of the raw parsing data.

Warning: documentation is missing.

Returns void


updateBrothersSisters

private void updateBrothersSisters( )

  Handles brother and sister.

Warning: documentation is missing.

Returns void

See Also updateBrotherSisterElements()

updateAccessReturn

private void updateAccessReturn( )

  Updates the access and return tag values.

Warning: documentation is missing.

Returns void

See Also updateAccessReturnElements(), updateAccessElements()

checkSee

private void checkSee( )

  Checks all see references in the given classes/modulegroup.

Warning: documentation is missing.

Returns void


Private Field Details

$classes

private array $classes

>>array()<<

Class data.


$baseclass

private string $baseclass

>>""<<

Name of the baseclass of the given classes.


$classlist

private array $classlist

>>array()<<

Ordered list of all classes.


$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 ) )<<

List of not inherited elements.


$undocumentedFields

private array $undocumentedFields

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

Puuuh - findUndocumented() needs this.

See Also findUndocumented()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta