public static function classExists($value, $message = '')
{
if (!class_exists($value)) {
static::reportInvalidArgument(sprintf($message ?: 'Expected an existing class name. Got: %s', static::valueToString($value)));
}
}
/** * {@inheritDoc} */ public function registerTagHandler($tagName, $handler) { Assert::stringNotEmpty($tagName); Assert::stringNotEmpty($handler); Assert::classExists($handler); Assert::implementsInterface($handler, StaticMethod::class); if (strpos($tagName, '\\') && $tagName[0] !== '\\') { throw new \InvalidArgumentException('A namespaced tag must have a leading backslash as it must be fully qualified'); } $this->tagHandlerMappings[$tagName] = $handler; }