ConfigApplier
API reference › HTML Core › Config › ConfigApplier
Applies ordered cookbook calls to fluent component instances.
Calls must target public instance methods and return the same component type. Non-strict mode skips unavailable methods and incompatible return values; exceptions thrown by an invoked method always fail.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
apply() | Applies a recipe and returns the configured component instance. | ConfigApplier |
Method details
Section titled “Method details”apply()
Section titled “apply() ”public function apply(object $component, UIAwesome\Html\Core\Config\Recipe $recipe, UIAwesome\Html\Core\Config\ComponentContext $context, bool $strict = true): objectApplies a recipe and returns the configured component instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
$component | object | Component to configure. |
$recipe | Recipe | Resolved recipe to apply. |
$context | ComponentContext | Semantic component context. |
$strict | bool | Whether unavailable methods or incompatible return values must fail instead of being skipped. Exceptions thrown by an invoked method always fail, regardless of this flag. |
Returns
object: Configured component instance.
Throws
UIAwesome\Html\Core\Exception\ConfigException: If a call is unavailable or returns an incompatible value in strict mode, or throws during execution in any mode.