lithium\net\http\Media::_assets()
Helper method to list all asset paths, or the path for a single type.
Parameters
-
string
$type
The type you wish to get paths for.
Returns
mixedAn array of all paths, or a single array of paths for the given type.
Source
protected static function _assets($type = null) {
$assets = static::$_assets + array(
'js' => array('suffix' => '.js', 'filter' => null, 'paths' => array(
'{:base}/{:library}/js/{:path}' => array('base', 'library', 'path'),
'{:base}/js/{:path}' => array('base', 'path')
)),
'css' => array('suffix' => '.css', 'filter' => null, 'paths' => array(
'{:base}/{:library}/css/{:path}' => array('base', 'library', 'path'),
'{:base}/css/{:path}' => array('base', 'path')
)),
'image' => array('suffix' => null, 'filter' => null, 'paths' => array(
'{:base}/{:library}/img/{:path}' => array('base', 'library', 'path'),
'{:base}/img/{:path}' => array('base', 'path')
)),
'generic' => array('suffix' => null, 'filter' => null, 'paths' => array(
'{:base}/{:library}/{:path}' => array('base', 'library', 'path'),
'{:base}/{:path}' => array('base', 'path')
))
);
if ($type) {
return isset($assets[$type]) ? $assets[$type] : null;
}
return $assets;
}