• Stars
    star
    2
  • Language
    PHP
  • License
    MIT License
  • Created almost 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scan for Configuration in very opinionated manner

Configuration Scan

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