PHP Interface Pinq\Parsing\IFunctionDeclaration

Author: Elliot Levin ([email protected])
Show file Open project: timetoogo/pinq

Public Methods

Method Description
getClass ( ) : string | null Gets the class which the function was declared within.
getClosureNestingLevel ( ) : integer Gets the amount of closures function which the function was declared within.
getFunction ( ) : string | null Gets the function which the function was declared within.
getNamespace ( ) : string | null Gets the namespace which the function was declared within.
getTrait ( ) : string | null Gets the trait which the function was declared within.
isWithinClass ( ) : boolean Whether the function was declared within a class.
isWithinFunction ( ) : boolean Whether the function was declared within a function.
isWithinNamespace ( ) : boolean Whether the function was declared within a namespace.
isWithinTrait ( ) : boolean Whether the function was declared within a trait.

Method Details

getClass() public method

Null if not defined within a class.
public getClass ( ) : string | null
return string | null

getClosureNestingLevel() public method

Gets the amount of closures function which the function was declared within.
public getClosureNestingLevel ( ) : integer
return integer

getFunction() public method

Null if not defined within a function.
public getFunction ( ) : string | null
return string | null

getNamespace() public method

Null if in the global namespace.
public getNamespace ( ) : string | null
return string | null

getTrait() public method

Null if not defined within a trait.
public getTrait ( ) : string | null
return string | null

isWithinClass() public method

Whether the function was declared within a class.
public isWithinClass ( ) : boolean
return boolean

isWithinFunction() public method

Whether the function was declared within a function.
public isWithinFunction ( ) : boolean
return boolean

isWithinNamespace() public method

Whether the function was declared within a namespace.
public isWithinNamespace ( ) : boolean
return boolean

isWithinTrait() public method

Whether the function was declared within a trait.
public isWithinTrait ( ) : boolean
return boolean