AbstractEnum::__get( string $property ): mixed

In this article

Provides read-only access to properties.

Parameters

$propertystringrequired
The property name.

Return

mixed The property value.

Source

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

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

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