Download the PHP package mistralys/cyberpunk-mod-db-php without Composer
On this page you can find all versions of the php package mistralys/cyberpunk-mod-db-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mistralys/cyberpunk-mod-db-php
More information about mistralys/cyberpunk-mod-db-php
Files in mistralys/cyberpunk-mod-db-php
Package cyberpunk-mod-db-php
Short Description PHP classes to work with the Cyberpunk 2077 DB.
License MIT
Informations about the package cyberpunk-mod-db-php
Cyberpunk 2077 Clothing Mods DB: PHP Classes
PHP Classes to access the Cyberpunk 2077 Clothing Mod DB.
Features
- Classes used to access the mod database
- Get mod information, including screenshot paths and URLs
- Filter mods by search terms and tags
- Constants for all known tags used in the mod DB
- Minimum configuration required
Requirements
- PHP 8.2 or higher
- Composer
- Webserver with PHP support
Installation
- Require the package using Composer
- Ensure that the
vendor
directory is accessible via the webserver.
NOTE: The database is included as a dependency, so there is no need to require it separately, unless you want a specific version to be installed.
Usage
Accessing mods
The mod collection class is the main entry point to the mod database. It provides methods to access all mods, as well as the filtering capabilities.
Accessing items
Each mod can contain multiple items, such as clothing items. While each mod has a collection of items, there is also a global item collection that contains all items from all mods.
Searching for mods
Use the mod filter to search for specific mods by search terms and/or tags.
Searching for items
Use the item filter to search for specific items by search terms and/or tags.
NOTE: Items inherit their tags from the mod they belong to. Since a mod can have items that belong to different tags, searching for a specific tag may return unrelated items.
Tags
Tags are used to categorize mods, using simple strings defined in the mod files
(e.g. CET
for the Cyber Engine Tweaks mod). All known tags used in the mod DB
are included in the package.
Tags also have additional meta-data, such as a label and a category.
Tag name constants
Tags can be referenced in code using the matching tag classes, which all have a constant with the tag's name. This makes it easier to avoid typos.
Getting all known tags
All known tags are available via the TagCollection
class, which has methods
to access them.
Caching
By default, the collection will cache the mod data in the specified cache directory. This is done for performance reasons, as the mod data is read from my individual files in the filesystem.
The cache is created and updated automatically following the version of the mod database.
Turning off caching
The caching can be turned off if needed:
Performance tests
To check the performance of the caching on your system, you can run the performance tests:
All versions of cyberpunk-mod-db-php with dependencies
mistralys/application-utils-collections Version >=1.1.2
mistralys/cyberpunk-mod-db Version >=2.0.9
mistralys/changelog-parser Version >=1.0.2
brick/event Version >=0.1.1
loupe/loupe Version >=0.7.0
php Version >=8.2