PHP Класс mikehaertl\wkhtmlto\Command

This class is an extension of mikehaertl\shellcommand\Command and adds wk* specific features like xvfb support and proper argument handling.
Автор: Michael Härtl ([email protected])
Наследование: extends mikehaertl\shellcommand\Command
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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".

Открытые методы

Метод Описание
addArgs ( array $args )
getExecCommand ( ) : string | boolean

Описание методов

addArgs() публичный Метод

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 getExecCommand ( ) : string | boolean
Результат string | boolean the command to execute with optional Xfvb wrapper applied. Null if none set.

Описание свойств

$enableXvfb публичное свойство

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

$xvfbRunBinary публичное свойство

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

$xvfbRunOptions публичное свойство

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