/** * Turn off/unbind/remove $listener from an event * * @param string $eventName * @param callable $listener * * @return void */ public function off($eventName, $listener) { EventManager::off($eventName, $listener); }
/** * Plant the seed of life into Kisma! * * @param array $options * * @return bool */ public static function conceive($options = array()) { // Set any passed in options... if (is_callable($options)) { $options = call_user_func($options); } // Set any application-level options passed in static::$_options = Option::merge(static::$_options, $options); // Register our faux-destructor if (false === ($_conceived = static::get(CoreSettings::CONCEPTION))) { \register_shutdown_function(function ($eventName = KismaEvents::DEATH) { \Kisma::__sleep(); EventManager::trigger($eventName); }); // Try and detect the framework being used... Detector::framework(); // We done baby! static::set(CoreSettings::CONCEPTION, true); if (null === static::get(CoreSettings::AUTO_LOADER) && class_exists('\\ComposerAutoloaderInit', false)) { static::set(CoreSettings::AUTO_LOADER, \ComposerAutoloaderInit::getLoader()); } // And let the world know we're alive EventManager::trigger(KismaEvents::BIRTH); } // Load any session data... static::__wakeup(); return $_conceived; }