|
update : 2015.11.03
php.shukuma.com검색:
|
ReflectionClass::getMethods(PHP 5) ReflectionClass::getMethods — Gets an array of methods 설명
public array ReflectionClass::getMethods
([ int
$filter
] )Gets an array of methods for the class. 인수
반환값An array of ReflectionMethod objects reflecting each method. 예제
Example #1 Basic usage of ReflectionClass::getMethods()
<?php위 예제의 출력:
array(3) {
[0]=>
&object(ReflectionMethod)#2 (2) {
["name"]=>
string(11) "firstMethod"
["class"]=>
string(5) "Apple"
}
[1]=>
&object(ReflectionMethod)#3 (2) {
["name"]=>
string(12) "secondMethod"
["class"]=>
string(5) "Apple"
}
[2]=>
&object(ReflectionMethod)#4 (2) {
["name"]=>
string(11) "thirdMethod"
["class"]=>
string(5) "Apple"
}
}
Example #2 Filtering results from ReflectionClass::getMethods()
<?php위 예제의 출력:
array(2) {
[0]=>
&object(ReflectionMethod)#2 (2) {
["name"]=>
string(12) "secondMethod"
["class"]=>
string(5) "Apple"
}
[1]=>
&object(ReflectionMethod)#3 (2) {
["name"]=>
string(11) "thirdMethod"
["class"]=>
string(5) "Apple"
}
}
|