1 | <?php |
||
19 | class ReflectedClass { |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $namespace; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $name; |
||
30 | |||
31 | /** |
||
32 | * Methods |
||
33 | * |
||
34 | * @var \SplObjectStorage[] |
||
35 | */ |
||
36 | protected $methods; |
||
37 | |||
38 | /** |
||
39 | * Resolver for names |
||
40 | * |
||
41 | * @var NameResolver |
||
42 | */ |
||
43 | protected $nameResolver; |
||
44 | |||
45 | /** |
||
46 | * Does the class is abstract ? |
||
47 | * |
||
48 | * @var bool |
||
49 | */ |
||
50 | protected $isAbstract = false; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | protected $interfaces = array(); |
||
56 | |||
57 | /** |
||
58 | * Parent's name |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | private $parent; |
||
63 | |||
64 | /** |
||
65 | * Constructor |
||
66 | * |
||
67 | * @param string $namespace |
||
68 | * @param string $name |
||
69 | */ |
||
70 | public function __construct($namespace, $name) |
||
77 | |||
78 | /** |
||
79 | * Get fullname (namespace + name) |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getFullname() { |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getName() |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getNamespace() |
||
102 | |||
103 | /** |
||
104 | * @param string $namespace |
||
105 | * @return ReflectedClass |
||
106 | */ |
||
107 | protected function setNamespace($namespace) |
||
112 | |||
113 | /** |
||
114 | * @return \SplObjectStorage[] |
||
115 | */ |
||
116 | public function getMethods() |
||
120 | |||
121 | /** |
||
122 | * Attach method |
||
123 | * This method consolidated dependencies |
||
124 | * |
||
125 | * @param ReflectedMethod $method |
||
126 | * @return $this |
||
127 | */ |
||
128 | public function pushMethod(ReflectedMethod $method) { |
||
132 | |||
133 | /** |
||
134 | * @return array |
||
135 | */ |
||
136 | public function getDependencies() |
||
150 | |||
151 | /** |
||
152 | * @param NameResolver $resolver |
||
153 | * @return $this |
||
154 | */ |
||
155 | public function setNameResolver(NameResolver $resolver) |
||
160 | |||
161 | /** |
||
162 | * Set abstractness of method |
||
163 | * |
||
164 | * @param boolean $bool |
||
165 | * @return $this |
||
166 | */ |
||
167 | public function setAbstract($bool) { |
||
171 | |||
172 | /** |
||
173 | * Is Abstract ? |
||
174 | * |
||
175 | * @return bool |
||
176 | */ |
||
177 | public function isAbstract() { |
||
180 | |||
181 | /** |
||
182 | * Set the parent name |
||
183 | * |
||
184 | * @param $parent |
||
185 | * @return $this |
||
186 | */ |
||
187 | public function setParent($parent) { |
||
191 | |||
192 | /** |
||
193 | * Get the parent name |
||
194 | * |
||
195 | * @return string|null null when no parent class exists |
||
196 | */ |
||
197 | public function getParent() { |
||
203 | |||
204 | /** |
||
205 | * @return array |
||
206 | */ |
||
207 | public function getInterfaces() |
||
215 | |||
216 | /** |
||
217 | * @param array $interfaces |
||
218 | * @return $this |
||
219 | */ |
||
220 | public function setInterfaces($interfaces) |
||
225 | |||
226 | /** |
||
227 | * Get anonymous classes contained in this class |
||
228 | * |
||
229 | * @return mixed |
||
230 | */ |
||
231 | public function getAnonymousClasses() { |
||
238 | |||
239 | }; |