-
-
Save harikt/4547632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require the file | |
$class = "ClassName"; | |
$r = new ReflectionClass($class); | |
$str = ''; | |
foreach($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { | |
$rm = new ReflectionMethod($class, $method->name); | |
$pieces = array(); | |
foreach($rm->getParameters() as $params ) { | |
$pieces[] = $params->name; | |
} | |
$str .= lcfirst($method->name) . '(' . implode(',', $pieces) . ')' . PHP_EOL; | |
} | |
file_put_contents('classes.txt', $str); | |
// You will get output in classes.txt . This only takes public methods.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment