Inheritance diagram for BehaviorCollection:

Public Member Functions | |
| attach ($behavior, $config=array()) | |
| attached ($name=null) | |
| detach ($name) | |
| disable ($name) | |
| dispatchMethod (&$model, $method, $params=array(), $strict=false) | |
| enable ($name) | |
| enabled ($name=null) | |
| init ($modelName, $behaviors=array()) | |
| methods () | |
| trigger (&$model, $callback, $params=array(), $options=array()) | |
Public Attributes | |
| $__mappedMethods = array() | |
| $__methods = array() | |
| $_attached = array() | |
| $_disabled = array() | |
| $modelName = null | |
Definition at line 207 of file behavior.php.
| BehaviorCollection::attach | ( | $ | behavior, | |
| $ | config = array() | |||
| ) |
Attaches a behavior to a model
| string | $behavior CamelCased name of the behavior to load | |
| array | $config Behavior configuration parameters |
Definition at line 264 of file behavior.php.
References $config, ClassRegistry::addObject(), disable(), enable(), enabled(), ClassRegistry::getObject(), App::import(), and ClassRegistry::isKeySet().
Referenced by init().
| BehaviorCollection::attached | ( | $ | name = null |
) |
Gets the list of attached behaviors, or, whether the given behavior is attached
| string | $name Optional. The name of the behavior to check the status of. If omitted, returns an array of currently-attached behaviors |
Definition at line 487 of file behavior.php.
| BehaviorCollection::detach | ( | $ | name | ) |
Detaches a behavior from a model
| string | $name CamelCased name of the behavior to unload |
Definition at line 341 of file behavior.php.
References ClassRegistry::getObject().
| BehaviorCollection::disable | ( | $ | name | ) |
Disables callbacks on a behavior or array of behaviors. Public behavior methods are still callable as normal.
| mixed | $name CamelCased name of the behavior(s) to disable (string or array) |
Definition at line 371 of file behavior.php.
Referenced by attach().
| BehaviorCollection::dispatchMethod | ( | &$ | model, | |
| $ | method, | |||
| $ | params = array(), |
|||
| $ | strict = false | |||
| ) |
Dispatches a behavior method
Definition at line 399 of file behavior.php.
| BehaviorCollection::enable | ( | $ | name | ) |
Enables callbacks on a behavior or array of behaviors
| mixed | $name CamelCased name of the behavior(s) to enable (string or array) |
Definition at line 360 of file behavior.php.
Referenced by attach().
| BehaviorCollection::enabled | ( | $ | name = null |
) |
Gets the list of currently-enabled behaviors, or, the current status of a single behavior
| string | $name Optional. The name of the behavior to check the status of. If omitted, returns an array of currently-enabled behaviors |
Definition at line 387 of file behavior.php.
Referenced by attach().
| BehaviorCollection::init | ( | $ | modelName, | |
| $ | behaviors = array() | |||
| ) |
Attaches a model object and loads a list of behaviors
public
Definition at line 247 of file behavior.php.
References $config, $modelName, attach(), and Set::normalize().
| BehaviorCollection::methods | ( | ) |
Gets the method list for attached behaviors, i.e. all public, non-callback methods
Definition at line 475 of file behavior.php.
| BehaviorCollection::trigger | ( | &$ | model, | |
| $ | callback, | |||
| $ | params = array(), |
|||
| $ | options = array() | |||
| ) |
Dispatches a behavior callback on all attached behavior objects
| model | $model | |
| string | $callback | |
| array | $params | |
| array | $options |
Definition at line 443 of file behavior.php.
| BehaviorCollection::$__mappedMethods = array() |
Definition at line 240 of file behavior.php.
| BehaviorCollection::$__methods = array() |
Definition at line 234 of file behavior.php.
| BehaviorCollection::$_attached = array() |
Definition at line 221 of file behavior.php.
| BehaviorCollection::$_disabled = array() |
Definition at line 228 of file behavior.php.
| BehaviorCollection::$modelName = null |
1.4.7