Merge pull request #140 from nyeholt/master

Use the dependency injector for creating controllers
This commit is contained in:
Sam Minnée 2012-05-29 22:39:44 -07:00
commit 4710011978

View File

@ -24,7 +24,7 @@ class ModelAsController extends Controller implements NestedController {
$controller = $controller . '_' . ucfirst($action);
}
return class_exists($controller) ? new $controller($sitetree) : $sitetree;
return class_exists($controller) ? Injector::inst()->create($controller, $sitetree) : $sitetree;
}
public function init() {