Example #1
0
 /**
  * Parse the segments of a package namespace.
  *
  * @param  string  $key
  * @param  string  $namespace
  * @param  string  $item
  * @return array
  */
 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->loader->exists($itemSegments[0], $namespace)) {
         return [$namespace, 'config', $item];
     }
     return $this->keyParserParseSegments($key);
 }