mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
40
lib/symfony/config/sfSimpleYamlConfigHandler.class.php
Executable file
40
lib/symfony/config/sfSimpleYamlConfigHandler.class.php
Executable file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the symfony package.
|
||||
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* sfSimpleYamlConfigHandler allows you to load simple configuration files formatted as YAML.
|
||||
*
|
||||
* @package symfony
|
||||
* @subpackage config
|
||||
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
||||
* @version SVN: $Id: sfSimpleYamlConfigHandler.class.php 3203 2007-01-09 18:32:54Z fabien $
|
||||
*/
|
||||
class sfSimpleYamlConfigHandler extends sfYamlConfigHandler
|
||||
{
|
||||
/**
|
||||
* Executes this configuration handler.
|
||||
*
|
||||
* @param array An array of absolute filesystem path to a configuration file
|
||||
*
|
||||
* @return string Data to be written to a cache file
|
||||
*/
|
||||
public function execute($configFiles)
|
||||
{
|
||||
$config = $this->parseYamls($configFiles);
|
||||
|
||||
// compile data
|
||||
$retval = "<?php\n".
|
||||
"// auto-generated by %s\n".
|
||||
"// date: %s\nreturn %s;\n";
|
||||
$retval = sprintf($retval, __CLASS__, date('Y/m/d H:i:s'), var_export($config, true));
|
||||
|
||||
return $retval;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user