Example #1
0
 public function __construct($addon, $config = true)
 {
     $this->name = $addon;
     if ($config) {
         $configfile = dir::addon($addon, 'config.json');
         $this->config = json_decode(file_get_contents($configfile), true);
     }
     addonConfig::isSaved($addon);
     $this->sql = new sql();
     $this->sql->query('SELECT * FROM ' . sql::table('addons') . ' WHERE `name` = "' . $addon . '"')->result();
 }