StaticReflectionClass.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <?php
  2. /*
  3. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  6. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  7. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  8. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  9. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  10. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  11. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  13. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. *
  15. * This software consists of voluntary contributions made by many individuals
  16. * and is licensed under the MIT license. For more information, see
  17. * <http://www.doctrine-project.org>.
  18. */
  19. namespace Doctrine\Common\Reflection;
  20. use ReflectionClass;
  21. use ReflectionException;
  22. class StaticReflectionClass extends ReflectionClass
  23. {
  24. /**
  25. * The static reflection parser object.
  26. *
  27. * @var StaticReflectionParser
  28. */
  29. private $staticReflectionParser;
  30. /**
  31. * @param StaticReflectionParser $staticReflectionParser
  32. */
  33. public function __construct(StaticReflectionParser $staticReflectionParser)
  34. {
  35. $this->staticReflectionParser = $staticReflectionParser;
  36. }
  37. /**
  38. * {@inheritDoc}
  39. */
  40. public function getName()
  41. {
  42. return $this->staticReflectionParser->getClassName();
  43. }
  44. /**
  45. * {@inheritDoc}
  46. */
  47. public function getDocComment()
  48. {
  49. return $this->staticReflectionParser->getDocComment();
  50. }
  51. /**
  52. * {@inheritDoc}
  53. */
  54. public function getNamespaceName()
  55. {
  56. return $this->staticReflectionParser->getNamespaceName();
  57. }
  58. /**
  59. * @return array
  60. */
  61. public function getUseStatements()
  62. {
  63. return $this->staticReflectionParser->getUseStatements();
  64. }
  65. /**
  66. * {@inheritDoc}
  67. */
  68. public function getMethod($name)
  69. {
  70. return $this->staticReflectionParser->getReflectionMethod($name);
  71. }
  72. /**
  73. * {@inheritDoc}
  74. */
  75. public function getProperty($name)
  76. {
  77. return $this->staticReflectionParser->getReflectionProperty($name);
  78. }
  79. /**
  80. * {@inheritDoc}
  81. */
  82. public static function export($argument, $return = false)
  83. {
  84. throw new ReflectionException('Method not implemented');
  85. }
  86. /**
  87. * {@inheritDoc}
  88. */
  89. public function getConstant($name)
  90. {
  91. throw new ReflectionException('Method not implemented');
  92. }
  93. /**
  94. * {@inheritDoc}
  95. */
  96. public function getConstants()
  97. {
  98. throw new ReflectionException('Method not implemented');
  99. }
  100. /**
  101. * {@inheritDoc}
  102. */
  103. public function getConstructor()
  104. {
  105. throw new ReflectionException('Method not implemented');
  106. }
  107. /**
  108. * {@inheritDoc}
  109. */
  110. public function getDefaultProperties()
  111. {
  112. throw new ReflectionException('Method not implemented');
  113. }
  114. /**
  115. * {@inheritDoc}
  116. */
  117. public function getEndLine()
  118. {
  119. throw new ReflectionException('Method not implemented');
  120. }
  121. /**
  122. * {@inheritDoc}
  123. */
  124. public function getExtension()
  125. {
  126. throw new ReflectionException('Method not implemented');
  127. }
  128. /**
  129. * {@inheritDoc}
  130. */
  131. public function getExtensionName()
  132. {
  133. throw new ReflectionException('Method not implemented');
  134. }
  135. /**
  136. * {@inheritDoc}
  137. */
  138. public function getFileName()
  139. {
  140. throw new ReflectionException('Method not implemented');
  141. }
  142. /**
  143. * {@inheritDoc}
  144. */
  145. public function getInterfaceNames()
  146. {
  147. throw new ReflectionException('Method not implemented');
  148. }
  149. /**
  150. * {@inheritDoc}
  151. */
  152. public function getInterfaces()
  153. {
  154. throw new ReflectionException('Method not implemented');
  155. }
  156. /**
  157. * {@inheritDoc}
  158. */
  159. public function getMethods($filter = null)
  160. {
  161. throw new ReflectionException('Method not implemented');
  162. }
  163. /**
  164. * {@inheritDoc}
  165. */
  166. public function getModifiers()
  167. {
  168. throw new ReflectionException('Method not implemented');
  169. }
  170. /**
  171. * {@inheritDoc}
  172. */
  173. public function getParentClass()
  174. {
  175. throw new ReflectionException('Method not implemented');
  176. }
  177. /**
  178. * {@inheritDoc}
  179. */
  180. public function getProperties($filter = null)
  181. {
  182. throw new ReflectionException('Method not implemented');
  183. }
  184. /**
  185. * {@inheritDoc}
  186. */
  187. public function getShortName()
  188. {
  189. throw new ReflectionException('Method not implemented');
  190. }
  191. /**
  192. * {@inheritDoc}
  193. */
  194. public function getStartLine()
  195. {
  196. throw new ReflectionException('Method not implemented');
  197. }
  198. /**
  199. * {@inheritDoc}
  200. */
  201. public function getStaticProperties()
  202. {
  203. throw new ReflectionException('Method not implemented');
  204. }
  205. /**
  206. * {@inheritDoc}
  207. */
  208. public function getStaticPropertyValue($name, $default = '')
  209. {
  210. throw new ReflectionException('Method not implemented');
  211. }
  212. /**
  213. * {@inheritDoc}
  214. */
  215. public function getTraitAliases()
  216. {
  217. throw new ReflectionException('Method not implemented');
  218. }
  219. /**
  220. * {@inheritDoc}
  221. */
  222. public function getTraitNames()
  223. {
  224. throw new ReflectionException('Method not implemented');
  225. }
  226. /**
  227. * {@inheritDoc}
  228. */
  229. public function getTraits()
  230. {
  231. throw new ReflectionException('Method not implemented');
  232. }
  233. /**
  234. * {@inheritDoc}
  235. */
  236. public function hasConstant($name)
  237. {
  238. throw new ReflectionException('Method not implemented');
  239. }
  240. /**
  241. * {@inheritDoc}
  242. */
  243. public function hasMethod($name)
  244. {
  245. throw new ReflectionException('Method not implemented');
  246. }
  247. /**
  248. * {@inheritDoc}
  249. */
  250. public function hasProperty($name)
  251. {
  252. throw new ReflectionException('Method not implemented');
  253. }
  254. /**
  255. * {@inheritDoc}
  256. */
  257. public function implementsInterface($interface)
  258. {
  259. throw new ReflectionException('Method not implemented');
  260. }
  261. /**
  262. * {@inheritDoc}
  263. */
  264. public function inNamespace()
  265. {
  266. throw new ReflectionException('Method not implemented');
  267. }
  268. /**
  269. * {@inheritDoc}
  270. */
  271. public function isAbstract()
  272. {
  273. throw new ReflectionException('Method not implemented');
  274. }
  275. /**
  276. * {@inheritDoc}
  277. */
  278. public function isCloneable()
  279. {
  280. throw new ReflectionException('Method not implemented');
  281. }
  282. /**
  283. * {@inheritDoc}
  284. */
  285. public function isFinal()
  286. {
  287. throw new ReflectionException('Method not implemented');
  288. }
  289. /**
  290. * {@inheritDoc}
  291. */
  292. public function isInstance($object)
  293. {
  294. throw new ReflectionException('Method not implemented');
  295. }
  296. /**
  297. * {@inheritDoc}
  298. */
  299. public function isInstantiable()
  300. {
  301. throw new ReflectionException('Method not implemented');
  302. }
  303. /**
  304. * {@inheritDoc}
  305. */
  306. public function isInterface()
  307. {
  308. throw new ReflectionException('Method not implemented');
  309. }
  310. /**
  311. * {@inheritDoc}
  312. */
  313. public function isInternal()
  314. {
  315. throw new ReflectionException('Method not implemented');
  316. }
  317. /**
  318. * {@inheritDoc}
  319. */
  320. public function isIterateable()
  321. {
  322. throw new ReflectionException('Method not implemented');
  323. }
  324. /**
  325. * {@inheritDoc}
  326. */
  327. public function isSubclassOf($class)
  328. {
  329. throw new ReflectionException('Method not implemented');
  330. }
  331. /**
  332. * {@inheritDoc}
  333. */
  334. public function isTrait()
  335. {
  336. throw new ReflectionException('Method not implemented');
  337. }
  338. /**
  339. * {@inheritDoc}
  340. */
  341. public function isUserDefined()
  342. {
  343. throw new ReflectionException('Method not implemented');
  344. }
  345. /**
  346. * {@inheritDoc}
  347. */
  348. public function newInstance($args)
  349. {
  350. throw new ReflectionException('Method not implemented');
  351. }
  352. /**
  353. * {@inheritDoc}
  354. */
  355. public function newInstanceArgs(array $args = array())
  356. {
  357. throw new ReflectionException('Method not implemented');
  358. }
  359. /**
  360. * {@inheritDoc}
  361. */
  362. public function newInstanceWithoutConstructor()
  363. {
  364. throw new ReflectionException('Method not implemented');
  365. }
  366. /**
  367. * {@inheritDoc}
  368. */
  369. public function setStaticPropertyValue($name, $value)
  370. {
  371. throw new ReflectionException('Method not implemented');
  372. }
  373. /**
  374. * {@inheritDoc}
  375. */
  376. public function __toString()
  377. {
  378. throw new ReflectionException('Method not implemented');
  379. }
  380. }