| 
        
            ReflectionClass::getMethodsGets an array of methods Description
   public array ReflectionClass::getMethods
    ([ int  
  $filter
  ] )Gets an array of methods for the class. Parameters
 
 Return ValuesAn array of ReflectionMethod objects reflecting each method. Examples
 Example #1 Basic usage of ReflectionClass::getMethods 
<?phpThe above example will output: 
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 
<?phpThe above example will output: 
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"
  }
}
See Also
 
  |