WordPress\AiClient\Common

AbstractEnum::__getpublicWP 0.1.0

Provides read-only access to properties.

Method of the class: AbstractEnum{}

No Hooks.

Returns

Mixed. The property value.

Usage

$AbstractEnum = new AbstractEnum();
$AbstractEnum->__get( $property );
$property(string) (required)
The property name.

Changelog

Since 0.1.0 Introduced.

AbstractEnum::__get() code WP 7.0

final public function __get(string $property)
{
    if ($property === 'value' || $property === 'name') {
        return $this->{$property};
    }
    throw new BadMethodCallException(sprintf('Property %s::%s does not exist', static::class, $property));
}