Skip to content

didatus/Config

Repository files navigation

Config

A simple config class.

Latest Stable Version License Build Status Scrutinizer Code Quality Code Coverage

Create a simple config instance

use Didatus\Config\Config;
$config = new Config(['foo' => 'bar']);

Get a simple config value

$config = new Config(['foo' => 'bar']);
$config->getFoo();

Get a complex config value

$config = new Config([
  'package' => [
    'name' => 'FooBar',
    'description' => 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.'
  ]
]);
$config->getPackageName();

Get config object of sub part

$config = new Config([
  'package' => [
    'name' => 'FooBar',
    'description' => 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.'
  ]
]);
$packageConfig = $config->getPackageConfig();
$packageConfig->getName();

C8H5

About

a simple config class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages