Пример #1
0
 /**
  * Get the methods that are available for mixin based
  *
  * This function dynamically adds mixable methods of format _action[Action]
  *
  * @param  array $exclude   A list of methods to exclude
  * @return array An array of methods
  */
 public function getMixableMethods($exclude = array())
 {
     $methods = parent::getMixableMethods($exclude);
     if ($this->isSupported()) {
         foreach ($this->__actions as $action) {
             $methods[$action] = $this;
         }
     }
     return $methods;
 }
Пример #2
0
 /**
  * Get the methods that are available for mixin based
  *
  * This function also dynamically adds a function of format _action[Action]
  *
  * @param ObjectMixable $mixer The mixer requesting the mixable methods.
  * @return array An array of methods
  */
 public function getMixableMethods(ObjectMixable $mixer = null)
 {
     $methods = parent::getMixableMethods($mixer);
     foreach ($this->getMethods() as $method) {
         if (substr($method, 0, 7) == '_action') {
             $methods[strtolower(substr($method, 7))] = strtolower(substr($method, 7));
         }
     }
     return $methods;
 }
Пример #3
0
 /**
  * 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 The mixer requesting the mixable methods.
  * @return array An array of methods
  */
 public function getMixableMethods(ObjectMixable $mixer = null)
 {
     $methods = parent::getMixableMethods($mixer);
     unset($methods['save']);
     unset($methods['delete']);
     unset($methods['getInstance']);
     return $methods;
 }
Пример #4
0
 /**
  * Get the methods that are available for mixin based
  *
  * @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('getInstance', 'save', 'delete'));
     return parent::getMixableMethods($exclude);
 }