PHP code example of detailnet / dfw-varcrypt-module

1. Go to this page and download the library: Download detailnet/dfw-varcrypt-module 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/ */

    

detailnet / dfw-varcrypt-module example snippets


     'service_manager' => array(
         'delegators' => array(
             'ModuleManager' => array(
                 // By attaching this delegator the module Detail\VarCrypt is loaded before
                 // all other modules so that the encrypted environment variables can be
                 // applied before the configs of the other modules are merged/applied.
                 'Detail\VarCrypt\Factory\ModuleManager\ModuleManagerDelegatorFactory',
             ),
         ),
     ),
     

     'detail_varcrypt' => array(
         'listeners' => array(
             'Detail\VarCrypt\Listener\MultiEncryptorListener' => array(
                 'apply_variables' => array(
                     'mongo',
                 ),
             ),
         ),
     ),
     

     array(
         'doctrine' => array(
             'connection' => array(
                 'odm_default' => array(
                     'server' => getenv('MONGO_SERVER') ?: 'localhost',
                     ...
                 ),
             ),
         ),
     )