Beispiel #1
0
 public function __construct($clientID, $signatory, $partnerID)
 {
     if ((int) $clientID > 0) {
         $this->_clientID = $clientID;
     } else {
         throw new \Exception('Client Class: Client ID is 0');
     }
     $this->_signatory = $signatory;
     $this->_partnerID = $partnerID;
     if ($this->_signatory == 1) {
         $this->_DB = ClientModel::forge($clientID);
     } else {
         if ($this->_signatory == 2) {
             $this->_DB = PartnerModel::forge($partnerID);
         } else {
             if ($this->_signatory == 3) {
                 $this->_DB = ClientModel::forge($clientID);
                 $this->_DB2 = PartnerModel::forge($partnerID);
                 $this->_partner = new static($clientID, 2, $partnerID);
             }
         }
     }
     // -- Load the Client up
     // ---------------------
     $this->load();
 }
Beispiel #2
0
 public function __construct($partnerID = 0)
 {
     if ((int) $partnerID > 0) {
         $this->_partnerID = $partnerID;
     } else {
         throw new \Exception('Partner Class: Client ID is 0');
     }
     PartnerModel::forge($partnerID);
     // -- Load the Partner up
     // ----------------------
     $this->load();
 }