Ejemplo n.º 1
0
 public static function getStartables()
 {
     if (is_null(self::$startables) || !is_array(self::$startables)) {
         self::$startables = array();
         QueryBuilder::create(SQL::getConnection())->withQuery("SELECT id, display_name, folder_name, executable FROM websites")->build()->forEachResult(function ($row) {
             self::$startables[] = new Startables($row['id'], $row['display_name'], $row['folder_name'], $row['executable']);
         });
         if (count(self::$startables) == 0) {
             throw new Exception("lol");
         }
     }
     return self::$startables;
 }