Highway to PSR2
[openemr.git] / portal / patient / libs / Controller / DefaultController.php
bloba32ca5e57a4ce4121a194edd743ed518c185cc9b
1 <?php
2 /** @package Openemr::Controller */
4 /** import supporting libraries */
5 require_once("AppBaseController.php");
7 /**
8 * DefaultController is the entry point to the application
10 * From phreeze package
11 * @license http://www.gnu.org/copyleft/lesser.html LGPL
13 * @package Openemr::Controller
14 * @author ClassBuilder
15 * @version 1.0
17 class DefaultController extends AppBaseController
20 /**
21 * Override here for any controller-specific functionality
23 protected function Init()
25 parent::Init();
27 // TODO: add controller-wide bootstrap code
29 // TODO: if authentiation is required for this entire controller, for example:
30 // $this->RequirePermission(SecureApp::$PERMISSION_USER,'SecureApp.LoginForm');
33 /**
34 * Display the home page for the application
36 public function Home()
38 $this->Render();
41 /**
42 * Displayed when an invalid route is specified
44 public function Error404()
46 $this->Render();
49 /**
50 * Display a fatal error message
52 public function ErrorFatal()
54 $this->Render();
57 public function ErrorApi404()
59 $this->RenderErrorJSON('An unknown API endpoint was requested.');