Class parserFunction

(line 321)

Description

parserBase
   |
   --parserElement
      |
      --parserFunction

Located in File: /phpDocumentor/ParserElements.inc



Classes extended from parserFunction:
parserMethod

Class Variables

Summary:
array $globals
array $params
mixed $source
array $statics
string $type

$globals = false (line 351)

Data type : array

global declarations parsed from function definition
  • var: - Format: array(globalname1, globalname2,....)

$params = false (line 335)

Data type : array

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

$returnsreference = false (line 345)

Data type : boolean

Function returns a reference to an element, instead of a value

set to true if function is declared as:

  1.  function &func(...

$source = '' (line 358)

Data type : mixed

$statics = false (line 356)

Data type : array

static variable declarations parsed from function definition
  • var: - Format: array(array('name' => staticvar1,'val' => '' or default val of staticvar1),...)

$type = 'function' (line 327)

Data type : string

Overrides: Array

Type is used by many functions to skip the hassle of if phpDocumentor_get_class($blah) == 'parserBlah'
  • var: - always 'function'

Class Constants

Summary:

Method Detail

Summary:
void addGlobals (array $globals)
void addParam (string $name, string $value, [boolean $has_default = true], [null|string $typehint = null])
void addSource (string|array $source)
void addStatics (array $static, array $vals)
mixed getConflicts (Converter &$c)
string getFunctionCall ()
array getIntricateFunctionCall ( $converter,  $paramtags)
mixed getLink (Converter $c, [string $text = false], [ $returnobj = false])
string getParam (string $name)
boolean getReturnsReference ()
string|array getSource ()
boolean hasSource ()
array listGlobals ()
array listParams ()
array listStatics ()

Method addGlobals (line 433)

void addGlobals( array $globals)

Add all "global $var, $var2" declarations to this function

Parameters

  • array $globals: Format: array(globalname1, globalname2,....)

Info

Method addParam (line 366)

void addParam( string $name, string $value, [boolean $has_default = true], [null|string $typehint = null])

Overridden in child classes as:

parserMethod::addParam()

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

Info

Method addSource (line 379)

void addSource( string|array $source)

Set the source code. Always array in PHP 4.3.0+

Parameters

  • string|array $source:

Info

Method addStatics (line 443)

void addStatics( array $static, array $vals)

Add all "static $var, $var2 = 6" declarations to this 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,...)

Info

Method getConflicts (line 422)

mixed getConflicts( Converter &$c)

Returns all functions in other packages that have the same name as this function

Parameters

Info

Method getFunctionCall (line 580)

string getFunctionCall( )

Overridden in child classes as:

parserMethod::getFunctionCall()
adds "constructor " to start of function call if $isConstructor is true

Get a human-friendly description of the function call

takes declaration like:

  1.  /** @returns string ... {rest of docblock}
  2.  function &func($param1, $param2 = 6,
  3.                 $param3 = array('20',9 => "heroo"))
  4.  {...}
and returns: string &func( $param1, [$param2 = 6], [$param3 = array('20',9 => "heroo")] )

Info

  • return - stylized function declaration

Method getIntricateFunctionCall (line 621)

array getIntricateFunctionCall( $converter, $paramtags)

Overridden in child classes as:

parserMethod::getIntricateFunctionCall()

Like getFunctionCall(), but has no English or pre-determined formatting.

Much more flexible.

Parameters

  • $converter:
  • $paramtags:

Info

  • return - Format:
    1.  array('name' => function name,
    2.        'returnsref' => boolean if declared as "function &name()"
    3.        'params' => array('type' => data type of parameter,
    4.                          'description' => from @param tag,
    5.                          'name' => variable name,
    6.                          'default' => default value if any))
  • see - parserFunction::getFunctionCall()

Method getLink (line 408)

mixed getLink( Converter $c, [string $text = false], [ $returnobj = false])

Overridden in child classes as:

parserMethod::getLink()
quick way to link to this element

quick way to link to this element

Parameters

  • Converter $c:
  • string $text: text to display for the link or false for default text
  • $returnobj:

Info

  • return - converter-specific link to this function

Method getParam (line 464)

string getParam( string $name)

Parameters

  • string $name:

Info

  • return - default value of param $name

Method getReturnsReference (line 561)

boolean getReturnsReference( )

Info

Method getSource (line 397)

string|array getSource( )

Info

  • return - source code ready for highlighting

Method hasSource (line 388)

boolean hasSource( )

Determine whether the source code has been requested via {@source}

Info

Method listGlobals (line 515)

array listGlobals( )

Info

  • return - format: array(array(index, globalname),...)

Method listParams (line 480)

array listParams( )

Info

  • return - format: array(array(paramname, default value),...)

Method listStatics (line 534)

array listStatics( )

Info

  • return - format: array(array(static var name, static var default value),...)

Method setReturnsReference (line 553)

void setReturnsReference( )

sets $returnsreference to true

Info

Inherited Variables

Inherited Class Variable Summary

Inherited From Class parserElement

parserElement::$conflicts -

parserElement::$docblock -

parserElement::$endlinenumber - line number on file where this element stops

parserElement::$file - location of this element (filename)

parserElement::$linenumber - Line number in the source on which this element appears

parserElement::$name - name of this element, or include type if element is a parserInclude

parserElement::$path - full path location of this element (filename)

Inherited From Class parserBase

parserBase::$value - set to different things by its descendants

Inherited Methods

Inherited Method Summary

Inherited From Class parserElement

parserElement::getEndLineNumber() -

parserElement::getFile() -

parserElement::getLineNumber() -

parserElement::getName() -

parserElement::getPackage() -

parserElement::getPath() -

parserElement::setDocBlock() -

parserElement::setEndLineNumber() - Sets the ending line number of elements

parserElement::setFile() -

parserElement::setLineNumber() - Set starting line number

parserElement::setName() -

parserElement::setPath() -


Inherited From Class parserBase

parserBase::getType() - gets the type

parserBase::getValue() - gets the value

parserBase::setValue() - sets the given value



Documentation generated on Mon, 05 Dec 2011 21:28:43 -0600 by phpDocumentor 1.4.4