示例#1
0
 public function set_country($pValue)
 {
     $country = Zupal_Places_Countries::getInstance()->get_country($pValue);
     if ($country) {
         $this->country = $country->identity();
     } else {
         $this->country = 0;
     }
 }
示例#2
0
 public function setCountry($pValue)
 {
     if ($pValue instanceof Zend_Places_Countries) {
         $this->country_id = $pValue->identity();
         $this->country = $pValue->get_value();
     } else {
         $country = Zupal_Places_Countries::getInstance()->get_country($pValue);
         if ($country) {
             $this->country_id = $country->identity();
             $this->country = $country->get_value();
         } else {
             $this->country_id = '';
             $this->country = '';
             //@TODO: throw error?
         }
     }
 }