manager[$path])) { $values = $this->manager[$path]; if (in_array($middleware, $values)) { return; } if (!in_array(MiddlewareInterface::class, class_implements($middleware))) { return; } } else { $this->manager[$path] = []; } $this->manager[$path][] = $middleware; } /** * @param string $className * @param string $method * @return array */ public function get(string $className, string $method): array { return $this->manager[$className . '::' . $method] ?? []; } }