hookInstances[] = $instance; } } elseif ($instances instanceof IHook) { $this->hookInstances[] = $instances; } return true; } public function fireHooks() { foreach ($this->hookInstances as $instance) { /** * Fire off the add hooks method of each instance stored in cache */ $instance->addHooks(); } } }