# ConfigApplierInterface

> Applies resolved config recipes to immutable component instances.

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

| interface | `UIAwesome\Html\Core\Config\ConfigApplierInterface` |
| --- | --- |
| Source | [`src/Config/ConfigApplierInterface.php`](https://github.com/ui-awesome/html-core/blob/main/src/Config/ConfigApplierInterface.php#L10) |

Implemented by 1 type:

- [`ConfigApplier`](/docs/extensions/html-core/reference/config/configapplier/index.md)

Applies resolved config recipes to immutable component instances.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`apply()`](#method-apply) abstract | Applies a recipe and returns the configured component instance. | `ConfigApplierInterface` |

## Method details

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

```php
abstract public function apply(object $component, UIAwesome\Html\Core\Config\Recipe $recipe, UIAwesome\Html\Core\Config\ComponentContext $context, bool $strict = true): object
```

Applies a recipe and returns the configured component instance.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$component` | `object` | Component to configure. |
| `$recipe` | [`Recipe`](/docs/extensions/html-core/reference/config/recipe/index.md) | Resolved recipe to apply. |
| `$context` | [`ComponentContext`](/docs/extensions/html-core/reference/config/componentcontext/index.md) | Semantic component context. |
| `$strict` | `bool` | Whether unavailable methods or incompatible return values must fail instead of being skipped. |

**Returns**

`object`: Configured component instance.