Data
class Data extends ArrayObject (View source)
A State\Data object contains a "message" (the primary result) and a data array (the persistent state). The message is transient, and does not move into the persistent state unless explicitly copied there.
Properties
protected string | $message |
Methods
No description
No description
No description
No description
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
No description
No description
Accumulate execution time
Accumulate the message.
Details
__construct(string $message = '', array $data = [])
No description
array
getData()
No description
string
getMessage()
No description
setMessage(string $message)
No description
$this
merge(Data $result)
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
$this
update(ArrayObject $update)
Update the current data with the data provided in the parameter.
Provided data takes precedence.
array
mergeData(array $data)
Merge another result into this result. Data already existing in this result takes precedence over the data in the Result being merged.
$data['message'] is handled specially, and is appended to $this->message if set.
bool
hasExecutionTime()
No description
null|float
getExecutionTime()
No description
null|float
accumulateExecutionTime(array|float $duration)
Accumulate execution time
string
accumulateMessage(string $message)
Accumulate the message.