PHP Class Barryvdh\Snappy\ImageWrapper

Author: Killian Blais
Datei anzeigen Open project: barryvdh/laravel-snappy

Protected Properties

Property Type Description
$options array
$snappy Knp\Snappy\Image

Public Methods

Method Description
__call ( string $name, array $arguments ) : mixed Call Snappy instance.
__construct ( Knp\Snappy\Image $snappy )
download ( string $filename = 'image.jpg' ) : Response Make the image downloadable by the user
inline ( string $filename = 'image.jpg' ) : Illuminate\Http\Response Return a response with the image to show in the browser
loadFile ( string $file ) : static Load a HTML file
loadHTML ( string $string ) : static Load a HTML string
loadView ( $view, $data = [], $mergeData = [] )
output ( ) : string Output the PDF as a string.
save ( $filename, $overwrite = false ) : static Save the image to a file
setOption ( $name, $value )
setOptions ( $options )
snappy ( ) : Knp\Snappy\Image Get the Snappy instance.
stream ( string $filename = 'image.jpg' ) : Response Return a response with the image to show in the browser

Method Details

__call() public method

Also shortcut's ->html => loadHtml ->view => loadView ->file => loadFile
public __call ( string $name, array $arguments ) : mixed
$name string
$arguments array
return mixed

__construct() public method

public __construct ( Knp\Snappy\Image $snappy )
$snappy Knp\Snappy\Image

download() public method

Make the image downloadable by the user
public download ( string $filename = 'image.jpg' ) : Response
$filename string
return Symfony\Component\HttpFoundation\Response

inline() public method

Return a response with the image to show in the browser
public inline ( string $filename = 'image.jpg' ) : Illuminate\Http\Response
$filename string
return Illuminate\Http\Response

loadFile() public method

Load a HTML file
public loadFile ( string $file ) : static
$file string
return static

loadHTML() public method

Load a HTML string
public loadHTML ( string $string ) : static
$string string
return static

loadView() public method

public loadView ( $view, $data = [], $mergeData = [] )

output() public method

Output the PDF as a string.
public output ( ) : string
return string The rendered PDF as string

save() public method

Save the image to a file
public save ( $filename, $overwrite = false ) : static
$filename
return static

setOption() public method

public setOption ( $name, $value )

setOptions() public method

public setOptions ( $options )

snappy() public method

Get the Snappy instance.
public snappy ( ) : Knp\Snappy\Image
return Knp\Snappy\Image

stream() public method

Return a response with the image to show in the browser
Deprecation: Use inline() instead
public stream ( string $filename = 'image.jpg' ) : Response
$filename string
return Symfony\Component\HttpFoundation\Response

Property Details

$options protected_oe property

protected array $options
return array

$snappy protected_oe property

protected Image,Knp\Snappy $snappy
return Knp\Snappy\Image