Guest User

Untitled

a guest
Aug 31st, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2. /*
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace Application\Core\System;
  15.  
  16. class Config
  17. {
  18. protected static $_path_default_base_config = '/core/system/default_config.php';
  19. protected static $_path_base_config = '/core/config/base_config.php';
  20. protected static $_path_config = '/core/config/config.php';
  21. protected static $_base = array();
  22. protected static $_config = array();
  23.  
  24. protected function __construct()
  25. {
  26. }
  27.  
  28. protected function __clone()
  29. {
  30. }
  31.  
  32. protected function __destruct()
  33. {
  34. }
  35.  
  36. public static function base($name = null)
  37. {
  38. return (!is_null($name) ? self::$_base[$name] : self::$_base);
  39. }
  40.  
  41. public static function get($name = null)
  42. {
  43. return (!is_null($name) ? self::$_config[$name] : self::$_config);
  44. }
  45.  
  46. public static function setBaseConfigPath($path = '')
  47. {
  48. self::$_path_base_config = $path;
  49. }
  50.  
  51. public static function setConfigPath($path = '')
  52. {
  53. self::$_path_config = $path;
  54. }
  55.  
  56. public static function load_base_config()
  57. {
  58. if (!file_exists(self::$_path_base_config)) {
  59. exit('error_system_is_not_configured');
  60. }
  61.  
  62. self::$_base = self::load(self::$_path_base_config);
  63. }
  64.  
  65. public static function load_config()
  66. {
  67. if (file_exists(self::$_path_config)) {
  68. self::$_config = self::load(self::$_path_config);
  69. ..................................................................
  70. ......................................
  71. ..............
Add Comment
Please, Sign In to add comment