public function processHooks($hook) { if (count($hook) > 0) { foreach ($hook as $f) { if (is_callable($f)) { $f(); } } } }