<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BaseAction
 *
 * @author apple
 */
class BaseAction extends CAction
{
    public function run()
    {
        throw new Exception('子类必须重新实现此方法');
    }

    public function performAjaxValidation($model, $formName = 'form')
    {
        if(isset($_POST['ajax']) && $formName === $_POST['ajax'])
        {
            echo CActiveForm::validate($model);
            Yii::app()->end();
        }
    }
}