Skip to content

About

[READ-ONLY] Configuration loading and merging for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marko/config

Type-safe configuration management with dot notation, automatic merging, and multi-tenant scope support.

Installation

composer require marko/config

Quick Example

use Marko\Config\ConfigRepositoryInterface;

class DatabaseConnection
{
    public function __construct(
        private ConfigRepositoryInterface $config,
    ) {}

    public function connect(): PDO
    {
        $host = $this->config->getString('database.host');
        $port = $this->config->getInt('database.port');

        return new PDO("mysql:host={$host};port={$port}");
    }
}

Documentation

Full usage, API reference, and examples: marko/config

About

[READ-ONLY] Configuration loading and merging for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages