/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Panel
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/Panel/IncludePanel.php (3398B)
_debug = new DebugInclude();
}
/**
* Get a list of files that were included and split them out into the various parts of the app
*
* @return array
*/
protected function _prepare()
{
$return = ['cake' => [], 'app' => [], 'plugins' => [], 'vendor' => [], 'other' => []];
foreach (get_included_files() as $file) {
$pluginName = $this->_debug->getPluginName($file);
if ($pluginName) {
$return['plugins'][$pluginName][$this->_debug->getFileType($file)][] = $this->_debug->niceFileName(
$file,
'plugin',
$pluginName
);
} elseif ($this->_debug->isAppFile($file)) {
$return['app'][$this->_debug->getFileType($file)][] = $this->_debug->niceFileName($file, 'app');
} elseif ($this->_debug->isCakeFile($file)) {
$return['cake'][$this->_debug->getFileType($file)][] = $this->_debug->niceFileName($file, 'cake');
} else {
$vendorName = $this->_debug->getComposerPackageName($file);
if ($vendorName) {
$return['vendor'][$vendorName][] = $this->_debug->niceFileName($file, 'vendor', $vendorName);
} else {
$return['other'][] = $this->_debug->niceFileName($file, 'root');
}
}
}
$return['paths'] = $this->_debug->includePaths();
ksort($return['app']);
ksort($return['cake']);
ksort($return['plugins']);
ksort($return['vendor']);
foreach ($return['plugins'] as &$plugin) {
ksort($plugin);
}
return $return;
}
/**
* Get the number of files included in this request.
*
* @return string
*/
public function summary()
{
$data = $this->_data;
if (empty($data)) {
$data = $this->_prepare();
}
unset($data['paths']);
$data = array_filter($data, function ($v, $k) {
return !empty($v);
}, ARRAY_FILTER_USE_BOTH);
return (string)count(Hash::flatten($data));
}
/**
* Shutdown callback
*
* @param \Cake\Event\EventInterface $event Event
* @return void
*/
public function shutdown(EventInterface $event)
{
$this->_data = $this->_prepare();
}
}