/** * Factory method, enables dependency injection * @param <type> $controller * @param Request $request * @return controller */ public static function factory($controller, Request $req, Response $res) { return new $controller($req, $res, Auth::factory()); }
/** * Validates the model, and performs authentication * @return <type> */ public function validate() { return $this->_authenticate(Auth::factory()); }