當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WPSC_Countries::get_currency方法代碼示例

本文整理匯總了PHP中WPSC_Countries::get_currency方法的典型用法代碼示例。如果您正苦於以下問題:PHP WPSC_Countries::get_currency方法的具體用法?PHP WPSC_Countries::get_currency怎麽用?PHP WPSC_Countries::get_currency使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WPSC_Countries的用法示例。


在下文中一共展示了WPSC_Countries::get_currency方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Create a WPSC_Currency object
  *
  * @access public
  *
  * @since 3.8.14
  *
  * @param 	string	$code			this currency's code, like "USD" for a U.S.A dollar, or "EUR" for a euro
  * @param 	string	$symbol			the text symbol for this currency, like "$"
  * @param 	string	$symbol_html    the HTML representation of the symbol, like "$"
  * @param 	string	$name           the currency name, like "US Dollar" or "Euro"
  *
  * @return void
  */
 public function __construct($code, $symbol = null, $symbol_html = null, $name = null)
 {
     // if all parameters are specified we are trying to make a new currency object
     if (!empty($code) && ($symbol != null || $symbol_html != null || $name != null)) {
         // Create a new currency object
         $this->code = $code;
         $this->symbol = $symbol;
         $this->symbol_html = $symbol_html;
         $this->name = $name;
     } else {
         // if only code is specified the constructor is typing to get the information about an existing currency
         $wpsc_currency = WPSC_Countries::get_currency($code);
         $this->code = $wpsc_currency->code;
         $this->symbol = $wpsc_currency->symbol;
         $this->symbol_html = $wpsc_currency->symbol_html;
         $this->name = $wpsc_currency->name;
     }
 }
開發者ID:ashik968,項目名稱:digiplot,代碼行數:32,代碼來源:wpsc-currency.class.php


注:本文中的WPSC_Countries::get_currency方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。