本文整理匯總了PHP中asset::config方法的典型用法代碼示例。如果您正苦於以下問題:PHP asset::config方法的具體用法?PHP asset::config怎麽用?PHP asset::config使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類asset
的用法示例。
在下文中一共展示了asset::config方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @author Jonathan Geiger
*/
public function __construct(array $files, $type, $options = NULL)
{
// Only do this once
if (empty(asset::$config)) {
asset::$config = Kohana::config('assets');
}
// Just for convenience's sake
$config = asset::$config;
// String? Append to the prefix
if (is_string($options)) {
$options = array('cache' => $options);
} else {
if ($options === FALSE) {
$options = array('cache' => FALSE);
} else {
if (!is_array($options)) {
$options = array();
}
}
}
// Load the configuration
foreach (arr::merge($config[$type], $options) as $key => $value) {
$this->{$key} = $value;
}
// Set the type
$this->type = $type;
// Set the working host_root and host, which is determined by the host
$host = $this->host();
$this->host_root = $host['root'];
$this->host = $host['host'];
// Process the paths
$this->process_files($files);
}