PHP Class Psr7Middlewares\Middleware\Piwik

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

Public Methods

Method Description
__construct ( string $piwikUrl = null ) Constructor.Set the Piwik's url.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
addOption ( ) : self Add an option.
piwikUrl ( string $url ) : self Set the piwik url.
siteId ( integer $siteId ) : self Set the site's id.

Private Methods

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

Method Details

__construct() public method

Constructor.Set the Piwik's url.
public __construct ( string $piwikUrl = null )
$piwikUrl 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

addOption() public method

...
public addOption ( ) : self
return self

piwikUrl() public method

Set the piwik url.
public piwikUrl ( string $url ) : self
$url string
return self

siteId() public method

Set the site's id.
public siteId ( integer $siteId ) : self
$siteId integer
return self