[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/config/ -> sfSimpleYamlConfigHandler.class.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the symfony package.
   5   * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
   6   *
   7   * For the full copyright and license information, please view the LICENSE
   8   * file that was distributed with this source code.
   9   */
  10  
  11  /**
  12   * sfSimpleYamlConfigHandler allows you to load simple configuration files formatted as YAML.
  13   *
  14   * @package    symfony
  15   * @subpackage config
  16   * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
  17   * @version    SVN: $Id: sfSimpleYamlConfigHandler.class.php 3203 2007-01-09 18:32:54Z fabien $
  18   */
  19  class sfSimpleYamlConfigHandler extends sfYamlConfigHandler
  20  {
  21    /**
  22     * Executes this configuration handler.
  23     *
  24     * @param array An array of absolute filesystem path to a configuration file
  25     *
  26     * @return string Data to be written to a cache file
  27     */
  28    public function execute($configFiles)
  29    {
  30      $config = $this->parseYamls($configFiles);
  31  
  32      // compile data
  33      $retval = "<?php\n".
  34                "// auto-generated by %s\n".
  35                "// date: %s\nreturn %s;\n";
  36      $retval = sprintf($retval, __CLASS__, date('Y/m/d H:i:s'), var_export($config, true));
  37  
  38      return $retval;
  39    }
  40  }


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7