Apply a closure to a method of the current object instance.

Parameters

  • mixed $method 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.
  • closure $filter The closure that is used to filter the method(s).

Returns

void

Source

						public function applyFilter($method, $filter = null) {
		foreach ((array) $method as $m) {
			if (!isset($this->_methodFilters[$m])) {
				$this->_methodFilters[$m] = array();
			}
			$this->_methodFilters[$m][] = $filter;
		}
	}