frizzy / parameter-cache
Manages caching for a parameter array to a PHP file
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/frizzy/parameter-cache
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-21 10:08:12 UTC
README
Manages caching for a parameter array to a PHP file
Usage
Add the following to your root composer.json file:
{
"require": {
"frizzy/parameter-cache": "0.*"
}
}
Load a YAML parameter file:
parameters.yml:
parameters:
project.name: 'My Project'
Load content into array:
<?php
$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);
?>