PHP code example of frizzy / parameter-cache

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

    

frizzy / parameter-cache example snippets


    
    $loader = new \Frizzy\ParameterCache\ClosureLoader(
        function ($file) {
            $data = \Symfony\Component\Yaml\Yaml::parse($file);
            
            return $data['parameters'];
        },
        __DIR__ . '/cache'
    );
    $parameters = array(
        'project.name' => 'Default project name'
    );
    $loader->load(__DIR__ . '/parameters.yml', $parameters);