1 | <?php |
||
17 | class ClassAlias |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var string $alias an interface or base class representing what object |
||
22 | * can be utilized by another object and/or function |
||
23 | */ |
||
24 | private $alias; |
||
25 | |||
26 | /** |
||
27 | * @var string $fqcn the actual class that should be substituted for the alias above |
||
28 | */ |
||
29 | private $fqcn; |
||
30 | |||
31 | /** |
||
32 | * ClassAlias constructor. |
||
33 | * |
||
34 | * @param string $alias Interface specified by implementing class |
||
35 | * @param string $fqcn Concrete class that satisfies interface |
||
36 | * @throws InvalidAliasException |
||
37 | */ |
||
38 | public function __construct($alias, $fqcn) |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function alias() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function fqcn() |
||
62 | } |
||
63 |