Beispiel #1
0
	/**
	* 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');
	}
Beispiel #2
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }