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
This commit is contained in:
Ingo Schommer 2011-04-28 23:02:10 +12:00
parent cd6115b85b
commit 4bd97cfd79

View File

@ -22,11 +22,6 @@ class Director {
*/ */
private static $current_page; private static $current_page;
/**
* @deprecated 2.4
*/
static $siteMode;
static $alternateBaseFolder; static $alternateBaseFolder;
static $alternateBaseURL; static $alternateBaseURL;
@ -37,12 +32,6 @@ class Director {
static protected $environment_type; static protected $environment_type;
/**
* @deprecated 2.4
*/
static protected $callbacks;
/** /**
* Add URL matching rules to the Director. * Add URL matching rules to the Director.
* *
@ -325,13 +314,6 @@ class Director {
self::$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. * Turns the given URL into an absolute URL.
* @todo Document how relativeToSiteBase works * @todo Document how relativeToSiteBase works
@ -689,49 +671,6 @@ class Director {
return (php_sapi_name() == "cli"); 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 // Environment type methods
//////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////