예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function modify(MethodEndpoint $endpoint, ReflectionMethod $method)
 {
     if ($endpoint->hasPaths()) {
         foreach ($endpoint->getPaths() as $path) {
             $path->middleware = array_merge($path->middleware, (array) $this->value);
         }
     } else {
         $endpoint->middleware = array_merge($endpoint->middleware, (array) $this->value);
     }
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function modify(MethodEndpoint $endpoint, ReflectionMethod $method)
 {
     foreach ($endpoint->getPaths() as $path) {
         $path->where = array_merge($path->where, (array) $this->value);
     }
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function modify(MethodEndpoint $endpoint, ReflectionMethod $method)
 {
     $endpoint->addPath(new Path(strtolower(class_basename(get_class($this))), $this->domain, $this->value, $this->as, (array) $this->middleware, (array) $this->where));
 }