Piwik\Settings\Storage\Factory::getPluginStorage PHP Méthode

getPluginStorage() public méthode

The storage will hold values that belong to the given plugin name and user login. Be aware that instances for a specific plugin and login will be cached during one request for better performance.
public getPluginStorage ( string $pluginName, string $userLogin ) : Storage
$pluginName string
$userLogin string Use an empty string if settings should be not for a specific login
Résultat Storage
    public function getPluginStorage($pluginName, $userLogin)
    {
        $id = $pluginName . '#' . $userLogin;
        if (!isset($this->cache[$id])) {
            $backend = new Backend\PluginSettingsTable($pluginName, $userLogin);
            $this->cache[$id] = $this->makeStorage($backend);
        }
        return $this->cache[$id];
    }