1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace ProxyManagerTestAsset; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Base test class with various intercepted properties |
9
|
|
|
* |
10
|
|
|
* @author Marco Pivetta <[email protected]> |
11
|
|
|
* @license MIT |
12
|
|
|
*/ |
13
|
|
|
class BaseClass implements BaseInterface |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* @var string |
17
|
|
|
*/ |
18
|
|
|
public $publicProperty = 'publicPropertyDefault'; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* @var string |
22
|
|
|
*/ |
23
|
|
|
protected $protectedProperty = 'protectedPropertyDefault'; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
*/ |
28
|
|
|
private $privateProperty = 'privatePropertyDefault'; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @return string |
32
|
|
|
*/ |
33
|
|
|
public function publicMethod() |
34
|
|
|
{ |
35
|
|
|
return 'publicMethodDefault'; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return string |
40
|
|
|
*/ |
41
|
|
|
public function publicPropertyGetter() |
42
|
|
|
{ |
43
|
|
|
return $this->publicProperty; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return string |
48
|
|
|
*/ |
49
|
|
|
public function protectedPropertyGetter() |
50
|
|
|
{ |
51
|
|
|
return $this->protectedProperty; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function privatePropertyGetter() |
58
|
|
|
{ |
59
|
|
|
return $this->privateProperty; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return string |
64
|
|
|
*/ |
65
|
|
|
protected function protectedMethod() |
66
|
|
|
{ |
67
|
|
|
return 'protectedMethodDefault'; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return string |
72
|
|
|
*/ |
73
|
|
|
private function privateMethod() |
|
|
|
|
74
|
|
|
{ |
75
|
|
|
return 'privateMethodDefault'; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param \stdClass $param |
80
|
|
|
* |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function publicTypeHintedMethod(\stdClass $param) |
|
|
|
|
84
|
|
|
{ |
85
|
|
|
return 'publicTypeHintedMethodDefault'; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @param array $param |
90
|
|
|
* |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function publicArrayHintedMethod(array $param) |
|
|
|
|
94
|
|
|
{ |
95
|
|
|
return 'publicArrayHintedMethodDefault'; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return string |
100
|
|
|
*/ |
101
|
|
|
public function & publicByReferenceMethod() |
102
|
|
|
{ |
103
|
|
|
$returnValue = 'publicByReferenceMethodDefault'; |
104
|
|
|
|
105
|
|
|
return $returnValue; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @param mixed $param |
110
|
|
|
* @param mixed $byRefParam |
111
|
|
|
* |
112
|
|
|
* @return string |
113
|
|
|
*/ |
114
|
|
|
public function publicByReferenceParameterMethod($param, & $byRefParam) |
|
|
|
|
115
|
|
|
{ |
116
|
|
|
return 'publicByReferenceParameterMethodDefault'; |
117
|
|
|
} |
118
|
|
|
} |
119
|
|
|
|