1: <?php declare(strict_types = 1);
2:
3: namespace ApiGen\Analyzer;
4:
5: use ApiGen\Info\AliasReferenceInfo;
6: use ApiGen\Info\ClassLikeReferenceInfo;
7:
8:
9: class NameContextFrame
10: {
11: /** @var null|NameContextFrame */
12: public ?NameContextFrame $parent = null;
13:
14: /** @var null|ClassLikeReferenceInfo */
15: public ?ClassLikeReferenceInfo $scope = null;
16:
17: /** @var true[] indexed by [name] */
18: public array $genericParameters = [];
19:
20: /** @var AliasReferenceInfo[] indexed by [name] */
21: public array $aliases = [];
22:
23:
24: public function __construct(?NameContextFrame $parent)
25: {
26: $this->parent = $parent;
27: $this->scope = $parent?->scope;
28: $this->genericParameters = $parent->genericParameters ?? [];
29: $this->aliases = $parent->aliases ?? [];
30: }
31: }
32: