ParserConstant
Less than 1 minute
ParserConstant
Represents a parsed PHP class constant, including its value and access modifier.
class ParserConstant extends \Hazaar\Parser\PHP\TokenParserThis class is responsible for parsing constant tokens within a PHP class, extracting the constant's name, value, and access level (public, protected, private). It uses DocBlockParser for doc comments and TypedValueParser for value parsing.
Properties
value
The value assigned to the constant.
public mixed $valueaccess
public string $accessMethods
parse
Parses the provided tokens to extract constant information such as name, value, and access modifier.
protected parse(array $tokens): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | reference to the array of tokens to parse |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000