Constructor.
Parameters
$idstring|nulloptional- Unique identifier for this function call.
Default:
null $namestring|nulloptional- The name of the function to call.
Default:
null $argsmixedoptional- The arguments to pass to the function.
Default:
null
Source
public function __construct(?string $id = null, ?string $name = null, $args = null)
{
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->args = $args;
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.