mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
commit
f5a409fd43
@ -307,7 +307,13 @@ class ApiDoc
|
|||||||
public function setRoute(Route $route)
|
public function setRoute(Route $route)
|
||||||
{
|
{
|
||||||
$this->route = $route;
|
$this->route = $route;
|
||||||
$this->host = $route->getHost() ?: null;
|
|
||||||
|
if (method_exists($route, 'getHost')) {
|
||||||
|
$this->host = $route->getHost() ? : null;
|
||||||
|
} else {
|
||||||
|
$this->host = null;
|
||||||
|
}
|
||||||
|
|
||||||
$this->uri = $route->getPattern();
|
$this->uri = $route->getPattern();
|
||||||
$this->method = $route->getRequirement('_method') ?: 'ANY';
|
$this->method = $route->getRequirement('_method') ?: 'ANY';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user