StaticReflectionMethod.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <?php
  2. namespace Doctrine\Common\Reflection;
  3. use ReflectionException;
  4. use ReflectionMethod;
  5. class StaticReflectionMethod extends ReflectionMethod
  6. {
  7. /**
  8. * The PSR-0 parser object.
  9. *
  10. * @var StaticReflectionParser
  11. */
  12. protected $staticReflectionParser;
  13. /**
  14. * The name of the method.
  15. *
  16. * @var string
  17. */
  18. protected $methodName;
  19. /**
  20. * @param string $methodName
  21. */
  22. public function __construct(StaticReflectionParser $staticReflectionParser, $methodName)
  23. {
  24. $this->staticReflectionParser = $staticReflectionParser;
  25. $this->methodName = $methodName;
  26. }
  27. /**
  28. * {@inheritDoc}
  29. */
  30. public function getName()
  31. {
  32. return $this->methodName;
  33. }
  34. /**
  35. * @return StaticReflectionParser
  36. */
  37. protected function getStaticReflectionParser()
  38. {
  39. return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('method', $this->methodName);
  40. }
  41. /**
  42. * {@inheritDoc}
  43. */
  44. public function getDeclaringClass()
  45. {
  46. return $this->getStaticReflectionParser()->getReflectionClass();
  47. }
  48. /**
  49. * {@inheritDoc}
  50. */
  51. public function getNamespaceName()
  52. {
  53. return $this->getStaticReflectionParser()->getNamespaceName();
  54. }
  55. /**
  56. * {@inheritDoc}
  57. */
  58. public function getDocComment()
  59. {
  60. return $this->getStaticReflectionParser()->getDocComment('method', $this->methodName);
  61. }
  62. /**
  63. * @return string[]
  64. */
  65. public function getUseStatements()
  66. {
  67. return $this->getStaticReflectionParser()->getUseStatements();
  68. }
  69. /**
  70. * {@inheritDoc}
  71. */
  72. public static function export($class, $name, $return = false)
  73. {
  74. throw new ReflectionException('Method not implemented');
  75. }
  76. /**
  77. * {@inheritDoc}
  78. */
  79. public function getClosure($object)
  80. {
  81. throw new ReflectionException('Method not implemented');
  82. }
  83. /**
  84. * {@inheritDoc}
  85. */
  86. public function getModifiers()
  87. {
  88. throw new ReflectionException('Method not implemented');
  89. }
  90. /**
  91. * {@inheritDoc}
  92. */
  93. public function getPrototype()
  94. {
  95. throw new ReflectionException('Method not implemented');
  96. }
  97. /**
  98. * {@inheritDoc}
  99. */
  100. public function invoke($object, $parameter = null)
  101. {
  102. throw new ReflectionException('Method not implemented');
  103. }
  104. /**
  105. * {@inheritDoc}
  106. */
  107. public function invokeArgs($object, array $args)
  108. {
  109. throw new ReflectionException('Method not implemented');
  110. }
  111. /**
  112. * {@inheritDoc}
  113. */
  114. public function isAbstract()
  115. {
  116. throw new ReflectionException('Method not implemented');
  117. }
  118. /**
  119. * {@inheritDoc}
  120. */
  121. public function isConstructor()
  122. {
  123. throw new ReflectionException('Method not implemented');
  124. }
  125. /**
  126. * {@inheritDoc}
  127. */
  128. public function isDestructor()
  129. {
  130. throw new ReflectionException('Method not implemented');
  131. }
  132. /**
  133. * {@inheritDoc}
  134. */
  135. public function isFinal()
  136. {
  137. throw new ReflectionException('Method not implemented');
  138. }
  139. /**
  140. * {@inheritDoc}
  141. */
  142. public function isPrivate()
  143. {
  144. throw new ReflectionException('Method not implemented');
  145. }
  146. /**
  147. * {@inheritDoc}
  148. */
  149. public function isProtected()
  150. {
  151. throw new ReflectionException('Method not implemented');
  152. }
  153. /**
  154. * {@inheritDoc}
  155. */
  156. public function isPublic()
  157. {
  158. throw new ReflectionException('Method not implemented');
  159. }
  160. /**
  161. * {@inheritDoc}
  162. */
  163. public function isStatic()
  164. {
  165. throw new ReflectionException('Method not implemented');
  166. }
  167. /**
  168. * {@inheritDoc}
  169. */
  170. public function setAccessible($accessible)
  171. {
  172. throw new ReflectionException('Method not implemented');
  173. }
  174. /**
  175. * {@inheritDoc}
  176. */
  177. public function __toString()
  178. {
  179. throw new ReflectionException('Method not implemented');
  180. }
  181. /**
  182. * {@inheritDoc}
  183. */
  184. public function getClosureThis()
  185. {
  186. throw new ReflectionException('Method not implemented');
  187. }
  188. /**
  189. * {@inheritDoc}
  190. */
  191. public function getEndLine()
  192. {
  193. throw new ReflectionException('Method not implemented');
  194. }
  195. /**
  196. * {@inheritDoc}
  197. */
  198. public function getExtension()
  199. {
  200. throw new ReflectionException('Method not implemented');
  201. }
  202. /**
  203. * {@inheritDoc}
  204. */
  205. public function getExtensionName()
  206. {
  207. throw new ReflectionException('Method not implemented');
  208. }
  209. /**
  210. * {@inheritDoc}
  211. */
  212. public function getFileName()
  213. {
  214. throw new ReflectionException('Method not implemented');
  215. }
  216. /**
  217. * {@inheritDoc}
  218. */
  219. public function getNumberOfParameters()
  220. {
  221. throw new ReflectionException('Method not implemented');
  222. }
  223. /**
  224. * {@inheritDoc}
  225. */
  226. public function getNumberOfRequiredParameters()
  227. {
  228. throw new ReflectionException('Method not implemented');
  229. }
  230. /**
  231. * {@inheritDoc}
  232. */
  233. public function getParameters()
  234. {
  235. throw new ReflectionException('Method not implemented');
  236. }
  237. /**
  238. * {@inheritDoc}
  239. */
  240. public function getShortName()
  241. {
  242. throw new ReflectionException('Method not implemented');
  243. }
  244. /**
  245. * {@inheritDoc}
  246. */
  247. public function getStartLine()
  248. {
  249. throw new ReflectionException('Method not implemented');
  250. }
  251. /**
  252. * {@inheritDoc}
  253. */
  254. public function getStaticVariables()
  255. {
  256. throw new ReflectionException('Method not implemented');
  257. }
  258. /**
  259. * {@inheritDoc}
  260. */
  261. public function inNamespace()
  262. {
  263. throw new ReflectionException('Method not implemented');
  264. }
  265. /**
  266. * {@inheritDoc}
  267. */
  268. public function isClosure()
  269. {
  270. throw new ReflectionException('Method not implemented');
  271. }
  272. /**
  273. * {@inheritDoc}
  274. */
  275. public function isDeprecated()
  276. {
  277. throw new ReflectionException('Method not implemented');
  278. }
  279. /**
  280. * {@inheritDoc}
  281. */
  282. public function isInternal()
  283. {
  284. throw new ReflectionException('Method not implemented');
  285. }
  286. /**
  287. * {@inheritDoc}
  288. */
  289. public function isUserDefined()
  290. {
  291. throw new ReflectionException('Method not implemented');
  292. }
  293. /**
  294. * {@inheritDoc}
  295. */
  296. public function returnsReference()
  297. {
  298. throw new ReflectionException('Method not implemented');
  299. }
  300. }