PHP Trait Bolt\Asset\CallableInvokerTrait

Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Protected Methods

Method Description
invokeCallable ( callable $callback, array $callbackArguments ) : string Get the return value from the callable.

Private Methods

Method Description
getArguments ( callable $callback, array $callbackArguments ) : array Get an ordered list of arguments.
getParameters ( callable $callback ) : ReflectionParamete\ReflectionParameter[] Get the callback function's parameters.

Method Details

invokeCallable() protected method

Parameters can be can handled in three ways: - null - Nothing passed to the callback - Indexed array - Value of each element will be passed to function in order - Associative array - Key names will attempt to match to the callable function variable names
protected invokeCallable ( callable $callback, array $callbackArguments ) : string
$callback callable
$callbackArguments array
return string