PHP-SwfTools API
Class

SwfTools\Binary\Swfextract

class Swfextract 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
string|null listEmbedded(string $pathfile)

Execute the command to list the embedded objects

string|null extract(string $pathfile, EmbeddedObject $embedded, string $outputFile)

Execute the command to extract an embedded object from a flash file

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 31
public string|null listEmbedded(string $pathfile)

Execute the command to list the embedded objects

Parameters

string $pathfile

Return Value

string|null The ouptut string, null on error

Exceptions

RuntimeException

at line 51
public string|null extract(string $pathfile, EmbeddedObject $embedded, string $outputFile)

Execute the command to extract an embedded object from a flash file

Parameters

string $pathfile the file
EmbeddedObject $embedded The id of the object
string $outputFile the path where to extract

Return Value

string|null The ouptut string, null on error

Exceptions

InvalidArgumentException
RuntimeException

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