1 | <?php |
||
18 | class Log extends CActiveRecord |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Returns the static model of the specified AR class. |
||
23 | * @param string $className active record class name. |
||
24 | * @return Log the static model class |
||
25 | */ |
||
26 | public static function model($className = __CLASS__) |
||
27 | { |
||
28 | return parent::model($className); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return string the associated database table name |
||
33 | */ |
||
34 | public function tableName() |
||
38 | |||
39 | /** |
||
40 | * @return array validation rules for model attributes. |
||
41 | */ |
||
42 | public function rules() |
||
43 | { |
||
44 | return array( |
||
45 | array('id, level, category, logtime, source_address, message', 'safe', 'on'=>'search'), |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return array customized attribute labels (name=>label) |
||
51 | */ |
||
52 | public function attributeLabels() |
||
63 | |||
64 | /** |
||
65 | * Retrieves a list of models based on the current search/filter conditions. |
||
66 | * @return CActiveDataProvider the data provider that can return the models |
||
67 | * based on the search/filter conditions. |
||
68 | */ |
||
69 | public function search() |
||
89 | |||
90 | } |
||
91 |