Method | Description | |
---|---|---|
__construct ( |
Constructor. Set the geocoder instance. | |
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | Execute the middleware. | |
getLocation ( Psr\Http\Message\ServerRequestInterface $request ) : Geocoder\Model\AddressCollection | null | Returns the client location. | |
saveInSession ( boolean $save = true ) : self | Wheter or not save the geolocation in a session variable. |
public __construct ( |
||
$geocoder |
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$next | callable | |
return | Psr\Http\Message\ResponseInterface |
public static getLocation ( Psr\Http\Message\ServerRequestInterface $request ) : Geocoder\Model\AddressCollection | null | ||
$request | Psr\Http\Message\ServerRequestInterface | |
return | Geocoder\Model\AddressCollection | null |
public saveInSession ( boolean $save = true ) : self | ||
$save | boolean | |
return | self |