ReflectionClass::getMethods Obtiene un array de métodos &reftitle.description; public arrayReflectionClass::getMethods intnullfilter&null; Obtiene un array de los métodos de una clase. &reftitle.parameters; filter Filtra los resultados para incluir únicamente los métodos con ciertos atributos. Por omisión, no se aplica ningún filtro. Cualquier disyunción a nivel de bits de ReflectionMethod::IS_STATIC, ReflectionMethod::IS_PUBLIC, ReflectionMethod::IS_PROTECTED, ReflectionMethod::IS_PRIVATE, ReflectionMethod::IS_ABSTRACT y ReflectionMethod::IS_FINAL, de modo que se devuelven todos los métodos con cualquiera de los atributos proporcionados. Tenga en cuenta que otras operaciones a nivel de bits, por ejemplo ~ no funcionarán como se espera. En otras palabras, no es posible obtener todos los métodos no estáticos, por ejemplo. &reftitle.returnvalues; Un &array; de objetos ReflectionMethod que reflejan cada método. &reftitle.changelog; &Version; &Description; 7.2.0 filter ahora es nullable. &reftitle.examples; Uso simple de <methodname>ReflectionClass::getMethods</methodname> getMethods(); var_dump($methods); ?> ]]> &example.outputs; 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" } } ]]> Filtro de resultados desde <methodname>ReflectionClass::getMethods</methodname> getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_FINAL); var_dump($methods); ?> ]]> &example.outputs; 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" } } ]]> &reftitle.seealso; ReflectionClass::getMethod get_class_methods