AbstractEnum::__callStatic( string $name, WordPressAiClientCommonarray $arguments ): static

In this article

Handles static method calls for enum creation.

Parameters

$namestringrequired
The method name.
$arguments<span class="WordPressAiClientCommonarray”>WordPressAiClientCommonarrayrequired
The method arguments.

Return

static The enum instance.

Source

final public static function __callStatic(string $name, array $arguments): self
{
    $constantName = self::camelCaseToConstant($name);
    $constants = static::getConstants();
    if (isset($constants[$constantName])) {
        return self::getInstance($constants[$constantName], $constantName);
    }
    throw new BadMethodCallException(sprintf('Method %s::%s does not exist', static::class, $name));
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.