Package::getVersion()

string getVersion(string $path) Returns the asset version for an asset. Parameters string $path A path Return Value string The version string

Package::getUrl()

string getUrl(string $path) Returns an absolute or root-relative public path. Parameters string $path A path Return Value string The public path

Package deprecated::getVersion()

string getVersion() Returns the asset package version. Return Value string The version string

Package deprecated::getUrl()

string getUrl(string $path, string|bool|null $version = null) Returns an absolute or root-relative public path. Parameters string $path A path string|bool|null $version A specific version for the path Return Value string The public path

Package deprecated

class Package implements PackageInterface deprecated since 2.7, will be removed in 3.0. Use the Asset component instead. The basic package will add a version to asset URLs. Methods __construct(string $version = null, string $format = '') Constructor. string getVersion() Returns the asset package version. string getUrl(string $path, string|bool|null $version = null) Returns an absolute or root-relative public path. Details __construct(string

Package

class Package implements PackageInterface Basic package that adds a version to asset URLs. Methods __construct(VersionStrategyInterface $versionStrategy, ContextInterface $context = null) string getVersion(string $path) Returns the asset version for an asset. string getUrl(string $path) Returns an absolute or root-relative public path. Details __construct(VersionStrategyInterface $versionStrategy, ContextInterface $context = null) P

OutputStyle::writeln()

writeln(string|array $messages, $type = self::OUTPUT_NORMAL) Writes a message to the output and adds a newline at the end. Parameters string|array $messages The message as an array of lines of a single string $type

OutputStyle::write()

write(string|array $messages, bool $newline = false, $type = self::OUTPUT_NORMAL) Writes a message to the output. Parameters string|array $messages The message as an array of lines or a single string bool $newline Whether to add a newline $type

OutputStyle::setVerbosity()

setVerbosity(int $level) Sets the verbosity of the output. Parameters int $level The level of verbosity (one of the VERBOSITY constants)

OutputStyle::setFormatter()

setFormatter(OutputFormatterInterface $formatter) Sets output formatter. Parameters OutputFormatterInterface $formatter