deprecate Controller::flash() and adjust some other deprecation messages.

This commit is contained in:
euromark 2013-08-12 12:51:12 +02:00
parent 64b694011e
commit b09dc7213a
7 changed files with 18 additions and 17 deletions

View file

@ -156,7 +156,7 @@ class AclComponent extends Component {
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @deprecated
* @deprecated Will be removed in 3.0.
*/
public function grant($aro, $aco, $action = "*") {
trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING);
@ -170,7 +170,7 @@ class AclComponent extends Component {
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @deprecated
* @deprecated Will be removed in 3.0.
*/
public function revoke($aro, $aco, $action = "*") {
trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING);

View file

@ -705,7 +705,7 @@ class Controller extends Object implements CakeEventListener {
*
* @return array Associative array of the HTTP codes as keys, and the message
* strings as values, or null of the given $code does not exist.
* @deprecated Use CakeResponse::httpCodes();
* @deprecated Since 2.4. Will be removed in 3.0. Use CakeResponse::httpCodes().
*/
public function httpCodes($code = null) {
return $this->response->httpCodes($code);
@ -820,7 +820,7 @@ class Controller extends Object implements CakeEventListener {
*
* @param string $status The header message that is being set.
* @return void
* @deprecated Use CakeResponse::header()
* @deprecated Will be removed in 3.0. Use CakeResponse::header().
*/
public function header($status) {
$this->response->header($status);
@ -978,7 +978,7 @@ class Controller extends Object implements CakeEventListener {
*
* @return void
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
* @deprecated Use CakeResponse::disableCache()
* @deprecated Will be removed in 3.0. Use CakeResponse::disableCache().
*/
public function disableCache() {
$this->response->disableCache();
@ -995,6 +995,7 @@ class Controller extends Object implements CakeEventListener {
* @param string $layout Layout you want to use, defaults to 'flash'
* @return void
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash
* @deprecated Will be removed in 3.0. Use Session::setFlash().
*/
public function flash($message, $url, $pause = 1, $layout = 'flash') {
$this->autoRender = false;
@ -1015,7 +1016,7 @@ class Controller extends Object implements CakeEventListener {
* @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be
* included in the returned conditions
* @return array An array of model conditions
* @deprecated Will be removed in 3.0
* @deprecated Will be removed in 3.0.
*/
public function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) {
if (!is_array($data) || empty($data)) {
@ -1072,7 +1073,7 @@ class Controller extends Object implements CakeEventListener {
* @param array $whitelist List of allowed options for paging
* @return array Model query results
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
* @deprecated Use PaginatorComponent instead
* @deprecated Will be removed in 3.0. Use PaginatorComponent instead.
*/
public function paginate($object = null, $scope = array(), $whitelist = array()) {
return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
@ -1146,7 +1147,7 @@ class Controller extends Object implements CakeEventListener {
* @param string $method
* @return boolean
* @see Controller::beforeScaffold()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _beforeScaffold($method) {
return $this->beforeScaffold($method);
@ -1169,7 +1170,7 @@ class Controller extends Object implements CakeEventListener {
* @param string $method
* @return boolean
* @see Controller::afterScaffoldSave()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _afterScaffoldSave($method) {
return $this->afterScaffoldSave($method);
@ -1192,7 +1193,7 @@ class Controller extends Object implements CakeEventListener {
* @param string $method
* @return boolean
* @see Controller::afterScaffoldSaveError()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _afterScaffoldSaveError($method) {
return $this->afterScaffoldSaveError($method);
@ -1217,7 +1218,7 @@ class Controller extends Object implements CakeEventListener {
* @param string $method
* @return boolean
* @see Controller::scaffoldError()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _scaffoldError($method) {
return $this->scaffoldError($method);

View file

@ -76,7 +76,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
* @param string $behavior
* @param array $config
* @return void
* @deprecated Replaced with load()
* @deprecated Will be removed in 3.0. Replaced with load().
*/
public function attach($behavior, $config = array()) {
return $this->load($behavior, $config);
@ -206,7 +206,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
*
* @param string $name Name of behavior
* @return void
* @deprecated Use unload instead.
* @deprecated Will be removed in 3.0. Use unload instead.
*/
public function detach($name) {
return $this->unload($name);

View file

@ -203,7 +203,7 @@ class Debugger {
* @param integer $line Line that triggered the error
* @param array $context Context
* @return boolean true if error was handled
* @deprecated This function is superseded by Debugger::outputError()
* @deprecated Will be removed in 3.0. This function is superseded by Debugger::outputError().
*/
public static function showError($code, $description, $file = null, $line = null, $context = null) {
$self = Debugger::getInstance();

View file

@ -272,7 +272,7 @@ abstract class ObjectCollection {
* returns an array of currently-attached objects
* @return mixed If $name is specified, returns the boolean status of the corresponding object.
* Otherwise, returns an array of all attached objects.
* @deprecated Use loaded instead.
* @deprecated Will be removed in 3.0. Use loaded instead.
*/
public function attached($name = null) {
return $this->loaded($name);

View file

@ -180,7 +180,7 @@ class Security {
* @param string $text Encrypted string to decrypt, normal string to encrypt
* @param string $key Key to use
* @return string Encrypted/Decrypted string
* @deprecated This method will be removed in 3.x
* @deprecated Will be removed in 3.0.
*/
public static function cipher($text, $key) {
if (empty($key)) {

View file

@ -391,7 +391,7 @@ if (!function_exists('cache')) {
* @param mixed $expires A valid strtotime string when the data expires.
* @param string $target The target of the cached data; either 'cache' or 'public'.
* @return mixed The contents of the temporary file.
* @deprecated Please use Cache::write() instead
* @deprecated Will be removed in 3.0. Please use Cache::write() instead.
*/
function cache($path, $data = null, $expires = '+1 day', $target = 'cache') {
if (Configure::read('Cache.disable')) {