Returns adapter class name for given `$name` configuration, using
the `$_adapter` path defined in Adaptable subclasses.

@param string|null $name Class name of adapter to load.
@return object Adapter object.
350732
public static function adapter($name = null) {
		$config = static::_config($name);

		if ($config === null) {
			throw new ConfigException("Configuration `{$name}` has not been defined.");
		}

		if (isset($config['object'])) {
			return $config['object'];
		}
		$class = static::_class($config, static::$_adapters);
		$settings = static::$_configurations[$name];
		$settings[0]['object'] = static::_initAdapter($class, $config);
		static::$_configurations[$name] = $settings;
		return static::$_configurations[$name][0]['object'];
	}
231531
public function getProvider($name)
    {
        return $this->hasProvider($name) ?
            $this->_services_providers->offsetGet($name) : null;
    }
222536
public function getProvider(string $name) : string
    {
        $providers = $this->getProviders();
        if (!in_array($name, array_keys($providers))) {
            throw new InvalidArgumentException("Provider for [$name] is not configured");
        }

        return $providers[$name];
    }
430830
public function name($name = null)
    {
        if ($name === null) {
            return $name;
        }
        $this->_name = $name;

        return $this;
    }
172380
public function getItemName($name)
    {
        $lowerName = strtolower($name);
        foreach ([
             $this->classNames,
             $this->interfaceNames,
             $this->traitNames,
         ] as $source) {
            if (isset($source[$lowerName])) {
                return $source[$lowerName];
            }
        }
        return null;
    }
617774
public static function getPluginPath($name = null)
	{
		$path = Config::get()->get('plugin.path');
		if ($name != null) {
			$path = $path . '/' . $name;
		}
		return $path;
	}
772103
public static function connection($name = null)
    {
        self::$use = $name ? $name : self::$use;
        return self::get(self::$use);
    }
533926
protected function getProvider($name) {
        $k = ObjectHelper::getShortName($name);
        $v = $this->getIndex()[$k];
        if (null === $v) {
            return null;
        }
        return $this->getProviders()[$v];
    }
279954
public function getField($name)
		{
			return isset($this->fields[$name])
				? $this->fields[$name]
				: null;
		}
1300756
public static function get($name = 'default')
    {
        if (!isset(self::$connections[$name])) {
            return null;
        }

        $connector = self::$connections[$name];

        return $connector->connection();
    }
53052
protected function getField($name)
    {
        $name = ltrim($name, '/');

        foreach ($this->fields as $field) {
            if (preg_match('#^' . ltrim($field->getName(), '/') . '$#', $name)) {
                return $field;
            }
        }

        return null;
    }
286451
public function get(string $name): ?string
    {
        $key = strtolower($name);
        if (!isset($this->headers[$key])) {
            return null;
        }

        return $this->headers[$key][1];
    }
757075
public function getConnectionConfig(string $name = null)
    {
        $name = $name ?: $this->getDefaultConnection();

        $connections = $this->config->get($this->getConfigName().'.connections');

        if (!is_array($config = array_get($connections, $name)) && !$config) {
            throw new InvalidArgumentException("Adapter [$name] not configured.");
        }

        if (is_string($cache = array_get($config, 'cache'))) {
            $config['cache'] = $this->getCacheConfig($cache);
        }

        $config['name'] = $name;

        return $config;
    }
882478
private static function getClass($name, array $config)
    {
        if (!empty($config['custom_adapters_namespace'])) {
            $namespaces = (array) $config['custom_adapters_namespace'];

            foreach ($namespaces as $namespace) {
                $class = $namespace.$name;

                if (class_exists($class)) {
                    return $class;
                }
            }
        }

        return 'Embed\\Adapters\\'.$name;
    }
190938
public static function get($name = null)
    {
        if ($name === null) {
            $name = array_shift(array_keys(self::$containers));
        }
        return self::$containers[$name] ? self::$containers[$name] : null;
    }
237763
public function getCustomConfig($name = '')
    {
        $custom_config = $this->getConfigByName('custom');
        return $name ? ($custom_config[$name] ?? null) : $custom_config;
    }
934560
public function get($name)
    {
        if (isset($this->_loaded[$name])) {
            return $this->_loaded[$name];
        }

        return null;
    }