1: <?php declare(strict_types = 1);
2:
3: namespace ApiGen\Info;
4:
5: use function strtolower;
6:
7:
8: class AliasReferenceInfo
9: {
10: /** @var ClassLikeReferenceInfo */
11: public ClassLikeReferenceInfo $classLike;
12:
13: /** @var string e.g. 'DatabaseOptions' */
14: public string $alias;
15:
16: /** @var string e.g. 'databaseoptions' */
17: public string $aliasLower;
18:
19:
20: public function __construct(
21: ClassLikeReferenceInfo $classLike,
22: string $alias,
23: ?string $aliasLower = null,
24: ) {
25: $this->classLike = $classLike;
26: $this->alias = $alias;
27: $this->aliasLower = $aliasLower ?? strtolower($alias);
28: }
29: }
30: