Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

/mvc/controllers/index

[return to app]
1 <?php
2
/**
3  * This controller loads automatically when controller is not defined explicitly in the URL
4  */
5
class indexController {
6     
/**
7      * The index method loads automatically when the action is not defined explicitly in the URL
8      *
9      * @return array
10      */
11     
public function index() {
12         if (isset(
$_POST['logout'])) {
13             
get::component('account')->logout();
14             
load::redirect('/'); //removes POST values
15             
return;
16         }
17         if (isset(
$_GET['forgotPassword'])) {
18             
$forgotPassword get::component('account')->forgotPassword();
19         }
20         return 
compact('forgotPassword');
21     }
22 }