示例#1
0
文件: provider.php 项目: jawngee/Thor
	/**
	* Describes the schema and validation rules for this object.  This is auto-generated.
	*/
	protected function describe()
	{
	    parent::describe();

	    // create validators for columns
	    $this->validators["driver"]=array(
		RequiredValidator::Create("driver is required.")
	    );
	    $this->validators["name"]=array(
		RequiredValidator::Create("name is required.")
	    );

	    // create relations for columns
	    $this->related['accounts']=new Relation($this,'accounts',Relation::RELATION_MANY,'provider.account','provider_id');
	}
示例#2
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }