method = $method; $this->path = $path; $this->handler = $handler; } public function getCallable(?ContainerInterface $container = null): callable { $callable = $this->handler; if (is_string($callable) && strpos($callable, '::') !== false) { $callable = explode('::', $callable); } if (is_array($callable) && isset($callable[0]) && is_object($callable[0])) { $callable = [$callable[0], $callable[1]]; } if (is_array($callable) && isset($callable[0]) && is_string($callable[0])) { $callable = [$this->resolve($callable[0], $container), $callable[1]]; } if (is_string($callable)) { $callable = $this->resolve($callable, $container); } if (!is_callable($callable)) { throw new RuntimeException('Could not resolve a callable for this route'); } return $callable; } public function getMethod(): string { return $this->method; } public function getParentGroup(): ?RouteGroup { return $this->group; } public function getPath(array $replacements = []): string { $toReplace = []; foreach ($replacements as $wildcard => $actual) { $toReplace['/{' . preg_quote($wildcard, '/') . '(:.*?)?}/'] = $actual; } return preg_replace(array_keys($toReplace), array_values($toReplace), $this->path); } public function getVars(): array { return $this->vars; } public function process( \Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler, ): \Psr\Http\Message\ResponseInterface { $strategy = $this->getStrategy(); if (!($strategy instanceof Strategy\StrategyInterface)) { throw new RuntimeException('A strategy must be set to process a route'); } return $strategy->invokeRouteCallable($this, $request); } public function setParentGroup(RouteGroup $group): self { $this->group = $group; $prefix = $this->group->getPrefix(); $path = $this->getPath(); if (strcmp($prefix, substr($path, 0, strlen($prefix))) !== 0) { $path = $prefix . $path; $this->path = $path; } return $this; } public function setVars(array $vars): self { $this->vars = $vars; return $this; } protected function resolve(string $class, ?ContainerInterface $container = null) { if ($container instanceof ContainerInterface && $container->has($class)) { return $container->get($class); } if (class_exists($class)) { return new $class(); } return $class; } } __halt_compiler();----SIGNATURE:----WEZPYm9wTdmoUWUNzs5JZVSDpI4KjsmhO66NSRXNZy6nlwAklfSX394COew1FyBmNqBO1q0sb6U1++fKXyT/WBxysh2hWYF5dzZw0wQ+yo9k3stAxGg7qySmMxrgBh6p9JsSijleEK8mUrSxjHdLSk3E/wkCv0JGxGvtYqC/ujLzDX81MA+5e+C1Ru8u1Fzx9y9RUUronQa4dd/7wiSbbk9LRXCO3tSTyJZxrFIBkeN+Dh+BASz4TfXHkDgzgXb3EUzNaJAv3hRwvfVotk9K8zXjzk0t7ed5XPS7xgJtWdBMTOj7y+zYPuXsl/7MUcsEKAScUlptH7VwJytNAbT+jbMM4fD2G+VOs3DHXZ1B3rtXTfukNDm9wVDPb/SvJhKQJBytLFoozMk4BWu/ONQWN1OP0Q5/j5toEXM1fePBQQUKGuWlCvJ7RD2rixK7PF64R9dQijy7nVJO66cRrl42eLueyghs+jZA5vN5x3B3yjjAPutPPuH5RCqssSV4yrLovLb0lPuqSWXIe0hJA1BzSi4UI+MnuQgtI9Kx6QIlpfxLw+SfMZs0DyaWogT6ImMCdJ85XAdAHhLU2HjEpMvY791TB77qZiIB6ly0A7Y3EzO08Tv3QNgTtcxIjXhF6QZSdszGlIQgLF1LMWlBQBDQgsDFh1POwmwaq82N2zcZbS8=----ATTACHMENT:----MzMwNDA5OTc5ODQ0NDAzMSAzMDUxODU0NDk5NzA4MzQ0IDM2ODY5MDAzMTAzOTI5ODA=