Skip to content

Commit

Permalink
deprecate Controller::flash() and adjust some other deprecation messa…
Browse files Browse the repository at this point in the history
…ges.
  • Loading branch information
euromark committed Aug 12, 2013
1 parent 64b6940 commit b09dc72
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/AclComponent.php
Expand Up @@ -156,7 +156,7 @@ public function inherit($aro, $aco, $action = "*") {
* @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);
Expand All @@ -170,7 +170,7 @@ public function grant($aro, $aco, $action = "*") {
* @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);
Expand Down
19 changes: 10 additions & 9 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -705,7 +705,7 @@ public function shutdownProcess() {
*
* @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);
Expand Down Expand Up @@ -820,7 +820,7 @@ protected function _parseBeforeRedirect($response, $url, $status, $exit) {
*
* @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);
Expand Down Expand Up @@ -978,7 +978,7 @@ public function referer($default = null, $local = false) {
*
* @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();
Expand All @@ -995,6 +995,7 @@ public function disableCache() {
* @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;
Expand All @@ -1015,7 +1016,7 @@ public function flash($message, $url, $pause = 1, $layout = 'flash') {
* @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)) {
Expand Down Expand Up @@ -1072,7 +1073,7 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
* @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);
Expand Down Expand Up @@ -1146,7 +1147,7 @@ public function beforeScaffold($method) {
* @param string $method
* @return boolean
* @see Controller::beforeScaffold()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _beforeScaffold($method) {
return $this->beforeScaffold($method);
Expand All @@ -1169,7 +1170,7 @@ public function afterScaffoldSave($method) {
* @param string $method
* @return boolean
* @see Controller::afterScaffoldSave()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _afterScaffoldSave($method) {
return $this->afterScaffoldSave($method);
Expand All @@ -1192,7 +1193,7 @@ public function afterScaffoldSaveError($method) {
* @param string $method
* @return boolean
* @see Controller::afterScaffoldSaveError()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _afterScaffoldSaveError($method) {
return $this->afterScaffoldSaveError($method);
Expand All @@ -1217,7 +1218,7 @@ public function scaffoldError($method) {
* @param string $method
* @return boolean
* @see Controller::scaffoldError()
* @deprecated
* @deprecated Will be removed in 3.0.
*/
protected function _scaffoldError($method) {
return $this->scaffoldError($method);
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/BehaviorCollection.php
Expand Up @@ -76,7 +76,7 @@ public function init($modelName, $behaviors = array()) {
* @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);
Expand Down Expand Up @@ -206,7 +206,7 @@ public function unload($name) {
*
* @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);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Debugger.php
Expand Up @@ -203,7 +203,7 @@ public static function log($var, $level = LOG_DEBUG) {
* @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();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/ObjectCollection.php
Expand Up @@ -272,7 +272,7 @@ public function enabled($name = null) {
* 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);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Security.php
Expand Up @@ -180,7 +180,7 @@ public static function setCost($cost) {
* @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)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/basics.php
Expand Up @@ -391,7 +391,7 @@ function env($key) {
* @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')) {
Expand Down

0 comments on commit b09dc72

Please sign in to comment.