PHP code example of sirix / sirix-config

1. Go to this page and download the library: Download sirix/sirix-config 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/ */

    

sirix / sirix-config example snippets


// Without type (auto-detect: bool, int, string, null)
env('DEBUG');              // true
env('PORT');               // 8080
env('NAME', 'default');    // 'default' if NAME is not set

// With explicit type casting
env('PORT', '8080', 'int');       // (int) 8080
env('RATE', '3.14', 'float');     // (float) 3.14
env('NAME', 'foo', 'string');     // 'foo'
env('DEBUG', 'true', 'bool');     // true
env('HOSTS', 'a,b,c', 'array');   // ['a', 'b', 'c']

    

    declare(strict_types=1);

    return [
        MyCoolOptions::class => [ValinorConfigFactory::class, 'config.foo.options'],
    ];
    



declare(strict_types=1);

return [
    'sirix_config' => [
        'valinor' => [
            'cache' => true,
            'cache_directory' => 'data/cache/valinor',
            'development_mode' => true,
        ],
    ],
];