/** * Get the methods that are available for mixin based * * This function also dynamically adds a function of format is[Behavior] to allow client code to check if the * behavior is callable. * * @param ObjectInterface $mixer The mixer requesting the mixable methods. * @return array An array of methods */ public function getMixableMethods(ObjectMixable $mixer = null) { $methods = parent::getMixableMethods($mixer); $methods['is' . ucfirst($this->getIdentifier()->name)] = function () { return true; }; unset($methods['execute']); unset($methods['getIdentifier']); unset($methods['getPriority']); unset($methods['getHandle']); unset($methods['getObject']); return $methods; }
/** * Get the methods that are available for mixin. * * This functions overloads ObjectMixinAbstract::getMixableMethods and excludes the execute() function from the * list of available mixable methods. * * @param ObjectMixable $mixer The mixer requesting the mixable methods. * @return array An array of methods */ public function getMixableMethods(ObjectMixable $mixer = null) { $methods = parent::getMixableMethods(); unset($methods['execute']); unset($methods['getPriority']); return $methods; }