__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package Joomla.Plugin
* @subpackage System.Debug
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Plugin\System\Debug\DataCollector;
use Joomla\CMS\Factory;
use Joomla\Plugin\System\Debug\AbstractDataCollector;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* SessionDataCollector
*
* @since 4.0.0
*/
class SessionCollector extends AbstractDataCollector
{
/**
* Collector name.
*
* @var string
* @since 4.0.0
*/
private $name = 'session';
/**
* Called by the DebugBar when data needs to be collected
*
* @since 4.0.0
*
* @return array Collected data
*/
public function collect()
{
$returnData = [];
$sessionData = Factory::getApplication()->getSession()->all();
// redact value of potentially secret keys
array_walk_recursive($sessionData, static function (&$value, $key) {
if (!preg_match(\PlgSystemDebug::PROTECTED_COLLECTOR_KEYS, $key)) {
return;
}
$value = '***redacted***';
});
foreach ($sessionData as $key => $value) {
$returnData[$key] = $this->getDataFormatter()->formatVar($value);
}
return ['data' => $returnData];
}
/**
* Returns the unique name of the collector
*
* @since 4.0.0
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Returns a hash where keys are control names and their values
* an array of options as defined in {@see \DebugBar\JavascriptRenderer::addControl()}
*
* @since 4.0.0
*
* @return array
*/
public function getWidgets()
{
return [
'session' => [
'icon' => 'key',
'widget' => 'PhpDebugBar.Widgets.VariableListWidget',
'map' => $this->name . '.data',
'default' => '[]',
],
];
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| InfoCollector.php | File | 5.32 KB | 0664 |
|
| LanguageErrorsCollector.php | File | 3.38 KB | 0664 |
|
| LanguageFilesCollector.php | File | 3 KB | 0664 |
|
| LanguageStringsCollector.php | File | 4.8 KB | 0664 |
|
| ProfileCollector.php | File | 8.02 KB | 0664 |
|
| QueryCollector.php | File | 7.1 KB | 0664 |
|
| RequestDataCollector.php | File | 1.59 KB | 0664 |
|
| SessionCollector.php | File | 2.14 KB | 0664 |
|
| UserCollector.php | File | 1.37 KB | 0664 |
|