PHP Class Psr7Middlewares\Middleware\GoogleAnalytics

Inheritance: use trait Psr7Middlewares\Utils\HtmlInjectorTrait, use trait Psr7Middlewares\Utils\AttributeTrait
Show file Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
__construct ( string $siteId ) Constructor. Set the site's ID.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.

Private Methods

Method Description
getCode ( ) : string Returns the google code.

Method Details

__construct() public method

Constructor. Set the site's ID.
public __construct ( string $siteId )
$siteId string

__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