FunctionCall::__construct( string|null $id = null, string|null $name = null, mixed $args = null )

In this article

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

VersionDescription
0.1.0Introduced.

User Contributed Notes

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