Example #1
0
 /**
  * Validate that $account equals this instance
  *
  * @param  Account $account
  * @return bool
  */
 public function equals(Account $account)
 {
     if ($this->getNumber() != $account->getNumber() || $this->getType() != $account->getType() || $this->getName() != $account->getName()) {
         return false;
     }
     return true;
 }
Example #2
0
 /**
  * Add account
  *
  * @param  Account $account
  * @return void
  */
 public function addAccount(Account $account)
 {
     $nr = intval($account->getNumber());
     $this->accounts[$nr] = $account;
 }