gravatalonga/configuration-scan

以非常主观的方式扫描配置

1.0.0 2022-01-17 22:49 UTC

This package is auto-updated.

Last update: 2024-09-18 05:09:00 UTC


README

cover

以非常主观的方式扫描配置

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

安装

composer require "gravatalonga/configuration-scan"  

需求

已在PHP7.4和PHP8.0上进行了测试

如何使用

<?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.  

测试

composer test