From 94f19ef4b8a3f71d4d42201896c7d227f2f2bd6c Mon Sep 17 00:00:00 2001 From: euromark Date: Fri, 16 Nov 2012 12:19:23 +0100 Subject: [PATCH] deprecate attached() --- lib/Cake/Utility/ObjectCollection.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index fbf577662..2b76a1601 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -271,6 +271,19 @@ abstract class ObjectCollection { * returns an array of currently-attached behaviors * @return mixed If $name is specified, returns the boolean status of the corresponding behavior. * Otherwise, returns an array of all attached behaviors. + * @deprecated Use loaded instead. + */ + public function attached($name = null) { + return $this->loaded($name); + } + +/** + * Gets the list of loaded objects, or, whether the given object is loaded + * + * @param string $name Optional. The name of the behavior to check the status of. If omitted, + * returns an array of currently-loaded behaviors + * @return mixed If $name is specified, returns the boolean status of the corresponding behavior. + * Otherwise, returns an array of all loaded behaviors. */ public function loaded($name = null) { if (!empty($name)) {