PHP code example of xaddax / factories

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

    

xaddax / factories example snippets


    $values = (new GatherConfigValues)($container, 'group');

return [
    'group' => [
        'isFun' = true,
        'options' => [
            'color' => 'purple',
            'size'  => 'large',
        ],
    ],
];

[
    'myValue'   => 42,
    'isAwesome' => true,
    'isFun'     => true,
    'options'   => [
        'color' => 'purple',
        'size'  => 'large',
    ],
]


return [
    'mongodb' => [
        'uri' => 'mongodb://127.0.0.1/',
        'uriOptions' => [],
        'serverOptions' => [], // todo
    ],
];