lithium\core\Libraries::applyFilter()
Apply a closure to a method in Libraries
.
Parameters
-
string
$method
The name of the method to apply the closure to.
-
\Closure
$filter
The closure that is used to filter the method.
Returns
voidSource
public static function applyFilter($method, $filter = null) {
if (!isset(static::$_methodFilters[$method])) {
static::$_methodFilters[$method] = array();
}
static::$_methodFilters[$method][] = $filter;
}