public runCallbacks ( string $name, $recursive = true ) | ||
$name | string | The name of the callback (i.e `'beforeEach'` or `'afterEach'`). |
public function runCallbacks($name, $recursive = true)
{
$instances = $recursive ? $this->_parents(true) : [$this];
foreach ($instances as $instance) {
foreach ($instance->_callbacks[$name] as $closure) {
$closure($this);
}
}
}