本文整理匯總了PHP中JFile::removespace方法的典型用法代碼示例。如果您正苦於以下問題:PHP JFile::removespace方法的具體用法?PHP JFile::removespace怎麽用?PHP JFile::removespace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JFile
的用法示例。
在下文中一共展示了JFile::removespace方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: generateCacheFileName
/**
* Here's where are the chacheing get's done.
* First we need to generate the cache name.
* Then we need to create the directory path
* relative to Cache/media, and based off an
* md5_file($filename).
*/
private function generateCacheFileName()
{
$imageName = JFile::makesafe(basename($this->getFileName()));
$imageName = JFile::removespace($imageName);
$imageName = explode('.', $imageName);
$imageName = str_replace('_', '', $imageName[0]);
$cacheFileName = $imageName;
$cacheFileName .= $this->thumbw . 'x' . $this->thumbh;
$cacheFileName .= '_q' . intval($this->getQuality());
if ($this->square) {
$cacheFileName .= '_sq';
}
$cacheFileName .= '.jpg';
$this->broadDirectories = $this->generateCacheDir() . DS;
$this->cacheFileName = $this->cacheDirectory . $this->broadDirectories . $this->cachePrefix . $cacheFileName;
return true;
}