本文整理汇总了PHP中FileRepo::getZoneUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP FileRepo::getZoneUrl方法的具体用法?PHP FileRepo::getZoneUrl怎么用?PHP FileRepo::getZoneUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileRepo
的用法示例。
在下文中一共展示了FileRepo::getZoneUrl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getThumbUrl
/**
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
*
* @param $suffix bool|string if not false, the name of a thumbnail file
*
* @return path
*/
function getThumbUrl($suffix = false)
{
$this->assertRepoDefined();
$path = $this->repo->getZoneUrl('thumb') . '/' . $this->getUrlRel();
if ($suffix !== false) {
$path .= '/' . rawurlencode($suffix);
}
return $path;
}
示例2: getThumbUrl
/**
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
*
* @param $suffix bool|string if not false, the name of a thumbnail file
*
* @return path
*/
function getThumbUrl($suffix = false)
{
$this->assertRepoDefined();
$path = $this->repo->getZoneUrl('thumb') . '/' . $this->getUrlRel();
$path = wfReplaceImageServer($path, $this->getTimestamp());
// Wikia change (BAC-1206)
if ($suffix !== false) {
$path .= '/' . rawurlencode($suffix);
}
return $path;
}
示例3: getZoneUrl
/**
* Get the URL of the zone directory, or a particular file if $suffix is specified
*
* @param string $zone name of requested zone
* @param bool|string $suffix if not false, the name of a file in zone
*
* @return string path
*/
function getZoneUrl($zone, $suffix = false)
{
$this->assertRepoDefined();
$ext = $this->getExtension();
$path = $this->repo->getZoneUrl($zone, $ext) . '/' . $this->getUrlRel();
if ($suffix !== false) {
$path .= '/' . rawurlencode($suffix);
}
return $path;
}
示例4: getZoneUrl
/**
* @see FileRepo::getZoneUrl()
*/
function getZoneUrl($zone)
{
switch ($zone) {
case 'public':
return $this->url;
case 'thumb':
return $this->thumbUrl;
default:
return parent::getZoneUrl($zone);
}
}
示例5: getZoneUrl
/** Returns zone part of repo URL, plus base URL, to be appended to S3 base URL
* @see FileRepo::getZoneUrl()
*/
function getZoneUrl($zone, $ext = NULL)
{
switch ($zone) {
case 'public':
$retval = $this->url;
break;
case 'temp':
$retval = "{$this->url}/temp";
break;
case 'deleted':
$retval = parent::getZoneUrl($zone);
// no public URL
break;
case 'thumb':
$retval = $this->thumbUrl;
break;
default:
$retval = parent::getZoneUrl($zone);
break;
}
wfDebug(__METHOD__ . ": " . print_r($zone, true) . ", retval: {$retval} \n");
return $retval;
}
示例6: getZoneUrl
/**
* @see FileRepo::getZoneUrl()
*
* @param $zone string
*
* @return url
*/
function getZoneUrl($zone)
{
switch ($zone) {
case 'public':
return $this->url;
case 'temp':
return "{$this->url}/temp";
case 'deleted':
return parent::getZoneUrl($zone);
// no public URL
// no public URL
case 'thumb':
return $this->thumbUrl;
default:
return parent::getZoneUrl($zone);
}
}