gravatalonga/configuration-scan

Scan for Configuration in very opinionated manner

1.0.0 2022-01-17 22:49 UTC

This package is auto-updated.

Last update: 2024-11-18 05:27:23 UTC


README

cover

Scan for Configuration in very opinionated manner:

parent-folder
    \- name-of-folder
        \- config.json
        \- other.json
    \- other-name-of-folder
        \- config.json  

Install

composer require "gravatalonga/configuration-scan"  

Requirements

It was tested on PHP7.4 and PHP8.0

How to use

<?php

$scan = new \Gravatalonga\ConfigurationScan\Scan("parent-folder");
$containers = $scan->containers(); // get array with "name-of-folder" as key, and config.json as value.  

// .... 

$configurations = $scan->configurations('name-of-folder'); // it will get "other" as key and other.json as value.  

Tests

composer test