Skip to content

Commit

Permalink
Fixed coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
sensorario committed Oct 11, 2012
1 parent 542b8f8 commit c49e7f9
Showing 1 changed file with 70 additions and 69 deletions.
139 changes: 70 additions & 69 deletions models/NotifyiiReads.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,81 +11,82 @@
*/
class NotifyiiReads extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return NotifyiiReads the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return NotifyiiReads 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 'notifyii_reads';
}
/**
* @return string the associated database table name
*/
public function tableName()
{
return 'notifyii_reads';
}

/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('user_id, notification_id, readed', 'numerical', 'integerOnly'=>true),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, user_id, notification_id, readed', 'safe', 'on'=>'search'),
);
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('user_id, notification_id, readed', 'numerical', 'integerOnly' => true),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array('id, user_id, notification_id, readed', 'safe', 'on' => 'search'),
);
}

/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
);
}
/**
* @return array relational rules.
*/
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
);
}

/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'id' => 'ID',
'user_id' => 'User',
'notification_id' => 'Notification',
'readed' => 'Readed',
);
}
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'id' => 'ID',
'user_id' => 'User',
'notification_id' => 'Notification',
'readed' => 'Readed',
);
}

/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
/**
* Retrieves a list of models based on the current search/filter conditions.
* @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
*/
public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.

$criteria=new CDbCriteria;
$criteria = new CDbCriteria;

$criteria->compare('id',$this->id);
$criteria->compare('user_id',$this->user_id);
$criteria->compare('notification_id',$this->notification_id);
$criteria->compare('readed',$this->readed);
$criteria->compare('id', $this->id);
$criteria->compare('user_id', $this->user_id);
$criteria->compare('notification_id', $this->notification_id);
$criteria->compare('readed', $this->readed);

return new CActiveDataProvider($this, array(
'criteria' => $criteria,
));
}

return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
}
}

0 comments on commit c49e7f9

Please sign in to comment.