1: <?php declare(strict_types = 1);
2:
3: namespace ApiGen\Index;
4:
5: use ApiGen\Info\ClassInfo;
6: use ApiGen\Info\ElementInfo;
7: use ApiGen\Info\EnumInfo;
8: use ApiGen\Info\FunctionInfo;
9: use ApiGen\Info\InterfaceInfo;
10: use ApiGen\Info\NameInfo;
11: use ApiGen\Info\TraitInfo;
12:
13:
14: class NamespaceIndex implements ElementInfo
15: {
16: /** @var ClassInfo[] indexed by [classShortName] (excludes exceptions) */
17: public array $class = [];
18:
19: /** @var InterfaceInfo[] indexed by [interfaceShortName] */
20: public array $interface = [];
21:
22: /** @var TraitInfo[] indexed by [traitShortName] */
23: public array $trait = [];
24:
25: /** @var EnumInfo[] indexed by [enumShortName] */
26: public array $enum = [];
27:
28: /** @var ClassInfo[] indexed by [exceptionShortName] */
29: public array $exception = [];
30:
31: /** @var FunctionInfo[] indexed by [functionShortName] */
32: public array $function = [];
33:
34: /** @var NamespaceIndex[] indexed by [namespaceShortName] */
35: public array $children = [];
36:
37:
38: public function __construct(
39: public NameInfo $name,
40: public bool $primary,
41: public bool $deprecated,
42: ) {
43: }
44:
45:
46: public function isDeprecated(): bool
47: {
48: return $this->deprecated;
49: }
50: }
51: