/** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return GiftCodeModel the static model class */ public static function model($tableName = false, $className = __CLASS__) { self::$tableName = $tableName; return parent::model(__CLASS__); }