ActionResult
in package
FinalYes
Standard workflow action result envelope.
Table of Contents
Properties
Methods
- failure() : self
- Create a failed action result.
- success() : self
- Create a successful action result.
- toArray() : array<string, mixed>
- Convert the result to the workflow context payload.
- __construct() : mixed
Properties
$data
private
array<string|int, mixed>
$data
= []
$error
private
string|null
$error
= null
$success
private
bool
$success
Methods
failure()
Create a failed action result.
public
static failure(string $error[, array<string|int, mixed> $data = [] ]) : self
Parameters
- $error : string
-
Failure reason
- $data : array<string|int, mixed> = []
-
Optional action output data
Return values
selfsuccess()
Create a successful action result.
public
static success([array<string|int, mixed> $data = [] ]) : self
Parameters
- $data : array<string|int, mixed> = []
-
Action output data
Return values
selftoArray()
Convert the result to the workflow context payload.
public
toArray() : array<string, mixed>
Return values
array<string, mixed>__construct()
private
__construct(bool $success[, array<string|int, mixed> $data = [] ][, string|null $error = null ]) : mixed
Parameters
- $success : bool
-
Whether the action succeeded
- $data : array<string|int, mixed> = []
-
Public action output data
- $error : string|null = null
-
Failure reason