Ejemplo n.º 1
0
 public function hydrate($tab)
 {
     $contact = new Client();
     $contact->setId($tab['rowid']);
     $contact->setCustomerCode($tab['code_client']);
     $contact->setName($tab['nom']);
     $contact->setPhone($tab['phone']);
     $contact->setAddress($tab['address']);
     $contact->setCity($tab['town']);
     $contact->setZipcode($tab['zip']);
     $contact->setCountry($tab['label']);
     $contact->setFax($tab['fax']);
     $contact->setRefExt($tab['ref_ext']);
     return $contact;
 }
Ejemplo n.º 2
0
 /**
  * @param $tab
  * @return Client
  */
 public function hydrateClient($tab)
 {
     $client = new Client();
     $client->setId($tab->id);
     $client->setCustomerCode($tab->customer_code);
     $client->setName($tab->ref);
     $client->setRefExt($tab->ref_ext);
     $client->setAddress($tab->adress);
     $client->setZipcode($tab->zip);
     $client->setCity($tab->town);
     $client->setCountry($tab->country);
     $client->setPhone($tab->phone);
     $client->setFax($tab->fax);
     $client->setUrl($tab->url);
     return $client;
 }