本文整理汇总了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;
}