/** * 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($table_name) { self::$tableName = $table_name; return parent::model(__CLASS__); }