api/symfony/Component/Asset/VersionStrategy/JsonManifestVersionStrategy.yaml

90 lines
2.8 KiB
YAML
Raw Normal View History

2024-09-26 09:03:21 +00:00
name: JsonManifestVersionStrategy
class_comment: '# * Reads the versioned path of an asset from a JSON manifest file.
# *
# * For example, the manifest file might look like this:
# * {
# * "main.js": "main.abc123.js",
# * "css/styles.css": "css/styles.555abc.css"
# * }
# *
# * You could then ask for the version of "main.js" or "css/styles.css".'
dependencies:
- name: AssetNotFoundException
type: class
source: Symfony\Component\Asset\Exception\AssetNotFoundException
- name: LogicException
type: class
source: Symfony\Component\Asset\Exception\LogicException
- name: RuntimeException
type: class
source: Symfony\Component\Asset\Exception\RuntimeException
- name: ClientExceptionInterface
type: class
source: Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface
- name: DecodingExceptionInterface
type: class
source: Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface
- name: HttpClientInterface
type: class
source: Symfony\Contracts\HttpClient\HttpClientInterface
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: manifestPath
- name: httpClient
default: 'null'
- name: strictMode
default: 'false'
comment: "# * Reads the versioned path of an asset from a JSON manifest file.\n\
# *\n# * For example, the manifest file might look like this:\n# * {\n# *\
\ \"main.js\": \"main.abc123.js\",\n# * \"css/styles.css\": \"\
css/styles.555abc.css\"\n# * }\n# *\n# * You could then ask for the version\
\ of \"main.js\" or \"css/styles.css\".\n# */\n# class JsonManifestVersionStrategy\
\ implements VersionStrategyInterface\n# {\n# private array $manifestData;\n#\
\ \n# /**\n# * @param string $manifestPath Absolute path to the manifest file\n\
# * @param bool $strictMode Throws an exception for unknown paths"
- name: getVersion
visibility: public
parameters:
- name: path
comment: '# * With a manifest, we don''t really know or care about what
# * the version is. Instead, this returns the path to the
# * versioned file.'
- name: applyVersion
visibility: public
parameters:
- name: path
comment: null
- name: getManifestPath
visibility: private
parameters:
- name: path
comment: null
- name: findAlternatives
visibility: private
parameters:
- name: path
- name: manifestData
comment: null
traits:
- Symfony\Component\Asset\Exception\AssetNotFoundException
- Symfony\Component\Asset\Exception\LogicException
- Symfony\Component\Asset\Exception\RuntimeException
- Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface
- Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface
- Symfony\Contracts\HttpClient\HttpClientInterface
interfaces:
- VersionStrategyInterface