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


PHP Shopp::add_query_string方法代碼示例

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


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

示例1: url

 /**
  * Returns a URL for a resized image.
  *
  * If direct mode is enabled (which it is by
  * default) and the image is already cached to the file system then a URL for that
  * file will be returned.
  *
  * In all other cases a Shopp Image Server URL will be returned.
  *
  * @param $width
  * @param $height
  * @param $scale
  * @param $sharpen
  * @param $quality
  * @param $fill
  * @return string
  */
 public function url($width = null, $height = null, $scale = null, $sharpen = null, $quality = null, $fill = null)
 {
     $request = array();
     $url = Shopp::url('' != get_option('permalink_structure') ? trailingslashit($this->id) . $this->filename : $this->id, 'images');
     // Get the current URI
     $uri = $this->uri;
     // Handle resize requests
     $params = func_get_args();
     if (count($params) > 0) {
         list($width, $height, $scale, $sharpen, $quality, $fill) = $params;
         $request = $this->resizing($width, $height, $scale, $sharpen, $quality, $fill);
         // Build the path to the cached copy of the file (if it exists)
         $size = $this->cachefile($request);
         $uri = "cache_{$size}_{$this->filename}";
         // Override the URI for the request
     }
     // Ask the engine if we have a direct URL
     $direct_url = $this->engine()->direct($uri);
     if (false !== $direct_url) {
         return $direct_url;
     }
     if (empty($request)) {
         return $url;
     } else {
         return Shopp::add_query_string($request, $url);
     }
 }
開發者ID:forthrobot,項目名稱:inuvik,代碼行數:44,代碼來源:Asset.php

示例2: add_query_string

/**
 * @deprecated Use Shopp::add_query_string()
 **/
function add_query_string($string, $url)
{
    return Shopp::add_query_string($string, $url);
}
開發者ID:BlessySoftwares,項目名稱:anvelocom,代碼行數:7,代碼來源:Core.php


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