Свойство | Тип | Описание | |
---|---|---|---|
$_methodFilters | Stores the closures that represent the method filters. They are indexed by called class. | ||
$_parents | array | Keeps a cached list of each class' inheritance tree. |
Метод | Описание | |
---|---|---|
applyFilter ( mixed $method, Closure $filter = null ) : void | Apply a closure to a method of the current static object. | |
invokeMethod ( string $method, array $params = [] ) : mixed | Calls a method on this object with the given parameters. Provides an OO wrapper for forward_static_call_array(), and improves performance by using straight method calls in most cases. | |
respondsTo ( string $method, boolean $internal = false ) : boolean | Determines if a given method can be called. |
Метод | Описание | |
---|---|---|
_filter ( string $method, array $params, Closure $callback, array $filters = [] ) : mixed | Executes a set of filters against a method by taking a method's main implementation as a callback, and iteratively wrapping the filters around it. | |
_instance ( string | object $name, array $options = [] ) : object | Returns an instance of a class with given config. The name could be a key from the classes array, a fully namespaced class name, or an object. Typically this method is used in _init to create the dependencies used in the current class. | |
_parents ( ) : array | Gets and caches an array of the parent methods of a class. | |
_stop ( integer | string $status ) : void | Exit immediately. Primarily used for overrides during testing. |
protected static _filter ( string $method, array $params, Closure $callback, array $filters = [] ) : mixed | ||
$method | string | The name of the method being executed. |
$params | array | An associative array containing all the parameters passed into the method. |
$callback | Closure | The method's implementation, wrapped in a closure. |
$filters | array | Additional filters to apply to the method for this call only. |
Результат | mixed |
public static applyFilter ( mixed $method, Closure $filter = null ) : void | ||
$method | mixed | The name of the method to apply the closure to. Can either be a single method name as a string, or an array of method names. Can also be false to remove all filters on the current object. |
$filter | Closure | The closure that is used to filter the method(s), can also be false to remove all the current filters for the given method. |
Результат | void |
public static respondsTo ( string $method, boolean $internal = false ) : boolean | ||
$method | string | Name of the method. |
$internal | boolean | Provide `true` to perform check from inside the class/object. When `false` checks also for public visibility; defaults to `false`. |
Результат | boolean | Returns `true` if the method can be called, `false` otherwise. |
protected static $_methodFilters |
protected static array $_parents | ||
Результат | array |