Returns the named fixture.

@param $name

@return Fixture|null the fixture object, or null if the named fixture does not exist

@throws InvalidConfigException
489831
public function getFixture(string $name): Fixture
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures($this->fixtures());
        }

        $name = ltrim($name, '\\');

        return $this->_fixtures[$name] ?? null;
    }
1322097
public function get($name)
    {
        if (isset($this->items[$name])) {
            return $this->items[$name];
        }

        if (!isset($this->itemSetting[$name])) {
            return null;
        }

        $itemSetting = $this->itemSetting[$name];
        if (is_callable($itemSetting)) {
            $item = $itemSetting();
        } elseif (is_string($itemSetting) && class_exists($itemSetting)) {
            $item = new $itemSetting;
        } else {
            $item = $itemSetting;
        }

        $this->items[$name] = $item;
        return $item;
    }
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'];
	}
533926
protected function getProvider($name) {
        $k = ObjectHelper::getShortName($name);
        $v = $this->getIndex()[$k];
        if (null === $v) {
            return null;
        }
        return $this->getProviders()[$v];
    }
954215
protected function configuration($name)
    {
        $name = $name ?: $this->getDefaultConnection();

        // To get the database connection configuration, we will just pull each of the
        // connection configurations and get the configurations for the given name.
        // If the configuration doesn't exist, we'll throw an exception and bail.

        $connections = config('database.connections');
        if (is_null($config = Nip_Helper_Arrays::get($connections, $name))) {
            throw new InvalidArgumentException("Database [$name] not configured.");
        }
        return $config;
    }
179149
public function get(string $name): TemplateInterface
    {
        if (!isset($this->engines[$name])) {
            throw new InvalidArgumentException('Template engine "' . $name . '" is not known or registered');
        }

        return $this->engines[$name];
    }
1193560
public function get(string $name = null): \TheCMSThread\Classes\Plugin
    {
        if (empty($name) === false && empty($this->plugins[$name]) === false) {
            return $this->plugins[$name];
        } else {
            throw new \InvalidArgumentException("Plugin not found");
        }
    }
492219
public function get($name)
    {
        if (!$this->has($name)) {
            throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
195560
public function registered($name)
    {
        if ($this->provider->hasSingleton($name)) {
            return $this->provider->singleton($name);
        }

        if ($this->provider->hasProvider($name)) {
            return $this->provider->getProvider($name);
        }

        return null;
    }
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;
    }
1229918
public function getConnectionConfig($name = null) {
		if (is_null($name)) {
			$name = $this->defaultConfigName;
		}

		if (isset($this->connectionConfigs[$name])) {
			return $this->connectionConfigs[$name];
		}

		return null;
	}
723370
public function getConfig($name) {
        return isset($this->settings[$name]) ? $this->settings[$name] : null;
    }
1102296
final public static function get($name)
    {
        return isset(self::$allLoadedConfigs[$name])
            ? self::$allLoadedConfigs[$name]
            : self::$allLoadedConfigs[$name] = Arr::overwrite(static::load($name), LocalConfig::load($name));
    }
1316211
protected function getJoinByName($name): Join
    {
        $joins = $this->joins();

        if (!isset($joins[$name])) {
            throw new InvalidConfigException('Join named "' . $name . '" does not exist.');
        }

        return $joins[$name];
    }
1086432
public static function getByName($name)
    {
        $name = (string)$name;
        $class = get_called_class();
        if (isset(self::$instances[$class][$name])) {
            return self::$instances[$class][$name];
        }
        $const = $class . '::' . $name;
        if (!defined($const)) {
            throw new \InvalidArgumentException($const . ' not defined');
        }
        return self::$instances[$class][$name] = new $class(constant($const));
    }
1028734
protected function getDbConfig($name)
    {
        if (empty($name)) {
            throw new InvalidArgumentException("Service 'name' can not be empty.");
        }

        return \Cache::rememberForever('service_mgr:' . $name, function () use ($name) {
            /** @var Service $service */
            if (empty($service = Service::whereName($name)->first())) {
                throw new NotFoundException("Could not find a service for $name");
            }

            $service->protectedView = false;

            return $service->toArray();
        });
    }
241466
protected function load($name)
    {
        if ($name instanceof Template) {
            return $name;
        }

        try {
            return $this->environment->loadTemplate((string) $name);
        } catch (LoaderError $e) {
            throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }