marko/config

Configuration loading and merging for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-config

Type:marko-module

pkg:composer/marko/config

Statistics

Installs: 6

Dependents: 37

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:44 UTC


README

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