Example #1
0
 public function execute($strategy, $method, ...$arguments)
 {
     $callable = $this->getCallable($strategy, $method);
     $strategy = $this->registry->make($strategy, $callable, $arguments);
     switch ($this->strategy) {
         case self::SINGLE:
             $this->data = $strategy->single($this->data, $callable, $arguments);
             break;
         case self::EACH:
             $this->data = $strategy->each($this->data, $callable, $arguments);
             break;
     }
     return $this;
 }