Inheritance: implements Adamgoose\Routing\Annotations\EndpointInterface, use trait EndpointTrait
 /**
  * {@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);
     }
 }
Esempio n. 2
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));
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function modify(MethodEndpoint $endpoint, ReflectionMethod $method)
 {
     foreach ($endpoint->getPaths() as $path) {
         $path->where = array_merge($path->where, (array) $this->value);
     }
 }