Blame view

application/config.class.php 331 Bytes
8d65d0ce   andryeyev   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <?php
  
  Class Config{
  static $vars = array();
  
  public function init() {
    $row = include($_SERVER['DOCUMENT_ROOT'] . '/config/config.php');
    foreach($row as $key=>$value){
     self::$vars[$key] = $value;
    }
  }
  
  public function get($key){
   return self::$vars[$key];
  }
  
  public function __get($key){
   return self::$vars[$key];
  }
  
  }
  
  ?>