本文整理汇总了PHP中Environment::uriComponentsResource方法的典型用法代码示例。如果您正苦于以下问题:PHP Environment::uriComponentsResource方法的具体用法?PHP Environment::uriComponentsResource怎么用?PHP Environment::uriComponentsResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Environment
的用法示例。
在下文中一共展示了Environment::uriComponentsResource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flush
/**
* @see \Components\Debug_Appender::flush() flush
*/
public function flush()
{
if (count($this->m_dumps)) {
$json = json_encode([$this->m_dumps, $this->m_groups]);
$this->clear();
if (false === self::$appendDebugHeaders) {
$jquery = Environment::uriComponentsResource('ui/js/jquery/jquery-1.11.2.min.js');
$libstd = Environment::uriComponentsResourceLibstd();
$verbosity = Debug::verbosity();
echo <<<SCRIPT
<script type="text/javascript">
var __lcl=false;
var __lcd=function()
{
if("undefined"==typeof(libstd_components))
{
if(__lcl) return setTimeout(__lcd, 10);
if("undefined"!=typeof(parent.libstd_components)) libstd_components=parent.libstd_components;
else {
__lcl=true; document.writeln('<meta name="libstd.debug" content="{$verbosity}"/>');
if("undefined"==typeof(jQuery)) document.writeln('<script type="text/javascript" src="{$jquery}"><\\/script>');
document.writeln('<script type="text/javascript" src="{$libstd}"><\\/script>');
return setTimeout(__lcd, 10);
}
}
libstd_components.dump({$json});
};
__lcd();
</script>
SCRIPT;
}
}
}
示例2: style
/**
* @param string $name_
* @param string $media_
*
* @return boolean
*/
public function style($name_, $media_ = 'all')
{
if (0 === strpos($name_, '/')) {
return false;
}
$chunks = explode('/', $name_);
$ns = array_shift($chunks);
$path = Environment::pathComponentsResource($ns, 'resource', 'css', implode('/', $chunks) . '.css');
$uri = Environment::uriComponentsResource($ns . '/css/' . implode('/', $chunks) . '.css');
$options = [];
$options['href'] = $uri;
$options['media'] = $media_;
$this->styles[$path] = $options;
return true;
}
示例3: icon
/**
* @param string $size_
*
* @return string
*/
public function icon($size_ = self::ICON_SIZE_16)
{
return Environment::uriComponentsResource('io/image/icon/mime', $size_, "{$this->m_name}.png");
}