li3_behaviors\data\model\Behaviors::unbindBehavior()
Unbinds an instance of a behavior from the model. Will throw an exception if behavior is not bound.
Parameters
-
string
$name
The name of the behavior.
Source
public static function unbindBehavior($name) {
list($model, $class) = static::_classesForBehavior($name);
static::_initializeBehaviors();
if (!isset(static::$_behaviors[$model][$class])) {
throw new RuntimeException("Behavior `{$class}` not bound to model `{$model}`.");
}
unset(static::$_behaviors[$model][$class]);
}