phlib/config

Config functions

3.0.0 2025-01-27 10:52 UTC

This package is auto-updated.

Last update: 2025-01-27 11:12:44 UTC


README

Code Checks Codecov Latest Stable Version Total Downloads Licence

$config = [
    'db' => [
        'host' => '10.1.0.1',
        'username' => 'sam',
        'password' => 'SuperSafePass',
    ],
];

$host = \Phlib\Config\get($config, 'db.host');
$port = \Phlib\Config\get($config, 'db.port', 3306);

License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.