Exemplo n.º 1
0
 /**
  * Get Info theme
  * @param  [type] $theme [description]
  * @return Json
  */
 public function getThemeInfo($theme)
 {
     $theme = strtolower($theme);
     $default = [];
     if (!$this->exists($theme)) {
         return $default;
     }
     $path = $this->getJsonPath($theme);
     if ($this->files->exists($path)) {
         $attributes = Json::make($path)->toArray();
         $attributes['path'] = dirname($path);
         return $attributes;
     } else {
         $message = "Theme [{$theme}] must have a valid theme.json manifest file.";
         throw new FileMissingException($message);
     }
 }
Exemplo n.º 2
0
 /**
  * Get theme info from json file.
  *
  * @param SplFileInfo $file
  *
  * @return array
  */
 protected function getInfo($file)
 {
     $attributes = Json::make($path = $file->getRealPath())->toArray();
     $attributes['path'] = dirname($path);
     return $attributes;
 }