JobResult
in package
Job execution result
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- create() : self
- Create
- error() : self
- Set error
- field() : self
- Set field
- get() : mixed
- Get field value
- getError() : string|null
- Get error message
- getFields() : array<string|int, mixed>
- Get fields
- hasError() : bool
- Return true if has error
- toArray() : array<string|int, mixed>
- Convert to array
Properties
$error
Error
protected
string|null
$error
= null
$fields
Result fields
protected
array<string|int, mixed>
$fields
= []
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $fields = [] ]) : mixed
Parameters
- $fields : array<string|int, mixed> = []
create()
Create
public
static create([array<string|int, mixed> $fields = [] ]) : self
Parameters
- $fields : array<string|int, mixed> = []
Return values
selferror()
Set error
public
error(string|null $error) : self
Parameters
- $error : string|null
Return values
selffield()
Set field
public
field(string $name, mixed $value) : self
Parameters
- $name : string
- $value : mixed
Return values
selfget()
Get field value
public
get(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
getError()
Get error message
public
getError() : string|null
Return values
string|nullgetFields()
Get fields
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>hasError()
Return true if has error
public
hasError() : bool
Return values
booltoArray()
Convert to array
public
toArray() : array<string|int, mixed>