PHP Class Psr7Middlewares\Middleware\DetectDevice

Inheritance: use trait Psr7Middlewares\Utils\AttributeTrait
Datei anzeigen Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
getDevice ( Psr\Http\Message\ServerRequestInterface $request ) : Mobile_Detec\Mobile_Detect | null Returns the device.

Method Details

__invoke() public method

Execute the middleware.
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

getDevice() public static method

Returns the device.
public static getDevice ( Psr\Http\Message\ServerRequestInterface $request ) : Mobile_Detec\Mobile_Detect | null
$request Psr\Http\Message\ServerRequestInterface
return Mobile_Detec\Mobile_Detect | null