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 for PHP
PHP library used to access the data provided by the Cyberpunk 2077 Clothing Mod DB.
Features
- Classes used to access all data in the mod DB
- Get mod information, including screenshots
- Filter mods by search terms and tags
- Filter mod items by search terms and tags
- Access all known tags used in the mod DB
- Access all atelier mods used by the clothing mods
- 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.
Accessing mods
The mod collection class
The mod collection class ModCollection
is the main entry point to the
mod database. It provides methods to access all mods, as well as the
filtering capabilities.
Searching for mods
Use the mod filter to search for specific mods by search terms and/or tags.
Accessing mod 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.
The item collection class
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.
Accessing 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.
Available meta data
Each tag has the following meta-data:
- Name: The tag's name, e.g.
CET
. - Full name: The tag's full name, e.g.
Cyber Engine Tweaks
. - Description: A short description of the tag.
- Category: The tag's category, e.g.
Modder Resource
. - Related tags: Tags that are related to the current tag, if any.
- Links: Links to external resources related to the tag, if any.
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.
An alternative way is to use the TagNames
class, which has constants for all
known tags. This can be easier to use in some cases.
The tag collection
All known tags are available via the TagCollection
class, which has methods
to access them.
Accessíng atelier mods
Background: To make clothing items added by mods available to purchase in-game, the Virtual Atelier mod is used. Modders can create atelier mods that contain the clothing items they have created.
For the clothing mods, all related atelier mods are included in the AtelierCollection
class to access their metadata. Individual mods provide their own atelier instance
via the getAtelier()
method, but the atelier collection offers top-level access
to all of them.
Available metadata
Each atelier has the following meta-data:
- ID: The atelier's unique identifier, e.g.
nc-fashion
. - Name: The atelier's name, e.g.
NC Fashion
. - URL: A link to the atelier mod's home page.
- Authors: A list of the mod's author names.
- Mods: All database-known mods that belong to the atelier.
The atelier collection
Getting the atelier collection is done via the mod collection:
Getting a mod's atelier
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.2.0
mistralys/changelog-parser Version >=1.0.2
brick/event Version >=0.1.1
loupe/loupe Version >=0.7.0
ext-sqlite3 Version *
php Version >=8.2