Get adapter class name

@param string $adapterName
@return string
@throws \Exception
2513
private static function getAdapterClassName($adapterName)
    {
        $className = 'Piwik\Db\Adapter\\' . str_replace(' ', '\\', ucwords(str_replace(array('_', '\\'), ' ', strtolower($adapterName))));
        if (!class_exists($className)) {
            throw new \Exception(sprintf("Adapter '%s' is not valid. Maybe check that your Matomo configuration files in config/*.ini.php are readable by the webserver.", $adapterName));
        }
        return $className;
    }
1105623
public function getHelper($helperName) {
		//first check if we've already instantiated this Helper
		$helper = $this->getCachedHelper($helperName);
		if (!$helper) {
			foreach (array($this->getSiteConfig()['NAMESPACE_APP'],$this->getSiteConfig()['NAMESPACE_CORE']) as $classPath) {
				$className = "{$classPath}Classes\\Helpers\\{$helperName}";
				//We found a Helper named $helperName, so let's instantiate, configure and cache it
				if (class_exists($className)) {
					$helper = new $className();
					$helper->configure($this);
					$this->addCachedHelper($helperName,$helper);
					$this->getLogger()->debug("Providing FRESH Helper: ".$helperName);
					break;
				}
			}
			if (!$helper) {
				$this->getLogger()->error("Could not find Helper: ".$helperName);
			}
		} else {
			$this->getLogger()->debug("Providing CACHED Helper: ".$helperName);
		}
		return $helper;
	}
149620
public function getAdapters(array $adapters = []): array
    {
        if (empty($adapter)) {
            return $this->adapter;
        }
        $list = [];
        foreach ($adapter as $name) {
            if (!$this->hasAdapter($name)) {
                throw new Exception\AdapterNotFound('auth adapter '.$name.' is not registered');
            }
            $list[$name] = $this->adapter[$name];
        }

        return $list;
    }
1143444
public static function getInstance(string $fileName) : AdapterInterface
    {
        foreach (static::$adapterClasses as $className) {
            $instance = static::getInstanceByClassName($className, $fileName);
            if ($instance !== null) {
                return $instance;
            }
        }

        throw new ParserConditionNotSatisfiedException(
            "No Sqlite extension found. Either 'pdo_sqlite' or 'sqlite3' extension required."
        );
    }
1236892
protected function factory(string $adapterName, array $configuration = [])
	{
		if(method_exists($this, ($method = $adapterName . 'Factory')))
		{
			return $this->$method($configuration);
		}
		elseif(isset($this->extensions[$adapterName]))
		{
			$adapter = $this->extensions[$adapterName];

			if($adapter instanceof Closure)
			{
				return $this->container->call($adapter, $configuration);
			}

			return $this->container->get($adapter, $configuration);
		}

		throw new RuntimeException(vsprintf('A factory method for the [ %s ] adapter has not been defined.', [$adapterName]));
	}
230260
static function getName(\Throwable $exception): string
    {
        $name = null;

        if ($exception instanceof \ErrorException) {
            $name = Error::getName($exception->getSeverity());
        }

        if ($name === null) {
            $name = get_class($exception);
        }

        if (($code = $exception->getCode()) !== 0) {
            $name .= " ({$code})";
        }

        return $name;
    }
806317
public function name($path)
	{
		$path = Util::normalizePath($path);

		return $this->adapter->name($path);
	}
283949
function getName()
  	{
  		$name = $this->_name;

  		if (empty($name)) {
  			$r = null;
  			if (! preg_match( '/Com(.*)/i', get_class( $this ), $r)) {
                throw new AnErrorException(
                    "Can't get or parse the class name ",
                    AnHttpResponse::INTERNAL_SERVER_ERROR
                );
  			}
  			$name = strtolower($r[1]);
  		}

  		return $name;
  	}
723192
public static function adapter($name = null) {
		if (!$name) {
			if (!$names = array_keys(static::$_configurations)) {
				return;
			}
			$name = end($names);
		}
		return parent::adapter($name);
	}
371393
private function getRightAdapter(array $adapters)
    {
        $adapter = null;
        if (1 < count($adapters) && in_array($this->defaultAdapter, $adapters)) {
            $adapter = $this->defaultAdapter;
        } else {
            $adapter = reset($adapters);
        }

        return $adapter;
    }
1286701
public function getWriteConnection(AdapterInterface $adapter = null)
    {
        if (null === $this->connection) {
            $this->connection = ConnectionFactory::create($this->configuration, $adapter);
            $this->connection->setName($this->getName());
        }

        return $this->connection;
    }
571632
public function getAdapterType()
  {
    if($this->adapter instanceof Adapter)
    {
      $string = Str::factory(get_class($this->adapter));

      return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString();
    }

    return "Unknown";
  }
704524
protected function getAdapter() {
        // Backwards compatability as I won't bump the version number for this
        // yet. When I add PHP 7 support I'll bump it and remove this.
        if (!$this->adapter) {
            $this->adapter = new Curl();
            $this->adapter->setLogger(new NullLogger());
        }
        return $this->adapter;
    }
19818
private function determineWhichAdapterToUse($filename = null)
    {
        if (null === $filename || !is_string($filename)) {
            return;
        }

        $pieces = explode('.', $filename);
        if (1 > count($pieces)) {
            return;
        }

        $ext = '.'.$pieces[count($pieces) - 1];
        $adaptersForExt = $this->manageableExt->get($ext);
        if (!is_array($adaptersForExt) || 0 === count($adaptersForExt)) {
            return;
        }

        $adapter = $this->getRightAdapter($adaptersForExt);

        return $this->rendererAdapters->get($adapter);
    }
1345611
protected function getClass($name)
    {
        if (empty($this->adapters[$name])) {
            throw new \RuntimeException(sprintf(
                'Adapter "%s" has not been registered',
                $name
            ));
        }

        return $this->adapters[$name];
    }
951060
public function getAdapter($type)
	{
		$type = strtolower($type);

		if (!isset($this->adapters[$type]))
		{
			// Try to load the adapter object
			/* @var  ExtractableInterface  $class */
			$class = 'Joomla\\Archive\\' . ucfirst($type);

			if (!class_exists($class) || !$class::isSupported())
			{
				throw new \InvalidArgumentException(
					sprintf(
						'Archive adapter "%s" (class "%s") not found or supported.',
						$type,
						$class
					)
				);
			}

			$this->adapters[$type] = new $class($this->options);
		}

		return $this->adapters[$type];
	}
222438
protected function getAdapter()
    {
        $type = strtolower($this->options['type']);
        if (!$this->adapter) {
            if ($this->options['class']) {
                $adapterClass = $this->options['class'];
            } else {
                $adapterClass = '\\Wslim\\Security\\Crypt\\' . ucfirst($type) . 'Adapter';
            }
            
            if (!class_exists($adapterClass)) {
                throw new Exception('crypt type is not exists: ' . $type . ' .');
            }
            $this->adapter = new $adapterClass();
        }
        return $this->adapter;
    }