From 31759cb3b3090c1b9d68ac54f2d2622584003563 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 15 Dec 2008 08:37:09 +0000 Subject: Delete trunk/kohana and trunk/modules/unit_test in preparation to refresh them properly from the vendor branch. --- 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 1d6feae4..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