# Call

> Represents one ordered immutable cookbook method call.

[API reference](/docs/api/index.md) › [HTML Core](/docs/extensions/html-core/reference/index.md) › [Config](/docs/extensions/html-core/reference/config/index.md) › Call

| final readonly class | `UIAwesome\Html\Core\Config\Call` |
| --- | --- |
| Source | [`src/Config/Call.php`](https://github.com/ui-awesome/html-core/blob/main/src/Config/Call.php#L21) |

Represents one ordered immutable cookbook method call.

Immutability is structural: the method name and the ordered argument list cannot change after construction.

Object arguments are stored by reference, so pass immutable values (scalars, enums, `readonly` objects) when deep
immutability is required.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-arguments"></span>`$arguments` readonly | `list<mixed>` | Arguments passed to the configured method. | `Call` |
| <span id="property-method"></span>`$method` readonly constructor | `string` | Method name to call. | `Call` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a method call with positional arguments. | `Call` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(string $method, mixed ...$arguments)
```

Creates a method call with positional arguments.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$method` | `string` | Method name to call. |
| `...$arguments` | `mixed` | Positional arguments passed to the method. |

**Throws**

- [`InvalidArgumentException`](https://www.php.net/manual/en/class.invalidargumentexception.php): If the method name is empty or contains whitespace, or if the arguments are passed by name.