TestSampleClass.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?php
  2. /**
  3. * License Info
  4. *
  5. * This is a test File docblock
  6. *
  7. * @author Ralph Schindler
  8. */
  9. /**
  10. * @see Zend_Loader
  11. */
  12. require_once 'Zend/Loader.php';
  13. /**
  14. * @see Zend_Reflection_File
  15. */
  16. require_once 'Zend/Reflection/File.php';
  17. /**
  18. * This is a sample class docblock
  19. *
  20. * blah
  21. */
  22. class Zend_Reflection_TestSampleClass extends ArrayObject
  23. {
  24. }
  25. class Zend_Reflection_TestSampleClass2 implements IteratorAggregate
  26. {
  27. protected $_prop1 = null;
  28. protected $_prop2 = null;
  29. public function getProp1()
  30. {
  31. return $this->_prop1;
  32. }
  33. public function getProp2($param1, Zend_Reflection_TestSampleClass $param2)
  34. {
  35. return $this->_prop2;
  36. }
  37. public function getIterator()
  38. {
  39. return array();
  40. }
  41. }
  42. /**
  43. * Blah Blah
  44. *
  45. */
  46. abstract class Zend_Reflection_TestSampleClass3 extends ArrayObject
  47. {
  48. }
  49. interface Zend_Reflection_TestSampleClassInterface
  50. {
  51. }
  52. class Zend_Reflection_TestSampleClass4 implements Zend_Reflection_TestSampleClassInterface
  53. {
  54. }
  55. /**
  56. * TestSampleClass5 Docblock Short Desc
  57. *
  58. * This is a long description for
  59. * the docblock of this class, it
  60. * should be longer than 3 lines.
  61. * It indeed is longer than 3 lines
  62. * now.
  63. *
  64. * @author Ralph Schindler <ralph.schindler@zend.com>
  65. */
  66. class Zend_Reflection_TestSampleClass5
  67. {
  68. /**
  69. * Method ShortDescription
  70. *
  71. * Method LongDescription
  72. * This is a long description for
  73. * the docblock of this class, it
  74. * should be longer than 3 lines.
  75. * It indeed is longer than 3 lines
  76. * now.
  77. *
  78. * @param int $one Description for one
  79. * @param int Description for two
  80. * @param string $three Description for three
  81. * which spans multiple lines
  82. * @return mixed Some return descr
  83. */
  84. public function doSomething($one, $two = 2, $three = 'three')
  85. {
  86. return 'mixedValue';
  87. }
  88. /**
  89. * Method ShortDescription
  90. *
  91. * @param int $one Description for one
  92. * @param int Description for two
  93. * @param string $three Description for three
  94. * which spans multiple lines
  95. * @return int
  96. */
  97. public function doSomethingElse($one, $two = 2, $three = 'three')
  98. {
  99. return 'mixedValue';
  100. }
  101. }
  102. /**
  103. * TestSampleClass6 Docblock Short Desc
  104. *
  105. * Testing for formatted dockblock tags. See ZF-6726.
  106. * (This long description should be longer than 3 lines.
  107. * It indeed is longer than 3 lines
  108. * now.)
  109. *
  110. * @author Carlton Gibson <carlton.gibson@noumenal.co.uk>
  111. */
  112. class Zend_Reflection_TestSampleClass6
  113. {
  114. /**
  115. * Method ShortDescription
  116. *
  117. * Notice the multiple spaces aligning the columns in the docblock
  118. * tags. (This long description should be longer than 3 lines.
  119. * It indeed is longer than 3 lines
  120. * now.)
  121. *
  122. * @emptyTag
  123. * @descriptionTag A tag with just a description
  124. * @param int $var Description of $var
  125. * @return string Description of return value
  126. */
  127. public function doSomething($var)
  128. {
  129. //we need a multi-line method body.
  130. $assigned = 1;
  131. $alsoAssigined = 2;
  132. return 'mixedValue';
  133. }
  134. }
  135. /**
  136. * Enter description here...
  137. *
  138. * @param string $one
  139. * @param int $two
  140. * @return true
  141. */
  142. function zend_reflection_test_sample_function6($one, $two = 2) {
  143. return true;
  144. }
  145. class Zend_Reflection_Docblock_Param_WithNamespace
  146. {
  147. /**
  148. * @param Zend\Foo\Bar $var desc
  149. * @return Zend\Reflection\Docblock
  150. */
  151. public function doSomething()
  152. {
  153. }
  154. }
  155. class Zend_Reflection_TestSampleClass7
  156. {
  157. public function bigMethodSignature($arg1, $arg2, $arg3,
  158. $arg4, $arg5, $arg6)
  159. {
  160. // FUNKY SIGNATURE
  161. }
  162. public function testInlineMethod() { return true; }
  163. }