model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : AddressType
return AddressType the static model class
Example #1
0
 private static function getAddressType($addr_type)
 {
     switch ($addr_type) {
         case 'HOME':
             return \AddressType::model()->find('name=?', array('Home'))->id;
     }
     return;
 }
Example #2
0
 /**
  * @covers AddressType::model
  */
 public function testModel()
 {
     $this->assertEquals('AddressType', get_class(AddressType::model()), 'Class name should match model.');
 }