Extend the facade class

Fixes Issue #1
Only extended when it is not the same as the root class (because of
overriding static methods)
This commit is contained in:
Barry
2013-04-01 19:15:48 +02:00
parent ec18f19777
commit 063e59895c
@@ -138,8 +138,13 @@ class GeneratorCommand extends Command {
$output .= "namespace $namespace {\n";
if($sublime){
$output .= " class $alias extends \\$root{\n";
}else{
//If the root class is not the same as the facade extend it.
if($root !== $facade){
$output .= " class $alias extends $facade{\n";
}else{
$output .= " class $alias{\n";
}
$output .= "\t/**\n\t * @var \\$root \$root\n\t */\n\t static private \$root;\n\n";
}
$methods = $d->getMethods();