Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : AddressType | ||
Результат | AddressType | the static model class |
private static function getAddressType($addr_type) { switch ($addr_type) { case 'HOME': return \AddressType::model()->find('name=?', array('Home'))->id; } return; }
/** * @covers AddressType::model */ public function testModel() { $this->assertEquals('AddressType', get_class(AddressType::model()), 'Class name should match model.'); }