public function __construct(Request $request, Response $response) { $this->request = $request; $this->response = $response; // @TODO: Clean this up - we should instantiate a default model. $modelName = ucfirst(strtolower(Inflector::singularize(str_replace('Controller', '', get_class($this))))); if (class_exists($modelName)) { $this->{$modelName} = new $modelName(); } }