app\controllers\SiteController::actionIndex PHP Метод

actionIndex() публичный Метод

Render the homepage
public actionIndex ( )
    public function actionIndex()
    {
        return $this->render('index');
    }

Usage Example

Пример #1
0
 public function run()
 {
     $site = new SiteController();
     switch ($_SERVER["REQUEST_URI"]) {
         case '/':
         case '/home':
             return $site->actionIndex();
             break;
         case '/profile':
             return $site->actionProfile();
             break;
         case '/login':
             return $site->actionLogin();
             break;
         case '/signup':
             return $site->actionSignup();
             break;
         case '/email-unique':
             return $site->actionEmailUnique();
             break;
         case '/verify-password':
             return $site->actionVerifyPassword();
             break;
         case '/logout':
             return $site->actionLogout();
             break;
         case '/400':
             $error = new ErrorController(400);
             return $error->actionIndex();
             break;
         case '/403':
             $error = new ErrorController(403);
             return $error->actionIndex();
             break;
         default:
             $error = new ErrorController(404);
             return $error->actionIndex();
             break;
     }
 }