예제 #1
0
파일: Builder.php 프로젝트: bestiary/sculpt
 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;
 }