Documentation

WorkerPoolResult
in package
implements ArrayAccess

The Worker Pool Result class represents a result of the workerpool

Table of Contents

Interfaces

ArrayAccess

Properties

$result  : array<string|int, mixed>
$resultType  : string

Methods

__construct()  : mixed
The constructor
__toString()  : string
Get the object as a human readable string
dump()  : string
Uses var_dump to dump data
getData()  : mixed
Get the data
getPid()  : string
Get the result type
getPoolException()  : null|WorkerPoolExceptionResult
Get the workerpool exception
getResultType()  : string
Get the result type
getWorkerException()  : null|WorkerPoolExceptionResult
Get the worker exception
hasData()  : bool
Does the result have data?
hasPoolException()  : bool
Does the result have a workerpool exception?
hasWorkerException()  : bool
Does the result have a worker exception?
offsetExists()  : bool
Does the offset exist?
offsetGet()  : mixed
Get the offset
offsetSet()  : void
Set the offset this will always throw an exception, because it is read only
offsetUnset()  : void
Unset the offset this will always throw an exception, because it is read only
indentExceptionString()  : string
Indents the exception string

Properties

$result

private array<string|int, mixed> $result = array()

the worker pool result

$resultType

private string $resultType = 'data'

the worker pool result type

Methods

__construct()

The constructor

public __construct(array<string|int, mixed> $result) : mixed
Parameters
$result : array<string|int, mixed>

__toString()

Get the object as a human readable string

public __toString() : string
Return values
string

the object as a human redable string

dump()

Uses var_dump to dump data

public dump() : string
Return values
string

the dumped output

getData()

Get the data

public getData() : mixed
Return values
mixed

the data returned from the worker

getPid()

Get the result type

public getPid() : string
Return values
string

one of the values 'pid', 'data', 'poolException', 'workerException'

getResultType()

Get the result type

public getResultType() : string
Return values
string

one of the values 'pid', 'data', 'poolException', 'workerException'

hasData()

Does the result have data?

public hasData() : bool
Return values
bool

true, if the result has data

hasPoolException()

Does the result have a workerpool exception?

public hasPoolException() : bool
Return values
bool

true, if the result has a workerpool exception

hasWorkerException()

Does the result have a worker exception?

public hasWorkerException() : bool
Return values
bool

true, if the result has a worker exception

offsetExists()

Does the offset exist?

public offsetExists(string $offset) : bool
Parameters
$offset : string

can be 'pid', 'data', 'poolException', 'workerException'

Return values
bool

true, if the offset estists

offsetGet()

Get the offset

public offsetGet(string $offset) : mixed
Parameters
$offset : string

can be 'pid', 'data', 'poolException', 'workerException'

Return values
mixed

any value depending on the result and offset

offsetSet()

Set the offset this will always throw an exception, because it is read only

public offsetSet(string $offset, mixed $value) : void
Parameters
$offset : string

can be 'pid', 'data', 'poolException', 'workerException'

$value : mixed

any value depending on the result and offset

Tags
throws
LogicException

always throws an exception becasue it is read only

offsetUnset()

Unset the offset this will always throw an exception, because it is read only

public offsetUnset(string $offset) : void
Parameters
$offset : string

can be 'pid', 'data', 'poolException', 'workerException'

Tags
throws
LogicException

always throws an exception becasue it is read only

indentExceptionString()

Indents the exception string

protected static indentExceptionString(string $str) : string
Parameters
$str : string
Return values
string

the indented exception string


        
On this page

Search results