Skip to content
PHP Ecosystem
Explore

ConfigApplier

API reference › HTML Core › Config › ConfigApplier

final readonly classUIAwesome\Html\Core\Config\ConfigApplier
ImplementsConfigApplierInterface
Sourcesrc/Config/ConfigApplier.php

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.

MethodDescriptionDefined by
apply()Applies a recipe and returns the configured component instance.ConfigApplier
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

ParameterTypeDescription
$componentobjectComponent to configure.
$recipeRecipeResolved recipe to apply.
$contextComponentContextSemantic component context.
$strictboolWhether 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