Example #1
0
 private function getPath($environment, $group, $item, $namespace = null)
 {
     $hints = $this->loader->getNamespaces();
     $path = null;
     if (is_null($namespace)) {
         $path = $this->defaultPath;
     } elseif (isset($this->hints[$namespace])) {
         $path = $this->hints[$namespace];
     }
     if (is_null($path)) {
         return null;
     }
     $file = "{$path}/{$environment}/{$group}.php";
     if ($this->files->exists($file) && $this->hasKey($file, $item)) {
         return $file;
     }
     $file = "{$path}/{$group}.php";
     if ($this->files->exists($file)) {
         return $file;
     }
     return null;
 }
Example #2
0
 /**
  * Returns all registered namespaces with the config
  * loader.
  *
  * @return array
  */
 public function getNamespaces()
 {
     return $this->loader->getNamespaces();
 }