wpdiggerstudio/wpzylos-config

Configuration management with dot-notation and .env support for WPZylos framework

Fund package maintenance!
Paypal

Installs: 232

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/wpdiggerstudio/wpzylos-config

v1.0.0 2026-02-01 13:00 UTC

This package is auto-updated.

Last update: 2026-02-01 13:03:40 UTC


README

PHP Version License GitHub

Configuration management with dot-notation and .env support for WPZylos framework.

📖 Full Documentation | 🐛 Report Issues

✨ Features

  • Dot-notation Access — Access nested values with config('app.name')
  • Environment Support — Load from .env files
  • Caching — Cache compiled configuration
  • Type Safety — Typed getters with defaults
  • Merging — Deep merge configuration arrays

📋 Requirements

Requirement Version
PHP ^8.0

🚀 Installation

composer require wpdiggerstudio/wpzylos-config

📖 Quick Start

use WPZylos\Framework\Config\Repository;

$config = new Repository([
    'app' => [
        'name' => 'My Plugin',
        'debug' => true,
    ],
    'database' => [
        'prefix' => 'myplugin_',
    ],
]);

// Dot-notation access
$config->get('app.name');           // 'My Plugin'
$config->get('app.debug');          // true
$config->get('missing', 'default'); // 'default'

🏗️ Core Features

Dot-notation Access

$config->get('database.connections.mysql.host');
$config->set('database.connections.mysql.port', 3307);
$config->has('database.connections.mysql');

Loading from Files

$config = Repository::load(__DIR__ . '/config');

// Loads all PHP files in config/ directory
// config/app.php -> config('app.key')
// config/database.php -> config('database.key')

Environment Variables

// In .env
APP_DEBUG=true
DB_HOST=localhost

// In config/app.php
return [
    'debug' => env('APP_DEBUG', false),
    'db_host' => env('DB_HOST', 'localhost'),
];

📦 Related Packages

Package Description
wpzylos-core Application foundation
wpzylos-container Dependency injection
wpzylos-scaffold Plugin template

📖 Documentation

For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.

☕ Support the Project

If you find this package helpful, consider buying me a coffee! Your support helps maintain and improve the WPZylos ecosystem.

Donate with PayPal

📄 License

MIT License. See LICENSE for details.

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Made with ❤️ by WPDiggerStudio