StaticReflectionClass.php 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. public function __construct(StaticReflectionParser $staticReflectionParser)
  31. {
  32. $this->staticReflectionParser = $staticReflectionParser;
  33. }
  34. public function getName()
  35. {
  36. return $this->staticReflectionParser->getClassName();
  37. }
  38. public function getDocComment()
  39. {
  40. return $this->staticReflectionParser->getDocComment();
  41. }
  42. public function getNamespaceName()
  43. {
  44. return $this->staticReflectionParser->getNamespaceName();
  45. }
  46. public function getUseStatements()
  47. {
  48. return $this->staticReflectionParser->getUseStatements();
  49. }
  50. public function getMethod($name)
  51. {
  52. return $this->staticReflectionParser->getReflectionMethod($name);
  53. }
  54. public function getProperty($name)
  55. {
  56. return $this->staticReflectionParser->getReflectionProperty($name);
  57. }
  58. public static function export($argument, $return = false) { throw new ReflectionException('Method not implemented'); }
  59. public function getConstant($name) { throw new ReflectionException('Method not implemented'); }
  60. public function getConstants() { throw new ReflectionException('Method not implemented'); }
  61. public function getConstructor() { throw new ReflectionException('Method not implemented'); }
  62. public function getDefaultProperties() { throw new ReflectionException('Method not implemented'); }
  63. public function getEndLine() { throw new ReflectionException('Method not implemented'); }
  64. public function getExtension() { throw new ReflectionException('Method not implemented'); }
  65. public function getExtensionName() { throw new ReflectionException('Method not implemented'); }
  66. public function getFileName() { throw new ReflectionException('Method not implemented'); }
  67. public function getInterfaceNames() { throw new ReflectionException('Method not implemented'); }
  68. public function getInterfaces() { throw new ReflectionException('Method not implemented'); }
  69. public function getMethods($filter = NULL) { throw new ReflectionException('Method not implemented'); }
  70. public function getModifiers() { throw new ReflectionException('Method not implemented'); }
  71. public function getParentClass() { throw new ReflectionException('Method not implemented'); }
  72. public function getProperties($filter = NULL) { throw new ReflectionException('Method not implemented'); }
  73. public function getShortName() { throw new ReflectionException('Method not implemented'); }
  74. public function getStartLine() { throw new ReflectionException('Method not implemented'); }
  75. public function getStaticProperties() { throw new ReflectionException('Method not implemented'); }
  76. public function getStaticPropertyValue($name, $default = '') { throw new ReflectionException('Method not implemented'); }
  77. public function getTraitAliases() { throw new ReflectionException('Method not implemented'); }
  78. public function getTraitNames() { throw new ReflectionException('Method not implemented'); }
  79. public function getTraits() { throw new ReflectionException('Method not implemented'); }
  80. public function hasConstant($name) { throw new ReflectionException('Method not implemented'); }
  81. public function hasMethod($name) { throw new ReflectionException('Method not implemented'); }
  82. public function hasProperty($name) { throw new ReflectionException('Method not implemented'); }
  83. public function implementsInterface($interface) { throw new ReflectionException('Method not implemented'); }
  84. public function inNamespace() { throw new ReflectionException('Method not implemented'); }
  85. public function isAbstract() { throw new ReflectionException('Method not implemented'); }
  86. public function isCloneable() { throw new ReflectionException('Method not implemented'); }
  87. public function isFinal() { throw new ReflectionException('Method not implemented'); }
  88. public function isInstance($object) { throw new ReflectionException('Method not implemented'); }
  89. public function isInstantiable() { throw new ReflectionException('Method not implemented'); }
  90. public function isInterface() { throw new ReflectionException('Method not implemented'); }
  91. public function isInternal() { throw new ReflectionException('Method not implemented'); }
  92. public function isIterateable() { throw new ReflectionException('Method not implemented'); }
  93. public function isSubclassOf($class) { throw new ReflectionException('Method not implemented'); }
  94. public function isTrait() { throw new ReflectionException('Method not implemented'); }
  95. public function isUserDefined() { throw new ReflectionException('Method not implemented'); }
  96. public function newInstance($args) { throw new ReflectionException('Method not implemented'); }
  97. public function newInstanceArgs(array $args = array()) { throw new ReflectionException('Method not implemented'); }
  98. public function newInstanceWithoutConstructor() { throw new ReflectionException('Method not implemented'); }
  99. public function setStaticPropertyValue($name, $value) { throw new ReflectionException('Method not implemented'); }
  100. public function __toString() { throw new ReflectionException('Method not implemented'); }
  101. }