From 12fe58d997d2066dc362fd393a18b4e5da190513 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 15:11:53 -0700 Subject: Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. --- kohana/core/Event.php | 232 -------------------------------------------------- 1 file changed, 232 deletions(-) delete mode 100644 kohana/core/Event.php (limited to 'kohana/core/Event.php') diff --git a/kohana/core/Event.php b/kohana/core/Event.php deleted file mode 100644 index 22a9f69d..00000000 --- a/kohana/core/Event.php +++ /dev/null @@ -1,232 +0,0 @@ - $event_callback) - { - if ($callback === $event_callback) - { - unset(self::$events[$name][$i]); - } - } - } - } - - /** - * Execute all of the callbacks attached to an event. - * - * @param string event name - * @param array data can be processed as Event::$data by the callbacks - * @return void - */ - public static function run($name, & $data = NULL) - { - if ( ! empty(self::$events[$name])) - { - // So callbacks can access Event::$data - self::$data =& $data; - $callbacks = self::get($name); - - foreach ($callbacks as $callback) - { - call_user_func($callback); - } - - // Do this to prevent data from getting 'stuck' - $clear_data = ''; - self::$data =& $clear_data; - } - - // The event has been run! - self::$has_run[$name] = $name; - } - - /** - * Check if a given event has been run. - * - * @param string event name - * @return boolean - */ - public static function has_run($name) - { - return isset(self::$has_run[$name]); - } - -} // End Event \ No newline at end of file -- cgit v1.2.3