本文整理汇总了PHP中Asset::get_filepath_css方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset::get_filepath_css方法的具体用法?PHP Asset::get_filepath_css怎么用?PHP Asset::get_filepath_css使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Asset
的用法示例。
在下文中一共展示了Asset::get_filepath_css方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: compile
/**
* Compile
*
* Usage:
* {{ compass:compile file="" output="" }}
*
* @param array
* @return array
*/
function compile()
{
$this->load->library('compass');
$this->load->library('asset');
$file = $this->attribute('file', 'style.scss');
$attributes = $this->attributes();
$module = $this->attribute('module', '_theme_');
$output = $this->attribute('output', 'style.css');
$base = $this->attribute('base', 'css');
foreach (array('file', 'module', 'base', 'output') as $key) {
if (isset($attributes[$key])) {
unset($attributes[$key]);
} else {
if ($key === 'file') {
return '';
}
}
}
try {
$viewsPath = rtrim($this->load->get_var('template_views'), '/');
$themePath = preg_replace('#(\\/views(\\/web|\\/mobile)?)$#', '', $viewsPath) . '/';
$compass = new Compass();
$compass->init(Asset::get_filepath_css($file, false), Asset::get_filepath_css($output, false));
return link_tag(Asset::get_filepath_css($output, true), 'stylesheet');
} catch (exception $ex) {
exit('Compass fatal error:<br />' . $file . ',' . $module . ',' . $base . '<br />' . $ex->getMessage());
}
}
示例2: css_path
/**
* Theme CSS PATH
*
* Usage:
* {{ theme:css_path file="" }}
*
* @return string The CSS location path
*/
public function css_path()
{
$file = $this->attribute('file');
return Asset::get_filepath_css($file, false);
}
示例3: css_path
/**
* Asset CSS Path
*
* Generate CSS asset path locations.
*
* Usage:
*
* {{ asset:css_path file="" module="" }}
*
* @return string Path to the CSS asset relative to web root
*/
public function css_path()
{
$file = $this->attribute('file');
return BASE_URI . Asset::get_filepath_css($file, FALSE);
}