PHP-SwfTools API
Class

SwfTools\Binary\Swfrender

class Swfrender extends Binary

Methods

__construct($binaryPathname, Logger $logger, $timeout)

The path to the binary

from Binary
Binary setTimeout(integer $timeout)

Set the timeout for the underlying processes ; 0 means no timeout

from Binary
integer getTimeout()

Get the timeout for the underlyning processes ; 0 means no timeout

from Binary
string|null getVersion()

Try to get the version of the binary.

from Binary
null render(string $pathfile, string $outputFile, Boolean $legacy)

static Swfrender load(Configuration $configuration, Logger $logger)

Factory method to build the binary

Details

in Binary at line 47
public __construct($binaryPathname, Logger $logger, $timeout)

The path to the binary

Parameters

$binaryPathname
Logger $logger
$timeout

in Binary at line 67
public Binary setTimeout(integer $timeout)

Set the timeout for the underlying processes ; 0 means no timeout

Parameters

integer $timeout The timeout value

Return Value

Binary

Exceptions

InvalidArgumentException In case the timeout value is not valid

in Binary at line 83
public integer getTimeout()

Get the timeout for the underlyning processes ; 0 means no timeout

Return Value

integer The timeout value.

in Binary at line 93
public string|null getVersion()

Try to get the version of the binary.

If the detection fails, return null

Return Value

string|null The version of the binary adapter

at line 32
public null render(string $pathfile, string $outputFile, Boolean $legacy)

Parameters

string $pathfile
string $outputFile
Boolean $legacy

Return Value

null

Exceptions

InvalidArgumentException
RuntimeException

at line 61
static public Swfrender load(Configuration $configuration, Logger $logger)

Factory method to build the binary

Either pass a configuration file with the binary settings, or pass an
empty configuration, which will trigger the autodetection

Parameters

Configuration $configuration A Configuration
Logger $logger A logger

Return Value

Swfrender

Exceptions

BinaryNotFoundException