Only scan public methods

__call magic kicks in if the function is protected.
This commit is contained in:
Barry vd. Heuvel
2013-06-28 13:24:24 +02:00
parent ae0dce2abd
commit d042c6ea8e
@@ -221,13 +221,13 @@ exit('Only to be used as an helper for your IDE');\n\n";
} }
$reflection = new \ReflectionClass($class); $reflection = new \ReflectionClass($class);
$methods = $reflection->getMethods(); $methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
if($methods) if($methods)
{ {
foreach ($methods as $method) foreach ($methods as $method)
{ {
if(!in_array($method->name, $usedMethods)){ if(!in_array($method->name, $usedMethods)){
if($method->isPublic() && $addOutput){ if( $addOutput){
$output .= $this->parseMethod($method, $alias); $output .= $this->parseMethod($method, $alias);
} }
$usedMethods[] = $method->name; $usedMethods[] = $method->name;