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 | : 3.14.248.199
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 : ComponentFactory.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\Log; use Piwik\Plugin\Manager as PluginManager; use Exception; /** * Factory class with methods to find and instantiate Plugin components. */ class ComponentFactory { /** * Create a component instance that exists within a specific plugin. Uses the component's * unqualified class name and expected base type. * * This method will only create a class if it is located within the component type's * associated subdirectory. * * @param string $pluginName The name of the plugin the component is expected to belong to, * eg, `'DevicesDetection'`. * @param string $componentClassSimpleName The component's class name w/o namespace, eg, * `"GetKeywords"`. * @param string $componentTypeClass The fully qualified class name of the component type, eg, * `"Piwik\Plugin\Report"`. * @return mixed|null A new instance of the desired component or null if not found. If the * plugin is not loaded or activated or the component is not located in * in the sub-namespace specified by `$componentTypeClass::COMPONENT_SUBNAMESPACE`, * this method will return null. */ public static function factory($pluginName, $componentClassSimpleName, $componentTypeClass) { if (empty($pluginName) || empty($componentClassSimpleName)) { Log::debug("ComponentFactory::%s: empty plugin name or component simple name requested (%s, %s)", __FUNCTION__, $pluginName, $componentClassSimpleName); return null; } $plugin = self::getActivatedPlugin(__FUNCTION__, $pluginName); if (empty($plugin)) { return null; } $subnamespace = $componentTypeClass::COMPONENT_SUBNAMESPACE; $desiredComponentClass = 'Piwik\\Plugins\\' . $pluginName . '\\' . $subnamespace . '\\' . $componentClassSimpleName; $components = $plugin->findMultipleComponents($subnamespace, $componentTypeClass); foreach ($components as $class) { if ($class === $desiredComponentClass) { return new $class(); } } Log::debug("ComponentFactory::%s: Could not find requested component (args = ['%s', '%s', '%s']).", __FUNCTION__, $pluginName, $componentClassSimpleName, $componentTypeClass); return null; } /** * Finds a component instance that satisfies a given predicate. * * @param string $componentTypeClass The fully qualified class name of the component type, eg, * `"Piwik\Plugin\Report"`. * @param string $pluginName|false The name of the plugin the component is expected to belong to, * eg, `'DevicesDetection'`. * @param callback $predicate * @return mixed The component that satisfies $predicate or null if not found. */ public static function getComponentIf($componentTypeClass, $pluginName, $predicate) { $pluginManager = PluginManager::getInstance(); // get components to search through $subnamespace = $componentTypeClass::COMPONENT_SUBNAMESPACE; if (empty($pluginName)) { $components = $pluginManager->findMultipleComponents($subnamespace, $componentTypeClass); } else { $plugin = self::getActivatedPlugin(__FUNCTION__, $pluginName); if (empty($plugin)) { return null; } $components = $plugin->findMultipleComponents($subnamespace, $componentTypeClass); } // find component that satisfieds predicate foreach ($components as $class) { $component = new $class(); if ($predicate($component)) { return $component; } } Log::debug("ComponentFactory::%s: Could not find component that satisfies predicate (args = ['%s', '%s', '%s']).", __FUNCTION__, $componentTypeClass, $pluginName, get_class($predicate)); return null; } /** * @param string $function * @param string $pluginName * @return null|\Piwik\Plugin */ private static function getActivatedPlugin($function, $pluginName) { $pluginManager = PluginManager::getInstance(); try { if (!$pluginManager->isPluginActivated($pluginName)) { Log::debug("ComponentFactory::%s: component for deactivated plugin ('%s') requested.", $function, $pluginName); return null; } return $pluginManager->getLoadedPlugin($pluginName); } catch (Exception $e) { Log::debug($e); return null; } } }
Close