/** * {@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); } }
/** * {@inheritdoc} */ public function modify(MethodEndpoint $endpoint, ReflectionMethod $method) { foreach ($endpoint->getPaths() as $path) { $path->where = array_merge($path->where, (array) $this->value); } }
/** * {@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)); }