class ConstFetchNode
Hierarchy
- class \PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode implements \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode uses \PHPStan\PhpDocParser\Ast\NodeAttributes
Expanded class hierarchy of ConstFetchNode
6 files declare their use of ConstFetchNode
- DoctrineArrayItem.php in vendor/
phpstan/ phpdoc-parser/ src/ Ast/ PhpDoc/ Doctrine/ DoctrineArrayItem.php - FullyQualifiedClassNameInAnnotationSniff.php in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Namespaces/ FullyQualifiedClassNameInAnnotationSniff.php - PhpDocParser.php in vendor/
phpstan/ phpdoc-parser/ src/ Parser/ PhpDocParser.php - ReferenceUsedNamesOnlySniff.php in vendor/
slevomat/ coding-standard/ SlevomatCodingStandard/ Sniffs/ Namespaces/ ReferenceUsedNamesOnlySniff.php - TypeResolver.php in vendor/
phpdocumentor/ type-resolver/ src/ TypeResolver.php
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Ast/ ConstExpr/ ConstFetchNode.php, line 7
Namespace
PHPStan\PhpDocParser\Ast\ConstExprView source
class ConstFetchNode implements ConstExprNode {
use NodeAttributes;
/** @var string class name for class constants or empty string for non-class constants */
public $className;
/** @var string */
public $name;
public function __construct(string $className, string $name) {
$this->className = $className;
$this->name = $name;
}
public function __toString() : string {
if ($this->className === '') {
return $this->name;
}
return "{$this->className}::{$this->name}";
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ConstFetchNode::$className | public | property | @var string class name for class constants or empty string for non-class constants |
ConstFetchNode::$name | public | property | @var string |
ConstFetchNode::__construct | public | function | |
ConstFetchNode::__toString | public | function | |
NodeAttributes::$attributes | private | property | @var array<string, mixed> |
NodeAttributes::getAttribute | public | function | * |
NodeAttributes::hasAttribute | public | function | |
NodeAttributes::setAttribute | public | function | * |