1
0
www.mikescher.com/app/controllers/SiteController.php

32 lines
671 B
PHP
Raw Normal View History

2014-05-06 12:16:20 +02:00
<?php
/**
*
* SiteController class
*
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @copyright 2013 2amigOS! Consultation Group LLC
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
class SiteController extends EController
{
public function actionIndex()
{
$this->render('index');
}
/**
* This is the action to handle external exceptions.
*/
public function actionError()
{
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
echo $error['message'];
else
$this->render('error', $error);
}
}
}