api/symfony/Component/Asset/Packages.yaml
2024-09-26 02:03:21 -07:00

94 lines
2.3 KiB
YAML

name: Packages
class_comment: '# * Helps manage asset URLs.
# *
# * @author Fabien Potencier <fabien@symfony.com>
# * @author Kris Wallsmith <kris@symfony.com>'
dependencies:
- name: InvalidArgumentException
type: class
source: Symfony\Component\Asset\Exception\InvalidArgumentException
- name: LogicException
type: class
source: Symfony\Component\Asset\Exception\LogicException
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: defaultPackage
default: 'null'
- name: packages
default: '[]'
comment: "# * Helps manage asset URLs.\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
# * @author Kris Wallsmith <kris@symfony.com>\n# */\n# class Packages\n# {\n#\
\ private array $packages = [];\n# \n# /**\n# * @param PackageInterface[] $packages\
\ Additional packages indexed by name"
- name: setDefaultPackage
visibility: public
parameters:
- name: defaultPackage
comment: null
- name: addPackage
visibility: public
parameters:
- name: name
- name: package
comment: null
- name: getPackage
visibility: public
parameters:
- name: name
default: 'null'
comment: '# * Returns an asset package.
# *
# * @param string|null $name The name of the package or null for the default package
# *
# * @throws InvalidArgumentException If there is no package by that name
# * @throws LogicException If no default package is defined'
- name: getVersion
visibility: public
parameters:
- name: path
- name: packageName
default: 'null'
comment: '# * Gets the version to add to public URL.
# *
# * @param string $path A public path
# * @param string|null $packageName A package name'
- name: getUrl
visibility: public
parameters:
- name: path
- name: packageName
default: 'null'
comment: '# * Returns the public path.
# *
# * Absolute paths (i.e. http://...) are returned unmodified.
# *
# * @param string $path A public path
# * @param string|null $packageName The name of the asset package to use
# *
# * @return string A public path which takes into account the base path and URL
path'
traits:
- Symfony\Component\Asset\Exception\InvalidArgumentException
- Symfony\Component\Asset\Exception\LogicException
interfaces: []