1 | <?php |
||
34 | class ReflectionParameter extends Object implements ParameterInterface, \Serializable |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The name of the class the parameter belongs to. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $className; |
||
43 | |||
44 | /** |
||
45 | * The name of the method the parameter belongs to. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $methodName; |
||
50 | |||
51 | /** |
||
52 | * The parameter name. |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $parameterName; |
||
57 | |||
58 | /** |
||
59 | * Initializes the reflection parameter with the passed data. |
||
60 | * |
||
61 | * @param string $className The name of the class the parameter belongs to |
||
62 | * @param string $methodName The name of the method the parameter belongs to |
||
63 | * @param string $parameterName The parameter name |
||
64 | */ |
||
65 | 5 | public function __construct($className, $methodName, $parameterName) |
|
77 | |||
78 | /** |
||
79 | * This method returns the class name as |
||
80 | * a string. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public static function __getClass() |
||
88 | |||
89 | /** |
||
90 | * Returns name of the class the parameter belongs to. |
||
91 | * |
||
92 | * @return string The class name |
||
93 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::getClassName() |
||
94 | */ |
||
95 | 2 | public function getClassName() |
|
99 | |||
100 | /** |
||
101 | * Returns name of the method the parameter belongs to. |
||
102 | * |
||
103 | * @return string The method name |
||
104 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::getMethodName() |
||
105 | */ |
||
106 | 2 | public function getMethodName() |
|
110 | |||
111 | /** |
||
112 | * Returns the parameter position. |
||
113 | * |
||
114 | * @return string The parameter position |
||
115 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::getParameterName() |
||
116 | */ |
||
117 | 3 | public function getParameterName() |
|
121 | |||
122 | /** |
||
123 | * Returns the parameters position. |
||
124 | * |
||
125 | * @return string The parameters position |
||
126 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::getPosition() |
||
127 | */ |
||
128 | 2 | public function getPosition() |
|
132 | |||
133 | /** |
||
134 | * Returns the parameters class name. |
||
135 | * |
||
136 | * @return string The parameters class name |
||
137 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::getType() |
||
138 | */ |
||
139 | public function getType() |
||
143 | |||
144 | /** |
||
145 | * Serializes the timeout method and returns a string representation. |
||
146 | * |
||
147 | * @return string The serialized string representation of the instance |
||
148 | * @see \Serializable::serialize() |
||
149 | */ |
||
150 | 1 | public function serialize() |
|
154 | |||
155 | /** |
||
156 | * Restores the instance with the serialized data of the passed string. |
||
157 | * |
||
158 | * @param string $data The serialized property representation |
||
159 | * |
||
160 | * @return void |
||
161 | * @see \Serializable::unserialize() |
||
162 | */ |
||
163 | 1 | public function unserialize($data) |
|
169 | |||
170 | /** |
||
171 | * Returns a PHP reflection parameter representation of this instance. |
||
172 | * |
||
173 | * @return \ReflectionProperty The PHP reflection parameter instance |
||
174 | * @see \AppserverIo\Lang\Reflection\ParameterInterface::toPhpReflectionParameter() |
||
175 | */ |
||
176 | 2 | public function toPhpReflectionParameter() |
|
180 | |||
181 | /** |
||
182 | * Returns an array of reflection parameter instances from the passed reflection method. |
||
183 | * |
||
184 | * @param \AppserverIo\Lang\Reflection\ReflectionMethod $reflectionMethod The reflection method to return the parameters for |
||
185 | * |
||
186 | * @return array An array with ReflectionParameter instances |
||
187 | */ |
||
188 | 2 | public static function fromReflectionMethod(ReflectionMethod $reflectionMethod) |
|
203 | |||
204 | /** |
||
205 | * Creates a new reflection parameter instance from the passed PHP reflection parameter. |
||
206 | * |
||
207 | * @param \ReflectionParameter $reflectionParameter The reflection parameter to load the data from |
||
208 | * |
||
209 | * @return \AppserverIo\Lang\Reflection\ReflectionParameter The instance |
||
210 | */ |
||
211 | 2 | public static function fromPhpReflectionParameter(\ReflectionParameter $reflectionParameter) |
|
222 | } |
||
223 |