Files
yii/framework/cli/views/shell/model/model.php
2009-01-09 22:07:29 +00:00

48 lines
746 B
PHP

<?php
class {ClassName} extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @return CActiveRecord the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* @return string the associated database table name
*/
public function tableName()
{
return '{TableName}';
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
return array({Rules}
);
}
/**
* @return array relational rules.
*/
public function relations()
{
return array(
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
);
}
}