1 | <?php |
||
18 | class NameResolver |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | private $aliases = array(); |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $namespace = '\\'; |
||
30 | |||
31 | /** |
||
32 | * Resolve name of class |
||
33 | * |
||
34 | * @param string $name |
||
35 | * @param string $currentNamespace |
||
36 | * @return string |
||
37 | */ |
||
38 | public function resolve($name, $currentNamespace = '\\') |
||
70 | |||
71 | /** |
||
72 | * Push alias |
||
73 | * |
||
74 | * @param \StdClass $alias |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function pushAlias(\StdClass $alias) { |
||
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getNamespace() |
||
89 | |||
90 | /** |
||
91 | * @param string $namespace |
||
92 | * @return NameResolver |
||
93 | */ |
||
94 | public function setNamespace($namespace) |
||
99 | |||
100 | } |