FunctionResponse::__construct( string|null $id, string|null $name, mixed $response )

In this article

Constructor.

Parameters

$idstring|nullrequired
The ID of the function call this is responding to.
$namestring|nullrequired
The name of the function that was called.
$responsemixedrequired
The response data from the function.

Source

public function __construct(?string $id, ?string $name, $response)
{
    if ($id === null && $name === null) {
        throw new InvalidArgumentException('At least one of id or name must be provided.');
    }
    $this->id = $id;
    $this->name = $name;
    $this->response = $response;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.