lithium\core\Libraries::applyFilter PHP Method

applyFilter() public static method

Apply a closure to a method in Libraries.
See also: lithium\util\collection\Filters
public static applyFilter ( string $method, Closure $filter = null ) : void
$method string The name of the method to apply the closure to.
$filter Closure The closure that is used to filter the method.
return void
    public static function applyFilter($method, $filter = null)
    {
        if (!isset(static::$_methodFilters[$method])) {
            static::$_methodFilters[$method] = array();
        }
        static::$_methodFilters[$method][] = $filter;
    }