/** * Sets (or if param is not specified, resets) the current singleton instance * * @param Core_Model_Hooks_Dispatcher $instance - OPTIONAL * @return Core_Model_Hooks_Dispatcher */ public static function setInstance(Engine_Hooks_Dispatcher $instance = null) { if (null === $instance) { $instance = new self(); } self::$_instance = $instance; return self::$_instance; }