예제 #1
0
 /**
  * Méthode POST
  * @param type $data
  */
 public function save($data, $isApi = false)
 {
     $paysTable = $this->getServiceLocator()->get('pays-table');
     $country = new \CountryReferential\Model\Pays();
     $country->exchangeArray($data);
     $paysTable->saveCountry($country, $isApi);
 }
예제 #2
0
 public function saveCountry($data)
 {
     if (is_array($data)) {
         $country = new \CountryReferential\Model\Pays();
         $country->exchangeArray($data);
     } else {
         $country = $data;
     }
     $paysTable = $this->getServiceLocator()->get('pays-table');
     $paysTable->saveCountry($country);
     return true;
 }