/** * 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); } }
/** * 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; }