Skip to content
PHP Ecosystem
Explore

Message

API reference › HTML Core › Exception › Message

enumUIAwesome\Html\Core\Exception\Message
Backed bystring
Sourcesrc/Exception/Message.php

Represents error message templates for library exceptions.

Use Message::getMessage() to format the template with sprintf() arguments.

CaseValueDescription
CANNOT_INSTANTIATE_ABSTRACT_CLASS"Cannot instantiate abstract class '%s' via 'tag()' method."Error when attempting to instantiate an abstract class.
COMPONENT_METADATA_KEYS_MUST_BE_NON_EMPTY_STRINGS'Component metadata keys must be non-empty strings.'Error when a component metadata key is not a non-empty string.
COMPONENT_STATES_MUST_BE_STRING_LIST'Component states must be a list of non-empty strings.'Error when component states are not a list of non-empty strings.
CONFIG_ARGUMENTS_MUST_BE_POSITIONAL_LIST'Config arguments must be an ordered positional list.'Error when config call arguments are passed by name instead of position.
CONFIG_CALL_EXECUTION_FAILED"Config call '%s' from recipe '%s' failed for component '%s' (%s): %s"Error when a config call fails during execution.
CONFIG_CALL_METHOD_NOT_AVAILABLE"Config call '%s' from recipe '%s' is not a public instance method for " . "component '%s' (%s)."Error when a config call does not target a public instance method.
CONFIG_CALL_RETURNED_INCOMPATIBLE_VALUE"Config call '%s' from recipe '%s' must return component '%s' " . '(%s); %s returned.'Error when a config call returns an incompatible value.
CONFIG_DOES_NOT_DEFINE_COMPONENT_FACTORY'Config does not define a component factory.'Error when creating a component without a configured component factory.
CONFIG_KEY_MUST_BE_STRING'Config key "%s::%s" must be a string naming a method or property.'Error when a config key is numeric instead of a method or property name.
CONFIG_KEY_MUST_MATCH_METHOD_OR_PROPERTY'Config key "%s::%s" must match a method or property.'Error when a config key matches neither a method nor a property of the configured tag.
CONFIG_METHOD_MUST_BE_NON_EMPTY'Config method must be a non-empty string without whitespace.'Error when a config method name is empty or contains whitespace.
CONFIG_METHOD_MUST_BE_PUBLIC'Config method "%s::%s()" must be a public instance method.'Error when a config key targets a method that is not a public instance method.
CONFIG_METHOD_MUST_RETURN_TAG'Config method "%s::%s()" must return an instance of the tag class; %s ' . 'returned.'Error when a config method returns a value that is not an instance of the configured tag class.
CONFIG_PROPERTY_MUST_BE_PUBLIC'Config property "%s::$%s" must be a public instance property.'Error when a config targets a property that is not a public instance property.
CONFIG_PROPERTY_MUST_BE_WRITABLE'Config property "%s::$%s" must be publicly writable.'Error when a config targets a property that rejects the write, such as readonly or asymmetric visibility.
CONFIG_RETURNED_INCOMPATIBLE_COMPONENT"Config for component '%s' (%s) returned incompatible component %s."Error when a config applier returns a component incompatible with the fluent receiver.
COOKBOOK_CALLS_MUST_BE_POSITIONAL_LIST'Cookbook calls must be an ordered positional list.'Error when cookbook calls are passed by name instead of position.
EVENT_KEY_MUST_START_WITH_ON'Event key "%s" must start with "on".'Error when an event key does not start with ‘on’.
TAG_CLASS_MISMATCH_ON_END"Mismatched '%s::end()' call, got '%s'."Error when there is a class mismatch on end() call.
TAG_DOES_NOT_SUPPORT_BEGIN"Tag '%s' does not support 'begin()' method."Error when a tag does not support begin() method.
UNEXPECTED_END_CALL_NO_BEGIN"Unexpected '%s::end()' call, a matching 'begin()' is not found."Error when an unexpected end() call is made without a matching begin().
VALUE_MUST_BE_NON_EMPTY_WITHOUT_WHITESPACE'%s must be non-empty and contain no whitespace.'Error when a named value is empty or contains whitespace.
VALUE_MUST_BE_STRING_OR_STRING_BACKED_ENUM'%s must be a string or a string-backed enum; int-backed enum ' . "'%s' given."Error when a named value is passed as an int-backed enum instead of a string or a string-backed enum.
MethodDescriptionDefined by
getMessage()Returns the formatted message string for the error case.Message
public function getMessage(int|string ...$argument): string

Returns the formatted message string for the error case.

Parameters

ParameterTypeDescription
...$argumentint|stringValues to insert into the message template.

Returns

string: Formatted error message with interpolated arguments.