Download the PHP package carry0987/config without Composer
On this page you can find all versions of the php package carry0987/config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carry0987/config
More information about carry0987/config
Files in carry0987/config
Package config
Short Description A library for easily manipulating config of php program
License MIT
Informations about the package config
PHP-Config
A library for easily manipulating config of php program
Overview
PHP-Config is a versatile library designed to simplify the manipulation and management of configurations within PHP applications. Whether it's handling configurations stored in a database, processing configurations for runtime use, or integrating with caching systems like Redis, PHP-Config streamlines your workflow.
Features
- Easy retrieval and updating of configuration settings.
- Support for fetching configurations from a database using PDO.
- Optional integration with Redis for caching configuration values.
- Customizable table name for configurations stored in the database.
- Robust error handling through custom exceptions.
- Type-safe operations with modern PHP type declarations.
Requirements
- PHP 7.4 or higher
- PDO extension for database interaction
- Optional: Redis server and PHP extension for Redis, if caching is desired
Installation
To integrate PHP-Config into your project, you can clone this repository and include it directly, or use Composer to manage the dependency.
To install using Composer:
Usage
Initialization
Below is an example of how to initialize the Config
class with a PDO connection:
Redis Integration (Optional)
If you have Redis set up and would like to utilize it for configuration caching:
Adding a Configuration Setting
Retrieving a Configuration Setting
Updating a Configuration Setting
Contributing
Contributions to PHP-Config are welcome. Please feel free to fork the repository and submit pull requests.
License
PHP-Config is released under the MIT License. See the bundled LICENSE file for details.