protected function getAndCheckConfig()
{
$this->config = json_decode(file_get_contents($this->full_path . 'theme.json'), true);
if (!isset($this->config['directory'])) {
throw new Exception('No directory was specified in the theme.json file inside the theme package. <br> A directory containing the theme files must be specified in the theme package.');
}
if (!File::exists("{$this->full_path}{$this->config['directory']}/")) {
throw new Exception('The directory specified in the theme.json was not found in the theme package.');
}
$this->theme_directory = $this->config['directory'];
$this->has_settings = isset($this->config['has_settings']) ? $this->config['has_settings'] : false;
}