PHP Class mikehaertl\wkhtmlto\Command

This class is an extension of mikehaertl\shellcommand\Command and adds wk* specific features like xvfb support and proper argument handling.
Author: Michael Härtl ([email protected])
Inheritance: extends mikehaertl\shellcommand\Command
Afficher le fichier Open project: mikehaertl/phpwkhtmltopdf

Méthodes publiques

Свойство Type Description
$enableXvfb whether to enable the built in Xvfb support (uses xvfb-run)
$xvfbRunBinary the name of the xvfb-run comand. Default is xvfb-run. You can also configure a full path here.
$xvfbRunOptions options to pass to the xfvb-run command. Default is --server-args="-screen 0, 1024x768x24".

Méthodes publiques

Méthode Description
addArgs ( array $args )
getExecCommand ( ) : string | boolean

Method Details

addArgs() public méthode

public addArgs ( array $args )
$args array args to add to the command. These can be: array( // Special argument 'input' will not get prepended with '--'. 'input' => 'cover', // Special argument 'inputArg' is treated like 'input' but will get escaped // Both 'input' and 'inputArg' can be used in combination 'inputArg' => '/tmp/tmpFileName.html', 'no-outline', // option without argument 'encoding' => 'UTF-8', // option with argument // Option with 2 arguments 'cookie' => array('name'=>'value'), // Repeatable options with single argument 'run-script' => array( 'local1.js', 'local2.js', ), // Repeatable options with 2 arguments 'replace' => array( '{page}' => $page++, '{title}' => $pageTitle, ),

getExecCommand() public méthode

public getExecCommand ( ) : string | boolean
Résultat string | boolean the command to execute with optional Xfvb wrapper applied. Null if none set.

Property Details

$enableXvfb public_oe property

whether to enable the built in Xvfb support (uses xvfb-run)
public $enableXvfb

$xvfbRunBinary public_oe property

the name of the xvfb-run comand. Default is xvfb-run. You can also configure a full path here.
public $xvfbRunBinary

$xvfbRunOptions public_oe property

options to pass to the xfvb-run command. Default is --server-args="-screen 0, 1024x768x24".
public $xvfbRunOptions