* DataFormatter constructor. */ public function __construct() { $this->cloner = new VarCloner(); $this->dumper = new CliDumper(); } /** * @param $data * @return string * @return DataFormatter */ public static function getDefaultDataFormatter(): DataFormatter { if (self::$defaultDataFormatter === null) { self::$defaultDataFormatter = new DataFormatter(); } return self::$defaultDataFormatter; } * @return DataFormatter */ public function getDataFormatter(): DataFormatter { if ($this->dataFormater === null) { $this->dataFormater = self::getDefaultDataFormatter(); } return $this->dataFormater; } $value = '***redacted***'; }); foreach ($data as $key => $value) { $this->sessionData[$key] = $this->getDataFormatter()->formatVar($value); } } return ['data' => $this->sessionData]; } public function __construct($params, $collect = false) { parent::__construct($params); if ($collect) { $this->collect(); } } /** * Called by the DebugBar when data needs to be collected if ($this->params->get('request', 1)) { $this->debugBar->addCollector(new RequestDataCollector()); } if ($this->params->get('session', 1)) { $this->debugBar->addCollector(new SessionCollector($this->params, true)); } if ($this->params->get('profile', 1)) { $this->debugBar->addCollector((new ProfileCollector($this->params))->setRequestEndTime($endTime)); } foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } $dispatcher = $this->getDispatcher(); } catch (\UnexpectedValueException $exception) { return null; } return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this)); } /** * Method to run the application routines. * // Send the application response. $this->respond(); // Trigger the onAfterRespond event. $this->dispatchEvent( 'onAfterRespond', new AfterRespondEvent('onAfterRespond', ['subject' => $this]) ); }// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "CliDumper" from namespace "Symfony\Component\VarDumper\Dumper".
Did you forget a "use" statement for another namespace?
at /home/dcanning/public_html/libraries/vendor/php-debugbar/php-debugbar/src/DebugBar/DataFormatter/DataFormatter.php:28
at DebugBar\DataFormatter\DataFormatter->__construct()
(/home/dcanning/public_html/plugins/system/debug/src/AbstractDataCollector.php:80)
at Joomla\Plugin\System\Debug\AbstractDataCollector::getDefaultDataFormatter()
(/home/dcanning/public_html/plugins/system/debug/src/AbstractDataCollector.php:65)
at Joomla\Plugin\System\Debug\AbstractDataCollector->getDataFormatter()
(/home/dcanning/public_html/plugins/system/debug/src/DataCollector/SessionCollector.php:87)
at Joomla\Plugin\System\Debug\DataCollector\SessionCollector->collect()
(/home/dcanning/public_html/plugins/system/debug/src/DataCollector/SessionCollector.php:58)
at Joomla\Plugin\System\Debug\DataCollector\SessionCollector->__construct(object(Registry), true)
(/home/dcanning/public_html/plugins/system/debug/src/Extension/Debug.php:307)
at Joomla\Plugin\System\Debug\Extension\Debug->onAfterRespond(object(AfterRespondEvent))
(/home/dcanning/public_html/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('onAfterRespond', object(AfterRespondEvent))
(/home/dcanning/public_html/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
at Joomla\Application\AbstractApplication->dispatchEvent('onAfterRespond', object(AfterRespondEvent))
(/home/dcanning/public_html/libraries/src/Application/CMSApplication.php:347)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/dcanning/public_html/includes/app.php:58)
at require_once('/home/dcanning/public_html/includes/app.php')
(/home/dcanning/public_html/index.php:302)
|