本文整理匯總了PHP中CSSMin::serializeStringValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSSMin::serializeStringValue方法的具體用法?PHP CSSMin::serializeStringValue怎麽用?PHP CSSMin::serializeStringValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSSMin
的用法示例。
在下文中一共展示了CSSMin::serializeStringValue方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getLessVars
/**
* Get language-specific LESS variables for this module.
*
* @since 1.27
* @param ResourceLoaderContext $context
* @return array
*/
protected function getLessVars(ResourceLoaderContext $context)
{
$vars = parent::getLessVars($context);
$language = Language::factory($context->getLanguage());
foreach ($language->getImageFiles() as $key => $value) {
$vars[$key] = CSSMin::serializeStringValue($value);
}
return $vars;
}
示例2: getLessVars
/**
* Get language-specific LESS variables for this module.
*
* @return array
*/
private function getLessVars(ResourceLoaderContext $context)
{
$language = Language::factory($context->getLanguage());
// This is very conveniently formatted and we can pass it right through
$vars = $language->getImageFiles();
// less.php tries to be helpful and parse our variables as LESS source code
foreach ($vars as $key => &$value) {
$value = CSSMin::serializeStringValue($value);
}
return $vars;
}