Adding warnings to newly deprecated methods.

This commit is contained in:
mark_story 2009-08-31 22:31:36 -04:00
parent bd350e95b6
commit 046d7c75d0
4 changed files with 11 additions and 0 deletions

View file

@ -280,6 +280,7 @@ class CookieComponent extends Object {
* @deprecated use delete()
**/
function del($key) {
trigger_error('Deprecated method, use CookieComponent::delete instead', E_USER_WARNING);
return $this->delete($key);
}

View file

@ -170,6 +170,7 @@ class SessionComponent extends CakeSession {
* @deprecated use delete
*/
function del($name) {
trigger_error('Deprecated method, use SessionComponent::delete instead', E_USER_WARNING);
if ($this->__active === true) {
$this->__start();
return parent::del($name);

View file

@ -729,6 +729,7 @@ class Folder extends Object {
* @access public
*/
function ls($sort = true, $exceptions = false) {
trigger_error('Deprecated method, use Folder::read instead', E_USER_WARNING);
return $this->read($sort, $exceptions);
}
@ -740,6 +741,7 @@ class Folder extends Object {
* @access public
*/
function mkdir($pathname, $mode = 0755) {
trigger_error('Deprecated method, use Folder::create instead', E_USER_WARNING);
return $this->create($pathname, $mode);
}
@ -751,6 +753,7 @@ class Folder extends Object {
* @access public
*/
function cp($options) {
trigger_error('Deprecated method, use Folder::copy instead', E_USER_WARNING);
return $this->copy($options);
}
@ -762,6 +765,7 @@ class Folder extends Object {
* @access public
*/
function mv($options) {
trigger_error('Deprecated method, use Folder::move instead', E_USER_WARNING);
return $this->move($options);
}
@ -773,6 +777,7 @@ class Folder extends Object {
* @access public
*/
function rm($path) {
trigger_error('Deprecated method, use Folder::delete instead', E_USER_WARNING);
return $this->delete($path);
}

View file

@ -502,6 +502,7 @@ class Model extends Overloadable {
* @deprecated Use Model::bindModel() instead.
*/
function bind($model, $options = array(), $permanent = true) {
trigger_error('Deprecated method, use Model::bindModel instead', E_USER_WARNING);
if (!is_array($model)) {
$model = array($model => $options);
}
@ -1745,6 +1746,7 @@ class Model extends Overloadable {
* @link http://book.cakephp.org/view/691/remove
*/
function remove($id = null, $cascade = true) {
trigger_error('Deprecated method, use Model::delete instead', E_USER_WARNING);
return $this->delete($id, $cascade);
}
@ -1798,6 +1800,7 @@ class Model extends Overloadable {
* @deprecated
*/
function del($id = null, $cascade = true) {
trigger_error('Deprecated method, use Model::delete instead', E_USER_WARNING);
return $this->delete($id, $cascade);
}
@ -2613,6 +2616,7 @@ class Model extends Overloadable {
* @deprecated
*/
function getDisplayField() {
trigger_error('Deprecated method, use Model::$displayField instead', E_USER_WARNING);
return $this->displayField;
}