/** * Get the methods that are available for mixin * * @param array $exclude A list of methods to exclude * @return array An array of methods */ public function getMixableMethods($exclude = array()) { $exclude = array_merge($exclude, array('execute', 'getPriority', 'setBreakCondition', 'getBreakCondition', 'invokeCommandCallbacks', 'invokeCommandCallback')); return parent::getMixableMethods($exclude); }
/** * Get the methods that are available for mixin based * * This function also dynamically adds a lamda function with function name 'is[Behavior]' to allow client code to * check if the behavior is supported. * * Function will check if the behavior is supported by calling {@link isSupported()}. Is the behavior is not * supported on the mixer no mixable methods will be returned, only an 'is[Behavior]' method will be added which * return FALSE when called. * * @param array $exclude An array of public methods to be exclude * @return array An array of methods */ public function getMixableMethods($exclude = array()) { $methods = array(); if ($this->isSupported()) { $exclude = array_merge($exclude, array('execute', 'invokeCallbacks', 'getIdentifier', 'getPriority', 'getHandle', 'getName', 'getObject', 'getConfig', 'setBreakCondition', 'getBreakCondition', 'addCommandCallback', 'removeCommandCallback', 'getCommandCallbacks', 'invokeCommandCallback', 'isSupported')); $methods = parent::getMixableMethods($exclude); } if (!isset($exclude['is' . ucfirst($this->getName())])) { $methods['is' . ucfirst($this->getName())] = $this->isSupported(); } return $methods; }