30 lines
594 B
PHP
30 lines
594 B
PHP
<?php
|
|
namespace Westdc\Helpers;
|
|
|
|
class Config
|
|
{
|
|
private $config_path = array(
|
|
'local' => "config/autoload/local.php",
|
|
'global' => "config/autoload/global.php"
|
|
);
|
|
|
|
function __construct()
|
|
{
|
|
//$reader = new \Zend\Config\Reader\Ini();
|
|
//$data = $reader->fromFile('config/config.ini');
|
|
}
|
|
|
|
static function get($type = 'global')
|
|
{
|
|
$config_path = array(
|
|
'local' => "config/autoload/local.php",
|
|
'global' => "config/autoload/global.php",
|
|
'file' => "config/autoload/file.php"
|
|
);
|
|
|
|
$config = new \Zend\Config\Config(include $config_path[$type]);
|
|
return $config;
|
|
}
|
|
|
|
|
|
} |