Esempio n. 1
0
 public static function getDatabaseInstance()
 {
     if (!self::$_db) {
         self::$_db = helpers\Database::getInstance();
     }
     return self::$_db;
 }
Esempio n. 2
0
 public function GetAction()
 {
     $db = helpers\Database::getInstance();
     $table = filter_input(INPUT_POST, 'table');
     $stmnt = $db->get($table, array(1, '=', 1));
     $results = $stmnt->results();
     $json = json_encode($results);
     header('Content-Type: application/json');
     die($json);
 }
 public static function getAll()
 {
     return helpers\Database::getInstance()->get(self::getTableName())->results();
 }