PHP Class Zephir\FunctionCall

Call functions. By default functions are called in the PHP userland if an optimizer was not found or there is not a user-handler for it
Inheritance: extends Call
Mostrar archivo Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$_functionReflection
$_optimizerDirectories
$_optimizers

Public Methods

Method Description
addOptimizerDir ( string $directory ) Appends an optimizer directory to the directory list
compile ( zephir\Expression $expr, zephir\CompilationContext $compilationContext ) : zephir\CompiledExpression Compiles a function
functionExists ( string $functionName, zephir\CompilationContext $context ) : boolean Checks if a function exists or is a built-in Zephir function
getReflector ( string $funcName ) : ReflectionFunction Process the ReflectionFunction for the specified function name
isBuiltInFunction ( string $functionName ) Checks if the function is a built-in provided by Zephir

Protected Methods

Method Description
_callDynamic ( array $expression, zephir\CompilationContext $compilationContext ) : zephir\CompiledExpression
_callNormal ( array $expression, zephir\CompilationContext $compilationContext )
isReadOnly ( string $funcName, array $expression ) : boolean This method gets the reflection of a function to check if any of their parameters are passed by reference Built-in functions rarely change the parameters if they aren't passed by reference
markReferences ( string $funcName, array $parameters, zephir\CompilationContext $compilationContext, array &$references, array $expression ) : boolean Once the function processes the parameters we should mark specific parameters to be passed by reference
optimize ( string $funcName, array $expression, Call $call, zephir\CompilationContext $compilationContext ) Tries to find specific an specialized optimizer for function calls

Method Details

_callDynamic() protected method

protected _callDynamic ( array $expression, zephir\CompilationContext $compilationContext ) : zephir\CompiledExpression
$expression array
$compilationContext zephir\CompilationContext
return zephir\CompiledExpression

_callNormal() protected method

protected _callNormal ( array $expression, zephir\CompilationContext $compilationContext )
$expression array
$compilationContext zephir\CompilationContext

addOptimizerDir() public static method

Appends an optimizer directory to the directory list
public static addOptimizerDir ( string $directory )
$directory string

compile() public method

Compiles a function
public compile ( zephir\Expression $expr, zephir\CompilationContext $compilationContext ) : zephir\CompiledExpression
$expr zephir\Expression
$compilationContext zephir\CompilationContext
return zephir\CompiledExpression

functionExists() public method

Checks if a function exists or is a built-in Zephir function
public functionExists ( string $functionName, zephir\CompilationContext $context ) : boolean
$functionName string
$context zephir\CompilationContext
return boolean

getReflector() public method

Process the ReflectionFunction for the specified function name
public getReflector ( string $funcName ) : ReflectionFunction
$funcName string
return ReflectionFunction

isBuiltInFunction() public method

Checks if the function is a built-in provided by Zephir
public isBuiltInFunction ( string $functionName )
$functionName string

isReadOnly() protected method

This method gets the reflection of a function to check if any of their parameters are passed by reference Built-in functions rarely change the parameters if they aren't passed by reference
protected isReadOnly ( string $funcName, array $expression ) : boolean
$funcName string
$expression array
return boolean

markReferences() protected method

Once the function processes the parameters we should mark specific parameters to be passed by reference
protected markReferences ( string $funcName, array $parameters, zephir\CompilationContext $compilationContext, array &$references, array $expression ) : boolean
$funcName string
$parameters array
$compilationContext zephir\CompilationContext
$references array
$expression array
return boolean

optimize() protected method

Tries to find specific an specialized optimizer for function calls
protected optimize ( string $funcName, array $expression, Call $call, zephir\CompilationContext $compilationContext )
$funcName string
$expression array
$call Call
$compilationContext zephir\CompilationContext

Property Details

$_functionReflection protected_oe static_oe property

protected static $_functionReflection

$_optimizerDirectories protected_oe static_oe property

protected static $_optimizerDirectories

$_optimizers protected_oe static_oe property

protected static $_optimizers