Download the PHP package designcise/manifest-json without Composer
On this page you can find all versions of the php package designcise/manifest-json. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download designcise/manifest-json
More information about designcise/manifest-json
Files in designcise/manifest-json
Package manifest-json
Short Description manifest.json parser/loader for PHP
License MIT
Informations about the package manifest-json
Designcise\ManifestJson
PHP manifest.json
parser/loader.
Installing
[!NOTE]
Requires PHP 8.0 or later.
Example
API
static from(string $dirOrFile): self
Static method to load manifest.json
file from specified directory. If only directory is specified then it is assumed that file name is manifest.json
by default, otherwise the specified name is used. For example:
get(string $key): string
Gets the manifest.json
metadata for the specified $key
.
getAll(): array
Get all entries in the manifest.json
file as an array.
getAllByType(string $type): array
Gets all files with the specified file extension (for e.g. css
, js
, etc.) as an array.
getAllByTypes(array $types): array
Gets all files with the specified file extensions (e.g. ['css', 'js']
, etc.) as an array.
getAllByKey(string $key): array
Gets all files that match the specified key. It looks for a full match in the manifest entries' key. It can optionally have wildcard using asterisk (e.g. *.js
, *index*
, etc.).
getAllByKeyBasename(string $key): array
Gets all files that match the trailing name component of path in the manifest entry's key. It can optionally have wildcard using asterisk (e.g. *.js
, index*
, etc.).
Tests
To run the tests you can use the following commands:
Command | Type |
---|---|
composer test |
PHPUnit tests |
composer style |
CodeSniffer |
composer style-fix |
CodeSniffer Fixer |
composer md |
MessDetector |
composer check |
PHPStan |
Contributing
- File issues at https://github.com/designcise/manifest-json/issues
- Issue patches to https://github.com/designcise/manifest-json/pulls
License
Please see License File for licensing information.
All versions of manifest-json with dependencies
ext-json Version *