コード例 #1
0
ファイル: Cities.php プロジェクト: BGCX262/zupal-svn-to-git
 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
ファイル: Places.php プロジェクト: BGCX262/zupal-svn-to-git
 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?
         }
     }
 }