|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 24.84 GB of 70.42 GB (35.27%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
http/
guitar.1/
libraries/
joomla/
application/
- drwxr-xr-x
|
Viewing file: pathway.php (4.53 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
<?php /** * @package Joomla.Platform * @subpackage Application * * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */
defined('JPATH_PLATFORM') or die;
/** * Class to maintain a pathway. * * The user's navigated path within the application. * * @package Joomla.Platform * @subpackage Application * @since 11.1 */ class JPathway extends JObject { /** * @var array Array to hold the pathway item objects * @since 11.1 */ protected $pathway = null;
/** * @var array Array to hold the pathway item objects * @since 11.1 * @deprecated use $pathway declare as private */ protected $_pathway = null;
/** * @var integer Integer number of items in the pathway * @since 11.1 */ protected $count = 0;
/** * @var integer Integer number of items in the pathway * @since 11.1 * @deprecated use $count declare as private */ protected $_count = 0;
/** * @var array JPathway instances container. * @since 11.3 */ protected static $instances = array();
/** * Class constructor * * @param array $options The class options. * * @since 11.1 */ public function __construct($options = array()) { //Initialise the array $this->_pathway = array(); }
/** * Returns a JPathway object * * @param string $client The name of the client * @param array $options An associative array of options * * @return JPathway A JPathway object. * * @since 11.1 */ public static function getInstance($client, $options = array()) { if (empty(self::$instances[$client])) { //Load the router object $info = JApplicationHelper::getClientInfo($client, true);
$path = $info->path . '/includes/pathway.php'; if (file_exists($path)) { include_once $path;
// Create a JPathway object $classname = 'JPathway' . ucfirst($client); $instance = new $classname($options); } else { $error = JError::raiseError(500, JText::sprintf('JLIB_APPLICATION_ERROR_PATHWAY_LOAD', $client)); return $error; }
self::$instances[$client] = & $instance; }
return self::$instances[$client]; }
/** * Return the JPathWay items array * * @return array Array of pathway items * * @since 11.1 */ public function getPathway() { $pw = $this->_pathway;
// Use array_values to reset the array keys numerically return array_values($pw); }
/** * Set the JPathway items array. * * @param array $pathway An array of pathway objects. * * @return array The previous pathway data. * * @since 11.1 */ public function setPathway($pathway) { $oldPathway = $this->_pathway; $pathway = (array) $pathway;
// Set the new pathway. $this->_pathway = array_values($pathway);
return array_values($oldPathway); }
/** * Create and return an array of the pathway names. * * @return array Array of names of pathway items * * @since 11.1 */ public function getPathwayNames() { // Initialise variables. $names = array(null);
// Build the names array using just the names of each pathway item foreach ($this->_pathway as $item) { $names[] = $item->name; }
//Use array_values to reset the array keys numerically return array_values($names); }
/** * Create and add an item to the pathway. * * @param string $name The name of the item. * @param string $link The link to the item. * * @return boolean True on success * * @since 11.1 */ public function addItem($name, $link = '') { // Initialize variables $ret = false;
if ($this->_pathway[] = $this->_makeItem($name, $link)) { $ret = true; $this->_count++; }
return $ret; }
/** * Set item name. * * @param integer $id The id of the item on which to set the name. * @param string $name The name to set. * * @return boolean True on success * * @since 11.1 */ public function setItemName($id, $name) { // Initialize variables $ret = false;
if (isset($this->_pathway[$id])) { $this->_pathway[$id]->name = $name; $ret = true; }
return $ret; }
/** * Create and return a new pathway object. * * @param string $name Name of the item * @param string $link Link to the item * * @return JPathway Pathway item object * * @since 11.1 */ protected function _makeItem($name, $link) { $item = new stdClass; $item->name = html_entity_decode($name, ENT_COMPAT, 'UTF-8'); $item->link = $link;
return $item; } }
|