<?php

class SiteController extends Controller {

    public function actions() {
        return array(
            'page' => array(
                'class' => 'CViewAction',
            ),
        );
    }

    public function actionError() {
        if ($error = Yii::app()->errorHandler->error) {
            if (Yii::app()->request->isAjaxRequest)
                echo $error['message'];
            else
                $this->render('error', $error);
        }
    }

    public function actionClearSchemaCache() {
        Yii::app()->db->schema->getTables();
        Yii::app()->db->schema->refresh();

        echo "chache clear";
    }

}
