⚝
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
/
Core
/
Factory
/
Edit File: Tree.php
<?php /** * A Horde_Injector:: based Horde_Tree:: factory. * * PHP version 5 * * @category Horde * @package Core * @author Michael Slusarz <slusarz@horde.org> * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ /** * A Horde_Injector:: based Horde_Tree:: factory. * * Copyright 2010-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @category Horde * @package Core * @author Michael Slusarz <slusarz@horde.org> * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 */ class Horde_Core_Factory_Tree extends Horde_Core_Factory_Base { /** * Singleton instances. * * @var array */ private $_instances = array(); /** * Return the Horde_Tree:: instance. * * @param string $name The name of this tree instance. * @param mixed $renderer The type of tree renderer. * @param array $params Any additional parameters the constructor * needs. Defined by this class: * <pre> * 'nosession' - (boolean) Don't store tree state in the session. * DEFAULT: false * </pre> * * @return Horde_Tree_Renderer_Base The singleton instance. * @throws Horde_Tree_Exception */ public function create($name, $renderer, array $params = array()) { $lc_renderer = Horde_String::lower($renderer); $id = $name . '|' . $lc_renderer; if (!isset($this->_instances[$id])) { switch ($lc_renderer) { case 'html': $renderer = 'Horde_Core_Tree_Renderer_Html'; break; case 'javascript': $renderer = 'Horde_Core_Tree_Renderer_Javascript'; break; case 'simplehtml': $renderer = 'Horde_Core_Tree_Renderer_Simplehtml'; break; } $params['name'] = $name; if (empty($params['nosession'])) { $params['session'] = array( 'get' => array(__CLASS__, 'getSession'), 'set' => array(__CLASS__, 'setSession') ); } $this->_instances[$id] = Horde_Tree_Renderer::factory($renderer, $params); } return $this->_instances[$id]; } /** */ public static function getSession($instance, $id, $mask = 0) { return $GLOBALS['session']->get('horde', 'tree-' . $instance . '/' . $id, $mask); } /** */ public static function setSession($instance, $id, $val) { if ($val) { $GLOBALS['session']->set('horde', 'tree-' . $instance . '/' . $id, $val); } else { $GLOBALS['session']->remove('horde', 'tree-' . $instance . '/' . $id); } } }
Simpan