PHP Class JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush

Datei anzeigen Open project: jacobbennett/laravel-http2serverpush

Protected Properties

Property Type Description
$crawler Symfony\Component\DomCrawler\Crawler The DomCrawler instance.

Public Methods

Method Description
handle ( Illuminate\Http\Request $request, Closure $next ) : mixed Handle an incoming request.

Protected Methods

Method Description
fetchLinkableNodes ( Illuminate\Http\Response $response ) : Collection Get all nodes we are interested in pushing.
generateAndAttachLinkHeaders ( Illuminate\Http\Response $response )
getCrawler ( Illuminate\Http\Response $response ) : Crawler Get the DomCrawler instance.

Private Methods

Method Description
addLinkHeader ( Illuminate\Http\Response $response, $link ) Add Link Header
buildLinkHeaderString ( string $url ) : string Build out header string based on asset extension.

Method Details

fetchLinkableNodes() protected method

Get all nodes we are interested in pushing.
protected fetchLinkableNodes ( Illuminate\Http\Response $response ) : Collection
$response Illuminate\Http\Response
return Illuminate\Support\Collection

generateAndAttachLinkHeaders() protected method

protected generateAndAttachLinkHeaders ( Illuminate\Http\Response $response )
$response Illuminate\Http\Response

getCrawler() protected method

Get the DomCrawler instance.
protected getCrawler ( Illuminate\Http\Response $response ) : Crawler
$response Illuminate\Http\Response
return Symfony\Component\DomCrawler\Crawler

handle() public method

Handle an incoming request.
public handle ( Illuminate\Http\Request $request, Closure $next ) : mixed
$request Illuminate\Http\Request
$next Closure
return mixed

Property Details

$crawler protected_oe property

The DomCrawler instance.
protected Crawler,Symfony\Component\DomCrawler $crawler
return Symfony\Component\DomCrawler\Crawler