public function __call($method, $arguments) { if (in_array($method, $this->getStrategy()->getMixableMethods())) { switch (count($arguments)) { case 0: $return = $this->getStrategy()->{$method}(); break; case 1: $return = $this->getStrategy()->{$method}($arguments[0]); break; default: $return = call_user_func_array(array($this->getStrategy(), $method), $arguments); break; } } else { $return = parent::__call($method, $arguments); } return $return; }
public function __call($method, $arguments) { if (in_array($method, $this->_mixable_methods)) { if (is_array($this->getType())) { $type = $this->getType(); $type = $type['name']; } else { $type = $this->type; } $this->setStrategy($type); $this->getStrategy()->setMixer($this->getMixer()); switch (count($arguments)) { case 0: $return = $this->getStrategy()->{$method}(); break; case 1: $return = $this->getStrategy()->{$method}($arguments[0]); break; default: $return = call_user_func_array(array($this->getStrategy(), $method), $arguments); break; } } else { $return = parent::__call($method, $arguments); } return $return; }