PhpArray.php 702 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Zend Framework (http://framework.zend.com/)
  4. *
  5. * @link http://github.com/zendframework/zf2 for the canonical source repository
  6. * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
  7. * @license http://framework.zend.com/license/new-bsd New BSD License
  8. */
  9. namespace Zend\Config\Writer;
  10. class PhpArray extends AbstractWriter
  11. {
  12. /**
  13. * processConfig(): defined by AbstractWriter.
  14. *
  15. * @param array $config
  16. * @return string
  17. */
  18. public function processConfig(array $config)
  19. {
  20. $arrayString = "<?php\n"
  21. . "return " . var_export($config, true) . ";\n";
  22. return $arrayString;
  23. }
  24. }