コード例 #1
0
ファイル: account.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["provider_id"]=array(
		RequiredValidator::Create("provider_id is required.")
	    );
	    $this->validators["name"]=array(
		RequiredValidator::Create("name is required.")
	    );

	    // create relations for columns
	    $this->related['inventory']=new Relation($this,'inventory',Relation::RELATION_MANY,'provider.inventory','account_id');
	    $this->related['keys']=new Relation($this,'keys',Relation::RELATION_MANY,'provider.keys','account_id');
	    $this->related['provider']=new Relation($this,'provider',Relation::RELATION_SINGLE,'provider.provider','id','provider_id');
	}
コード例 #2
0
ファイル: BaseAccount.php プロジェクト: dapepe/tymio
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return AccountPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new AccountPeer();
     }
     return self::$peer;
 }
コード例 #3
0
ファイル: PlusGiro.php プロジェクト: hyperunknown/banking
 public function getClearingNumber()
 {
     return parent::getClearingNumber() ?: '0000';
 }
コード例 #4
0
ファイル: Bankgiro.php プロジェクト: hyperunknown/banking
 public function getSerialNumber()
 {
     return str_replace('-', '', parent::getSerialNumber());
 }
コード例 #5
0
ファイル: Account.php プロジェクト: ajbrown/bitnotion
 public function setUp()
 {
     parent::setUp();
     $this->hasMutator('password', 'passwordMutator');
 }