BasicRelationsManyMany.php | ||||
![]() | ||||
|
||||
![]() |
Coverage | ||||||||||
Classes | Functions / Methods | Lines | ||||||||
Total |
|
0.00% | 0 / 1 |
|
50.00% | 3 / 6 | CRAP |
|
25.00% | 4 / 16 |
BasicRelationsManyMany |
|
0.00% | 0 / 1 |
|
50.00% | 3 / 6 | 21.19 |
|
25.00% | 4 / 16 |
model($className=__CLASS__) |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 1 / 1 | |||
tableName() |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 1 / 1 | |||
rules() |
|
0.00% | 0 / 1 | 2 |
|
0.00% | 0 / 3 | |||
relations() |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 2 / 2 | |||
attributeLabels() |
|
0.00% | 0 / 1 | 2 |
|
0.00% | 0 / 3 | |||
search() |
|
0.00% | 0 / 1 | 2 |
|
0.00% | 0 / 6 |
1 : <?php 2 : 3 : /** 4 : * This is the model class for table "tbl_basic_relations_many_many". 5 : * 6 : * The followings are the available columns in table 'tbl_basic_relations_many_many': 7 : * @property integer $id 8 : * @property string $column_many_many_content 9 : */ 10 : class BasicRelationsManyMany extends RelationsActiveRecord { 11 : /** 12 : * Returns the static model of the specified AR class. 13 : * @return BasicRelationsManyMany the static model class 14 : */ 15 : public static function model($className=__CLASS__) { 16 2 : return parent::model($className); 17 : } 18 : 19 : /** 20 : * @return string the associated database table name 21 : */ 22 : public function tableName() { 23 8 : return 'tbl_basic_relations_many_many'; 24 : } 25 : 26 : /** 27 : * @return array validation rules for model attributes. 28 : */ 29 : public function rules() { 30 : return array( 31 0 : array ('column_many_many_content', 'length', 'max' => 255), 32 0 : array ('id, column_many_many_content', 'safe', 'on' => 'search'), 33 0 : ); 34 : } 35 : 36 : /** 37 : * @return array relational rules. 38 : */ 39 : public function relations() { 40 : return array( 41 1 : 'relation_many_mains' => array (self::MANY_MANY, 'BasicRelationsMain', 'tbl_basic_relations_pivot(column_many_many_id, column_main_id)'), 42 1 : ); 43 : } 44 : 45 : /** 46 : * @return array customized attribute labels (name=>label) 47 : */ 48 : public function attributeLabels() { 49 : return array( 50 0 : 'id' => 'ID', 51 0 : 'column_many_many_content' => 'Column Many Many Content', 52 0 : ); 53 : } 54 : 55 : /** 56 : * Retrieves a list of models based on the current search/filter conditions. 57 : * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. 58 : */ 59 : public function search() { 60 0 : $criteria=new CDbCriteria; 61 0 : $criteria->compare('id',$this->id); 62 0 : $criteria->compare('column_many_many_content',$this->column_many_many_content,true); 63 0 : return new CActiveDataProvider('BasicRelationsManyMany', array( 64 0 : 'criteria'=>$criteria, 65 0 : )); 66 : } 67 : } |
![]() |
Generated by PHP_CodeCoverage 1.1.2 using PHP 5.4.4-14+deb7u2 and PHPUnit 3.6.10 at Wed Aug 14 22:01:23 CDT 2013. |