Call the after load callback for a namespace.

@param string $namespace
@param string $group
@param array $items

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

        return call_user_func($callback, $this, $group, $items);
    }
694477
protected function loadDataForPrefix($namespace, $prefix)
    {
        $this->failOnMissingNamespace($namespace);

        if (!isset($this->cachedData[$namespace])) {
            $this->cachedData[$namespace] = [];
        }

        if (!isset($this->cachedData[$namespace][$prefix])) {
            $this->cachedData[$namespace][$prefix] = [];
        }

        foreach ($this->addedData[$namespace] as $data) {

            if (isset($data[$prefix])) {
                $this->cachedData[$namespace][$prefix][] = $data[$prefix];
            }
        }

        return $this->cachedData[$namespace][$prefix];
    }
1269507
protected function load($group, $namespace, $collection)
    {
        // Is it already loaded? If so, just return it.
        if (isset($this->items[$collection])) return $this->items[$collection];

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

        return $this->items[$collection] = $items;
    }
170853
public function load($group, $namespace = null)
    {
        $items = [];

        $path = $this->getPath($namespace);

        if (is_null($path)) {
            return $items;
        }

        $file = "{$path}/{$group}.php";

        if ($this->files->exists($file)) {
            $items = $this->getRequire($file);
        }

        return $items;
    }
503590
private function loadPsr4Group($group)
    {
        if ( !isset($group['psr4']))
        {
            return;
        }

        foreach ($group['psr4'] as $prefix => $paths)
        {
            $this->objectRegistry->addPsr4($prefix, $paths);
        }
    }
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'));
                }
            }
        }
    }
314326
private function methodWhenEvent($name, $namespace)
    {
        $parameters = [
            new ParameterGenerator(
                'event', '\\' . $namespace . $name
            ),
        ];

        return new MethodGenerator(
            'when' . $name,
            $parameters,
            MethodGenerator::FLAG_PROTECTED,
            '',
            new DocBlockGenerator(
                'Updates aggregate if event ' . $name . ' was occurred',
                null,
                [
                    new ParamTag('event', [ '\\' . $namespace . $name]),
                ]
            )
        );
    }
733098
protected function parsePackageSegments($key, $namespace, $item)
    {
        $itemSegments = explode('.', $item);

        // If the configuration file doesn't exist for the given package group we can
        // assume that we should implicitly use the config file matching the name
        // of the namespace. Generally packages should use one type or another.
        if (! $this->getLoader()->exists($itemSegments[0], $namespace)) {
            return [$namespace, 'config', $item];
        }

        return parent::parseNamespacedSegments($key);
    }
916486
public function loadAliasesFrom($path, $namespace, $key = 'aliases')
    {
        // Get the alias loader
        $loader = Loader::getInstance();

        // Prepare key for config line
        $key = ! is_null($key) ? '.' . $key : null;

        // Wrapped in a try catch because Finder squawks when there is no directory
        try{

            // Load the namespaced config files
            $files = Finder::create()->files()->name('*.php')->in($path);
            foreach($files as $file)
            {
                // Construct the config line where aliases are defined
                $filename = basename($file->getRealPath(), '.php');
                $line = $namespace . '::' . $filename . $key;

                // Load each of the aliases
                $aliases = config($line, []);
                foreach( $aliases as $alias => $class)
                {
                    $loader->alias($alias, $class);
                }
            }

        // Silently ignore Finder exceptions
        } catch( InvalidArgumentException $e){}
    }
467517
private function loadModuleAnnotations($namespace)
    {
        $this->loader->loadModuleAnnotations($namespace, function($fileNamespace){
            $this->parser->parse($fileNamespace);
            $this->parser->execParse($fileNamespace);
        });
    }
66297
public function save($item, $value, $environment, $group, $namespace = null)
    {
        $builder = $this->getConnection()->createQueryBuilder();

        $query = $builder->delete('Config')
            ->where('configNamespace = :namespace',
                    'configGroup = :group',
                    'configItem LIKE :item')
            ->setParameters(array(
                ':namespace' => $namespace ?: '',
                ':group' => $group,
                ':item' => "{$item}.%",
            ));
        $amount_deleted = $query->execute();

        $this->doSave($item, $value, $environment, $group, $namespace);
    }
1022267
protected function _classesInNamespaces($names, array $namespaces, array &$logs = array())
    {
        if (!is_array($names)) {
            $names = array($names);
        }
        foreach ($names as $_name) {
            foreach ($namespaces as $_namespace) {
                if (CodeHelper::namespaceExists($_namespace)) {
                    $tmp_namespace = rtrim(TextHelper::toCamelCase($_namespace), '\\').'\\';
                    if (substr_count(TextHelper::toCamelCase($_name), $tmp_namespace)>0) {
                        return $_name;
                    }
                } else {
                    $logs[] = $this->_getErrorMessage('Namespace "%s" not found!', $_namespace);
                }
            }
        }
        return false;
    }
1333757
public function exists($group, $namespace = null)
    {
        $key = $group.$namespace;

        // We'll first check to see if we have determined if this namespace and
        // group combination have been checked before. If they have, we will
        // just return the cached result so we don't have to hit the disk.
        if (isset($this->exists[$key])) {
            return $this->exists[$key];
        }

        $path = $this->getPath($namespace);

        // To check if a group exists, we will simply get the path based on the
        // namespace, and then check to see if this files exists within that
        // namespace. False is returned if no path exists for a namespace.
        if (is_null($path)) {
            return $this->exists[$key] = false;
        }

        $file = "{$path}/{$group}.php";

        // Finally, we can simply check if this file exists. We will also cache
        // the value in an array so we don't have to go through this process
        // again on subsequent checks for the existing of the config file.
        $exists = $this->files->exists($file);

        return $this->exists[$key] = $exists;
    }
1284580
public function exists($group, $namespace = null)
    {
        $key = $group.$namespace;

        // Check if we have a cached answer
        if (isset($this->exists[$key])) return $this->exists[$key];

        $paths = $this->getPaths($namespace);

        // If the path is null then the file does not exist
        if (empty($paths)) return $this->exists[$key] = false;

        // Does it exist?
        $exists = $this->findInPaths($paths, $group, null, true);

        // Cache and return
        return $this->exists[$key] = $exists;
    }
779784
public function loadSource($locale, $namespace, $group)
    {
        return $this->model
            ->whereLocale($locale)
            ->whereNamespace($namespace)
            ->whereGroup($group)
            ->get()
            ->keyBy('item')
            ->map(function ($translation) {
                return $translation['text'];
            })
            ->toArray();
    }
775230
public function flagAsUnstable($namespace, $group, $item)
    {
        $this->model->whereNamespace($namespace)->whereGroup($group)->whereItem($item)->where('locale', '!=', $this->defaultLocale)->update(['unstable' => '1']);
    }
22531
public function load($locale, $group, $namespace = null)
    {
        if ($locale != $this->defaultLocale) {
            return array_replace_recursive(
                $this->loadSource($this->defaultLocale, $group, $namespace),
                $this->loadSource($locale, $group, $namespace)
            );
        }
        return $this->loadSource($locale, $group, $namespace);
    }