Namespaces

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

  • IniAdapter
  • NeonAdapter
  • PhpAdapter
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\Config\Adapters;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * Reading and generating PHP files.
15:  *
16:  * @author     David Grudl
17:  */
18: class PhpAdapter extends Nette\Object implements Nette\Config\IAdapter
19: {
20: 
21:     /**
22:      * Reads configuration from PHP file.
23:      * @param  string  file name
24:      * @return array
25:      */
26:     public function load($file)
27:     {
28:         return Nette\Utils\LimitedScope::load($file);
29:     }
30: 
31: 
32:     /**
33:      * Generates configuration in PHP format.
34:      * @return string
35:      */
36:     public function dump(array $data)
37:     {
38:         return "<?php // generated by Nette \nreturn " . Nette\Utils\PhpGenerator\Helpers::dump($data) . ';';
39:     }
40: 
41: }
42: 
Nette 2.0 API documentation generated by ApiGen 2.8.0