Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 1.59 KB

README.md

File metadata and controls

46 lines (39 loc) · 1.59 KB

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