Function Reflection

Decorates a ReflectionFunction. Allows setting and retrieving an alternate 'service' name (i.e., the name to be used when calling via a service), setting and retrieving the description (originally set using the docblock contents), retrieving the callback and callback type, retrieving additional method invocation arguments, and retrieving the method prototypes.

 Methods

Proxy reflection calls

__call(string $method, array $args) : mixed
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::__call()

Parameters

$method

string

$args

array

Exceptions

\Zend\Server\Reflection\Exception\BadMethodCallException

Returns

mixed

Constructor

__construct(\ReflectionFunctionAbstract $r, null | string $namespace, null | array $argv) 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::__construct()

Parameters

$namespace

nullstring

$argv

nullarray

Exceptions

\Zend\Server\Reflection\Exception\InvalidArgumentException
\Zend\Server\Reflection\Exception\RuntimeException

Retrieve configuration parameters

__get(string $key) : mixed
Inherited

Values are retrieved by key from $config. Returns null if no value found.

inherited_from \Zend\Server\Reflection\AbstractFunction::__get()

Parameters

$key

string

Returns

mixed

Set configuration parameters

__set(string $key, mixed $value) : void
Inherited

Values are stored by $key in $config.

inherited_from \Zend\Server\Reflection\AbstractFunction::__set()

Parameters

$key

string

$value

mixed

Wakeup from serialization

__wakeup() : void
Inherited

Reflection needs explicit instantiation to work correctly. Re-instantiate reflection object on wakeup.

inherited_from \Zend\Server\Reflection\AbstractFunction::__wakeup()

Retrieve the description

getDescription() : string
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::getDescription()

Returns

string

Retrieve additional invocation arguments

getInvokeArguments() : array
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::getInvokeArguments()

Returns

array

Return method's namespace

getNamespace() : string
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::getNamespace()

Returns

string

Retrieve all prototypes as array of {@link \Zend\Server\Reflection\Prototype}s

getPrototypes() : \Zend\Server\Reflection\Prototype[]
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::getPrototypes()

Returns

Set the description

setDescription(string $string) : void
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::setDescription()

Parameters

$string

string

Exceptions

\Zend\Server\Reflection\Exception\InvalidArgumentException

Set method's namespace

setNamespace(string $namespace) : void
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::setNamespace()

Parameters

$namespace

string

Exceptions

\Zend\Server\Reflection\Exception\InvalidArgumentException

Create signature node tree

addTree(\Zend\Server\Reflection\Node $parent, int $level) : void
Inherited

Recursive method to build the signature node tree. Increments through each array in $sigParams, adding every value of the next level to the current value (unless the current value is null).

inherited_from \Zend\Server\Reflection\AbstractFunction::addTree()

Parameters

$level

int

Build method signatures

buildSignatures(array $return, string $returnDesc, array $paramTypes, array $paramDesc) : array
Inherited

Builds method signatures using the array of return types and the array of parameters types

inherited_from \Zend\Server\Reflection\AbstractFunction::buildSignatures()

Parameters

$return

array

Array of return types

$returnDesc

string

Return value description

$paramTypes

array

Array of arguments (each an array of types)

$paramDesc

array

Array of parameter descriptions

Returns

array

Build the signature tree

buildTree() : array
Inherited

Builds a signature tree starting at the return values and descending through each method argument. Returns an array of \Zend\Server\Reflection\Nodes.

inherited_from \Zend\Server\Reflection\AbstractFunction::buildTree()

Returns

array

Use code reflection to create method signatures

reflect() : array
Inherited

Determines the method help/description text from the function DocBlock comment. Determines method signatures using a combination of ReflectionFunction and parsing of DocBlock @param and @return values.

inherited_from \Zend\Server\Reflection\AbstractFunction::reflect()

Exceptions

\Zend\Server\Reflection\Exception\RuntimeException

Returns

array

 Properties

 

Additional arguments to pass to method on invocation

$argv : array
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$argv
 

Declaring class (needed for when serialization occurs)

$class : string
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$class
 

Used to store extra configuration for the method (typically done by the server class, e.g., to indicate whether or not to instantiate a class).

$config : array
Inherited

Associative array; access is as properties via __get() and __set()

inherited_from \Zend\Server\Reflection\AbstractFunction::$$config
 

Function/method description

$description : string
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$description
 

Namespace with which to prefix function/method name

$namespace : string
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$namespace
 

Prototypes

$prototypes : array
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$prototypes
 

$reflection

$reflection : \ReflectionFunctionAbstract
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$reflection
 

$paramDesc

$paramDesc 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$paramDesc
 

$return

$return 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$return
 

$returnDesc

$returnDesc 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$returnDesc
 

$sigParams

$sigParams 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$sigParams
 

$sigParamsDepth

$sigParamsDepth 
Inherited

inherited_from \Zend\Server\Reflection\AbstractFunction::$$sigParamsDepth