From 4bd97cfd79c5e943dab6b30e1fcc82c38a65cf58 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 28 Apr 2011 23:02:10 +1200 Subject: [PATCH] API CHANGE Removed Director::get_site_mode() and set_site_mode(), functionality no longer required API CHANGE Removed Director::add_callback(), use custom extension on controller instead API CHANGE Removed Director::currentPage(), use get_current_page() instead --- control/Director.php | 63 +------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/control/Director.php b/control/Director.php index 472152feb..fb76363e6 100755 --- a/control/Director.php +++ b/control/Director.php @@ -21,12 +21,7 @@ class Director { * @var SiteTree */ private static $current_page; - - /** - * @deprecated 2.4 - */ - static $siteMode; - + static $alternateBaseFolder; static $alternateBaseURL; @@ -37,12 +32,6 @@ class Director { static protected $environment_type; - /** - * @deprecated 2.4 - */ - static protected $callbacks; - - /** * Add URL matching rules to the Director. * @@ -324,13 +313,6 @@ class Director { public static function set_current_page($page) { self::$current_page = $page; } - - /** - * @deprecated 2.4 Use {@link Director::get_current_page()}. - */ - static function currentPage() { - return self::get_current_page(); - } /** * Turns the given URL into an absolute URL. @@ -689,49 +671,6 @@ class Director { return (php_sapi_name() == "cli"); } - //////////////////////////////////////////////////////////////////////////////////////////// - // Site mode methods - //////////////////////////////////////////////////////////////////////////////////////////// - - /** - * @deprecated 2.4 - */ - static function set_site_mode($mode) { - user_error ( - 'Director::set_site_mode() is deprecated as the functionality is no longer neccesary.', E_USER_NOTICE - ); - - Director::$siteMode = $mode; - - if(isset(self::$callbacks[$mode])) { - foreach(self::$callbacks[$mode] as $extension) { - call_user_func($extension); - } - } - } - - /** - * @deprecated 2.4 - */ - static function get_site_mode() { - user_error ( - 'Director::set_site_mode() is deprecated as the functionality is no longer neccesary.', E_USER_NOTICE - ); - - return Director::$siteMode; - } - - /** - * @deprecated 2.4 Use a custom extension on your controller. - */ - static function add_callback($function, $mode = 'site') { - user_error ( - 'Director::add_callback() is deprecated, please use a custom extension on your controller', E_USER_NOTICE - ); - - self::$callbacks[$mode][] = $function; - } - //////////////////////////////////////////////////////////////////////////////////////////// // Environment type methods ////////////////////////////////////////////////////////////////////////////////////////////