| 1 | <?php |
||
| 5 | class TestClass |
||
| 6 | { |
||
| 7 | public $pub; |
||
| 8 | protected $pro; |
||
| 9 | private $pri; |
||
| 10 | |||
| 11 | public static $pubstat; |
||
| 12 | protected static $prostat; |
||
| 13 | private static $pristat; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * This is a constructor for a TestClass with the first |
||
| 17 | * line of the docstring split into two different lines. |
||
| 18 | * |
||
| 19 | * And here's some more information about it |
||
| 20 | */ |
||
| 21 | public function __construct() |
||
| 22 | { |
||
| 23 | $this->pub = array('pub'); |
||
| 24 | $this->pro = array('pro'); |
||
| 25 | $this->pri = array('pri'); |
||
| 26 | } |
||
| 27 | |||
| 28 | private static function staticMethod() |
||
| 29 | { |
||
| 30 | } |
||
| 31 | |||
| 32 | final public function finalMethod() |
||
| 33 | { |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $x |
||
| 38 | */ |
||
| 39 | private function arrayHint(array $x) |
||
| 40 | { |
||
| 41 | } |
||
| 42 | |||
| 43 | private function classHint(TestClass $x) |
||
| 44 | { |
||
| 45 | } |
||
| 46 | |||
| 47 | private function ref(&$x) |
||
| 48 | { |
||
| 49 | } |
||
| 50 | |||
| 51 | private function defaultMethod($x = 1234) |
||
| 52 | { |
||
| 53 | } |
||
| 54 | |||
| 55 | final protected static function &mix(array &$x, TestClass $y = null, $z = array(1, 2, 3), $_ = 'string') |
||
| 56 | { |
||
| 57 | } |
||
| 58 | |||
| 59 | public function __clone() |
||
| 60 | { |
||
| 61 | return new self(); |
||
| 62 | } |
||
| 63 | |||
| 64 | public function __invoke($x) |
||
| 65 | { |
||
| 66 | return 'woot'; |
||
| 67 | } |
||
| 68 | |||
| 69 | public function __ToStRiNg() |
||
| 70 | { |
||
| 71 | return 'I am totally a string'; |
||
| 72 | } |
||
| 73 | |||
| 74 | public function __get($param) |
||
| 75 | { |
||
| 76 | return 'Ouch!'; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |