mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
deprecate attached()
This commit is contained in:
parent
8acdb129b2
commit
94f19ef4b8
1 changed files with 13 additions and 0 deletions
|
@ -271,6 +271,19 @@ abstract class ObjectCollection {
|
||||||
* returns an array of currently-attached behaviors
|
* returns an array of currently-attached behaviors
|
||||||
* @return mixed If $name is specified, returns the boolean status of the corresponding behavior.
|
* @return mixed If $name is specified, returns the boolean status of the corresponding behavior.
|
||||||
* Otherwise, returns an array of all attached behaviors.
|
* 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) {
|
public function loaded($name = null) {
|
||||||
if (!empty($name)) {
|
if (!empty($name)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue