PHP code example of mr-luke / configuration

1. Go to this page and download the library: Download mr-luke/configuration library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mr-luke / configuration example snippets


public function check(array $insert, bool $throw = true): bool

$instruction = [
  'first_key'  => '',
  'third_key'  => '

$schema = new Schema(array $instruction);

$host = new Host($configArray, $schema);

/**
 * Return given key from array.
 *
 * @param  string $key
 * @param  mixed  $default
 * @return mixed
 */
public function get(string $key, $default = null)

$host->get('mysql.database', 'my_db');

$host->mysql;

/**
 * Determine if given key is present.
 *
 * @param  string $key
 * @return bool
 */
public function has(string $key): bool