class Packages
Helps manage asset URLs.
Methods
__construct(PackageInterface $defaultPackage = null, array $packages = array()) | ||
setDefaultPackage(PackageInterface $defaultPackage) Sets the default package. | ||
addPackage(string $name, PackageInterface $package) Adds a package. | ||
PackageInterface | getPackage(string $name = null) Returns an asset package. | |
string | getVersion(string $path, string $packageName = null) Gets the version to add to public URL. | |
string | getUrl(string $path, string $packageName = null) Returns the public path. |
Details
__construct(PackageInterface $defaultPackage = null, array $packages = array())
setDefaultPackage(PackageInterface $defaultPackage)
Sets the default package.
addPackage(string $name, PackageInterface $package)
Adds a package.
PackageInterface getPackage(string $name = null)
Returns an asset package.
string getVersion(string $path, string $packageName = null)
Gets the version to add to public URL.
string getUrl(string $path, string $packageName = null)
Returns the public path.
Absolute paths (i.e. http://...) are returned unmodified.
Please login to continue.