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