PHP-SwfTools API
Class

SwfTools\Binary\Binary

abstract class Binary implements AdapterInterface

The abstract binary adapter

Methods

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

The path to the binary

Binary setTimeout(integer $timeout)

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

integer getTimeout()

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

string|null getVersion()

Try to get the version of the binary.

Details

at line 50
public __construct(type $binaryPathname, Logger $logger, integer $timeout)

The path to the binary

Parameters

type $binaryPathname the path to a binary executable
Logger $logger A logger
integer $timeout The timeout for the binary

Exceptions

BinaryNotFoundException In case the binary does not exists or is not executable

at line 70
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

at line 86
public integer getTimeout()

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

Return Value

integer The timeout value.

at line 96
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