WordPress\AiClient\Common

AbstractEnum::__get │ public │ WP 0.1.0

Provides read-only access to properties.

Метод класса: AbstractEnum{}

Хуков нет.

Возвращает

mixed. The property value.

Использование

$AbstractEnum = new AbstractEnum();
$AbstractEnum->__get( $property );
$property(строка) (обязательный)
The property name.

Список изменений

С версии 0.1.0 Введена.

Код AbstractEnum::__get() WP 7.1.4

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));
}