Permalink
Browse files

Adding warnings to newly deprecated methods.

  • Loading branch information...
1 parent bd350e9 commit 046d7c75d0e9debd9221b41b62cbc634bff57a15 @markstory markstory committed Sep 1, 2009
@@ -280,6 +280,7 @@ function read($key = null) {
* @deprecated use delete()
**/
function del($key) {
+ trigger_error('Deprecated method, use CookieComponent::delete instead', E_USER_WARNING);
return $this->delete($key);
}
@@ -170,6 +170,7 @@ function read($name = null) {
* @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
@@ -729,6 +729,7 @@ function errors() {
* @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 @@ function ls($sort = true, $exceptions = false) {
* @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 @@ function mkdir($pathname, $mode = 0755) {
* @access public
*/
function cp($options) {
+ trigger_error('Deprecated method, use Folder::copy instead', E_USER_WARNING);
return $this->copy($options);
}
@@ -762,6 +765,7 @@ function cp($options) {
* @access public
*/
function mv($options) {
+ trigger_error('Deprecated method, use Folder::move instead', E_USER_WARNING);
return $this->move($options);
}
@@ -773,6 +777,7 @@ function mv($options) {
* @access public
*/
function rm($path) {
+ trigger_error('Deprecated method, use Folder::delete instead', E_USER_WARNING);
return $this->delete($path);
}
@@ -502,6 +502,7 @@ function call__($method, $params) {
* @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 @@ function updateAll($fields, $conditions = true) {
* @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 @@ function delete($id = null, $cascade = true) {
* @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 @@ function isForeignKey($field) {
* @deprecated
*/
function getDisplayField() {
+ trigger_error('Deprecated method, use Model::$displayField instead', E_USER_WARNING);
return $this->displayField;
}

0 comments on commit 046d7c7

Please sign in to comment.