ParserConstant
Less than 1 minute
ParserConstant
Represents a parsed PHP class constant, including its value and access modifier.
class ParserConstant extends \Hazaar\Parser\PHP\TokenParserExtends: Hazaar\Parser\PHP\TokenParser
This 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 $valueType: mixed
access
public string $accessType: string
Methods
parse
Parses the provided tokens to extract constant information such as name, value, and access modifier.
protected parse(array $tokens): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | reference to the array of tokens to parse |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000