abstract class Renderer implements Renderable, Jsonable, JsonSerializable

Properties

protected string $format
protected string $extension
protected array $options

Methods

__construct(string $url, array $options = [])

No description

static object
status()

No description

static string
version()

Get the Chromium version of the renderer

ResponseInterface
fetch()

No description

setOption(string $key, mixed $value)

Set option

getOption(string $key, $default = null)

No description

devicePixelRatio(float $pixelRatio = 1.0)

Sets the devicePixelRatio of the viewport

waitUntilLoaded()

Waits until the entire document, including resources are fully loaded.

waitUntiDOMContentLoaded()

Waits until the 'DOMContentLoaded' event is fired.

waitUntiNetworkIdle()

Waits until there has not been any network requests for at least 500ms

waitUntiNetworkSettled()

Waits until there has not been more than 2 network requests for at least 500ms

timeout(int $timeout)

Maximum amount of time to wait before timing out in milliseconds. Defaults to 30000

resource
stream()

Get the rendered content as a file handle (resource)

string|null
blob()

Get the rendered content as a blob

Response
download(string $filename = null)

Retrieve the rendered content as a download response

Response
toResponse(Request $request = null)

Retrieve the rendered content as a response

string
link()

Retrieve URL to the rendered content

ResponseInterface
postProcess(ResponseInterface $response)

Postprocessing stage

static Renderer
url(string $url)

Render from url external or interal

static Renderer
from(HtmlString|string $html)

Render from raw markup

static Renderer
view(View|string $view, Arrayable|array $data = [], array $mergeData = [])

Render from a view

static Renderer
route(array|string $name = null, mixed $parameters = [], bool $absolute = true)

Render from named route.

array
__debugInfo()

No description

string
__toString()

No description

string
jsonSerialize()

No description

string
toJson(int $options = 0)

No description

Details

at line 50
protected __construct(string $url, array $options = [])

Parameters

string $url
array $options

at line 62
static protected object status()

Return Value

object

at line 72
static string version()

Get the Chromium version of the renderer

Return Value

string

at line 81
protected ResponseInterface fetch()

Return Value

ResponseInterface

at line 112
protected Renderer setOption(string $key, mixed $value)

Set option

Parameters

string $key
mixed $value

Return Value

Renderer

at line 127
protected getOption(string $key, $default = null)

Parameters

string $key
$default

at line 142
Renderer devicePixelRatio(float $pixelRatio = 1.0)

Sets the devicePixelRatio of the viewport

Parameters

float $pixelRatio

Return Value

Renderer

at line 152
Renderer waitUntilLoaded()

Waits until the entire document, including resources are fully loaded.

Return Value

Renderer

at line 162
Renderer waitUntiDOMContentLoaded()

Waits until the 'DOMContentLoaded' event is fired.

Return Value

Renderer

at line 172
Renderer waitUntiNetworkIdle()

Waits until there has not been any network requests for at least 500ms

Return Value

Renderer

at line 182
Renderer waitUntiNetworkSettled()

Waits until there has not been more than 2 network requests for at least 500ms

Return Value

Renderer

at line 193
Renderer timeout(int $timeout)

Maximum amount of time to wait before timing out in milliseconds. Defaults to 30000

Parameters

int $timeout

Return Value

Renderer

at line 203
resource stream()

Get the rendered content as a file handle (resource)

Return Value

resource

at line 216
string|null blob()

Get the rendered content as a blob

Return Value

string|null

at line 231
Response download(string $filename = null)

Retrieve the rendered content as a download response

Parameters

string $filename

Return Value

Response

at line 256
Response toResponse(Request $request = null)

Retrieve the rendered content as a response

Parameters

Request $request

Return Value

Response

Retrieve URL to the rendered content

Return Value

string

at line 295
protected ResponseInterface postProcess(ResponseInterface $response)

Postprocessing stage

Parameters

ResponseInterface $response

Return Value

ResponseInterface

at line 306
static Renderer url(string $url)

Render from url external or interal

Parameters

string $url

Return Value

Renderer

at line 321
static Renderer from(HtmlString|string $html)

Render from raw markup

Parameters

HtmlString|string $html

Return Value

Renderer

at line 338
static Renderer view(View|string $view, Arrayable|array $data = [], array $mergeData = [])

Render from a view

Parameters

View|string $view
Arrayable|array $data
array $mergeData

Return Value

Renderer

at line 355
static Renderer route(array|string $name = null, mixed $parameters = [], bool $absolute = true)

Render from named route.

Parameters

array|string $name
mixed $parameters
bool $absolute

Return Value

Renderer

at line 363
array __debugInfo()

Return Value

array

at line 371
string __toString()

Return Value

string

at line 379
string jsonSerialize()

Return Value

string

at line 388
string toJson(int $options = 0)

Parameters

int $options

Return Value

string