phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]

Class: parserFunction

Source Location: /PhpDocumentor-1.5.0a1/phpDocumentor/ParserElements.inc

Class Overview

parserBase
   |
   --parserElement
      |
      --parserFunction



Author(s):

Version:

  • $Id$

Copyright:

  • 2002-2008 Gregory Beaver

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 326]
  • Author: Greg Beaver <cellog@php.net>
  • Version: $Id$
  • Copyright: 2002-2008 Gregory Beaver
  • Since: 1.0rc1


[ Top ]


Class Variables

$globals =  false

[line 356]

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

Type:   array


[ Top ]

$params =  false

[line 340]

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

Type:   array


[ Top ]

$returnsreference =  false

[line 350]

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

set to true if function is declared as:

  1.  function &func(...


Type:   boolean


[ Top ]

$source =  ''

[line 363]


Type:   mixed


[ Top ]

$statics =  false

[line 361]

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

Type:   array


[ Top ]

$type =  'function'

[line 332]

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

Type:   string
Overrides:   Array


[ Top ]



Method Detail

addGlobals   [line 438]

void addGlobals( array $globals)

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

Parameters:

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

[ Top ]

addParam   [line 371]

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

[ Top ]

addSource   [line 384]

void addSource( string|array $source)

Set the source code. Always array in PHP 4.3.0+

Parameters:

string|array   $source   — 

[ Top ]

addStatics   [line 448]

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,...)

[ Top ]

getConflicts   [line 427]

mixed getConflicts( Converter &$c)

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

Parameters:

Converter   &$c   — 

[ Top ]

getFunctionCall   [line 585]

string getFunctionCall( )

Get a human-friendly description of the function call

takes declaration like:

    and returns: string &func( $param1, [$param2 = 6], [$param3 = array('20',9 => "heroo")] )

    • Return: stylized function declaration

    Overridden in child classes as:

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

    [ Top ]

    getIntricateFunctionCall   [line 626]

    array getIntricateFunctionCall( $converter, $paramtags)

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

    Much more flexible.

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

    Overridden in child classes as:

    parserMethod::getIntricateFunctionCall()

    Parameters:

       $converter   — 
       $paramtags   — 

    [ Top ]

    getLink   [line 413]

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

    quick way to link to this element
    • Return: converter-specific link to this function

    Overridden in child classes as:

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

    Parameters:

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

    [ Top ]

    getParam   [line 469]

    string getParam( string $name)

    • Return: default value of param $name

    Parameters:

    string   $name   — 

    [ Top ]

    getReturnsReference   [line 566]

    boolean getReturnsReference( )


    [ Top ]

    getSource   [line 402]

    string|array getSource( )

    • Return: source code ready for highlighting

    [ Top ]

    hasSource   [line 393]

    boolean hasSource( )

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

    [ Top ]

    listGlobals   [line 520]

    array listGlobals( )

    • Return: format: array(array(index, globalname),...)

    [ Top ]

    listParams   [line 485]

    array listParams( )

    • Return: format: array(array(paramname, default value),...)

    [ Top ]

    listStatics   [line 539]

    array listStatics( )

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

    [ Top ]

    setReturnsReference   [line 558]

    void setReturnsReference( )

    sets $returnsreference to true

    [ Top ]


    Documentation generated on Mon, 11 Mar 2019 15:50:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.