Load the configuration group for the key.

@param  string  $group
@param  string  $namespace
@param  string  $collection

@return void
13716
protected function load($group, $namespace, $collection)
    {
        $env = $this->environment;

        if (isset($this->items[$collection])) {
            return;
        }

        $items = $this->loader->load($env, $group, $namespace);

        if (isset($this->afterLoad[$namespace])) {
            $items = $this->callAfterLoad($namespace, $group, $items);
        }

        $this->items[$collection] = $items;
    }
486256
protected function setSingleItem($key, $value = null, $load = true)
    {
        list($namespace, $group, $item) = $this->parseKey($key);

        $collection = $this->getCollection($group, $namespace);

        if ($load) {
            $this->load($group, $namespace, $collection);
        }

        if (is_null($item)) {
            $this->items[$collection] = $value;
        } else {
            Arr::set($this->items[$collection], $item, $value);
        }
    }
1279657
public function load($locale, $group, $namespace = null): array
    {
        $fileTranslations = parent::load($locale, $group, $namespace);

        if (! is_null($namespace) && $namespace !== '*') {
            return $fileTranslations;
        }

        $loaderTranslations = $this->getTranslationsForTranslationLoaders($locale, $group, $namespace);

        return array_replace_recursive($fileTranslations, $loaderTranslations);
    }
1058967
public function reload($name, $group = true)
	{
		if ($group === true)
		{
			$group = pathinfo($name, PATHINFO_FILENAME);
		}

		$this->delete($group);

		return $this->load($name, $group);
	}
1193561
protected function getLine($namespace, $group, $locale, $item, array $replace)
    {
        $this->load($namespace, $group, $locale);

        $line = static::arrayGet($this->loaded[$namespace][$group][$locale], $item);

        if (is_string($line)) {
            return $this->makeReplacements($line, $replace);
        } elseif (is_array($line) && count($line) > 0) {
            return $line;
        }
    }
17576
public function load($name, $group = null)
	{
		if ($group === true)
		{
			$group = pathinfo($name, PATHINFO_FILENAME);
		}

		if ($group and $cached = $this->get($group))
		{
			return $cached;
		}

		$name = $this->ensureDefaultFormat($name);
		$paths = $this->finder->findAllFiles($name);

		if (empty($paths))
		{
			return false;
		}

		$config = array();

		foreach ($paths as $path)
		{
			$extension = pathinfo($path, PATHINFO_EXTENSION);
			$handler = $this->getHandler($extension);
			$config = Arr::merge($config, $handler->load($path));
		}

		if ($group)
		{
			$this->set($group, $config);
		}
		elseif ($group === null)
		{
			$this->merge($config);
		}

		return $config;
	}
1267398
public function load($namespace, $group, $locale)
    {
        if ($this->isLoaded($namespace, $group, $locale)) {
            return;
        }

        // The loader is responsible for returning the array of language lines for the
        // given namespace, group, and locale. We'll set the lines in this array of
        // lines that have already been loaded so that we can easily access them.
        $lines = $this->loader->load($locale, $group, $namespace);

        $this->loaded[$namespace][$group][$locale] = $lines;
    }
27731
public function load($locale, $group, $namespace = null)
    {
        $defaults = [];

        if (empty($this->locales) || $this->isSupported($locale))
            $defaults = $this->loadPath($this->getVendorPath(), $locale, $group);

        return array_replace_recursive($defaults, parent::load($locale, $group, $namespace));
    }
295342
function loadTasks(string $namespace, $tasks) {
        if (!is_array($tasks))
            $tasks = [$tasks];
        foreach ($tasks as &$task) {
            $class_name = $namespace.$task;
            if (!is_subclass_of($class_name, '\\Acast\\CronService\\TaskInterface')) {
                Console::warning("Invalid class \"$task\".");
                continue;
            }
            $this->addTask($class_name::init());
        }
    }
1334682
public function setGroup($group)
    {
        $fs = FileSystem::getFileSystem();

        $fs->chgrp($this->getPath(), $group);
    }
1009765
public function load($locale, $group, $namespace = null)
	{
		if (is_null($namespace) || $namespace == '*')
		{
			return $this->loadPath($this->path, $locale, $group);
		}
		else
		{
			return $this->loadNamespaced($locale, $group, $namespace);
		}
	}
442718
public function hasGroup($key)
    {
        list($namespace, $group) = $this->parseKey($key);

        return $this->loader->exists($group, $namespace);
    }
348690
public function loadArray(array $lines, $locale, $group, $namespace = '*')
    {
        // Transform the lines into a flat dot array:
        $lines = array_dot($lines);
        foreach ($lines as $item => $text) {
            if (is_string($text)) {
                // Check if the entry exists in the database:
                $translation = Translation::whereLocale($locale)
                    ->whereNamespace($namespace)
                    ->whereGroup($group)
                    ->whereItem($item)
                    ->first();

                // If the translation already exists, we update the text:
                if ($translation && !$translation->isLocked()) {
                    $translation->text = $text;
                    $saved             = $translation->save();
                    if ($saved && $translation->locale === $this->defaultLocale) {
                        $this->flagAsUnstable($namespace, $group, $item);
                    }
                }
                // If no entry was found, create it:
                else {
                    $this->create(compact('locale', 'namespace', 'group', 'item', 'text'));
                }
            }
        }
    }
118028
protected function callAfterLoad(string $namespace, string $group, array $items): array
    {
        $callback = $this->afterLoad[$namespace];

        return $callback($this, $group, $items);
    }
776114
protected function callAfterLoad($namespace, $group, $items)
    {
        $callback = $this->afterLoad[$namespace];

        return call_user_func($callback, $this, $group, $items);
    }
151940
protected function loadData($path, $locale, $group)
	{
		return \Neonbug\Common\Models\Translation::getByLocaleAndGroupAndNamespace($locale, $group);
	}
474430
public function get($key, $default = null)
    {
        list($namespace, $group, $item) = $this->parseKey($key);

        $collection = $this->getCollection($group, $namespace);

        $this->load($group, $namespace, $collection);

        if (empty($item)) {
            return Arr::get($this->items, $collection, $default);
        }

        return Arr::get($this->items[$collection], $item, $default);
    }