--- layout: homepage --- <!-- markdownlint-disable first-line-heading --> {% assign version = site.data.project.default_version %} <!-- markdownlint-restore --> # Features ## Expressive, Fluent API ```php use League\Config\Configuration; use Nette\Schema\Expect; $config = new Configuration([ 'database' => Expect::structure([ 'driver' => Expect::anyOf('mysql', 'postgresql', 'sqlite')->required(), 'host' => Expect::string()->default('localhost'), 'port' => Expect::int()->min(1)->max(65535), 'database' => Expect::string()->required(), 'username' => Expect::string()->required(), 'password' => Expect::string()->nullable(), ]), ]); ``` ## Easily Access Nested Values ```php echo $config->get('database.driver'); // or using slashes, if you prefer that syntax: echo $config->get('database/driver'); ``` ## Set Options Individually Or Together ```php use League\Config\Configuration; $config = new Configuration([/*...*/]); $config->merge([ 'database' => [ 'driver' => 'mysql', 'port' => 3306, 'host' => 'localhost', 'database' => 'myapp', 'username' => 'myappdotcom', 'password' => 'hunter2', ], ]); if ($_ENV['APP_ENV'] === 'prod') { $config->set('payment_gateway.test_mode', false); } ``` ## Combine Multiple Schemas Into One ```php use League\Config\Configuration; $config = new Configuration(); $config->addSchema('database', DB::getConfigSchema()); $config->addSchema('logging', Logger::getConfigSchema()); $config->addSchema('mailer', Mailer::getConfigSchema()); ```
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
1.0 | Folder | 0755 |
|
|
1.1 | Folder | 0755 |
|
|
_data | Folder | 0755 |
|
|
_layouts | Folder | 0755 |
|
|
_plugins | Folder | 0755 |
|
|
.gitignore | File | 15 B | 0644 |
|
.markdownlint.yml | File | 300 B | 0644 |
|
CNAME | File | 25 B | 0644 |
|
Gemfile | File | 103 B | 0644 |
|
Gemfile.lock | File | 2.02 KB | 0644 |
|
README.md | File | 289 B | 0644 |
|
_config.yml | File | 121 B | 0644 |
|
custom.css | File | 7.08 KB | 0644 |
|
custom.js | File | 538 B | 0644 |
|
global.css | File | 671 B | 0644 |
|
homepage.css | File | 6.48 KB | 0644 |
|
index.md | File | 1.63 KB | 0644 |
|
releases.md | File | 328 B | 0644 |
|
support.css | File | 2 KB | 0644 |
|