lithium\core\Libraries::applyFilter()

public static method

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

void

Source

	public static function applyFilter($method, $filter = null) {
		if (!isset(static::$_methodFilters[$method])) {
			static::$_methodFilters[$method] = array();
		}
		static::$_methodFilters[$method][] = $filter;
	}