/** 
  * 
  * @return \models\API2ApplicationModel
  */
 public function loadByAppToken($token)
 {
     global $DB;
     $stat = $DB->prepare("SELECT api2_application_information.* FROM api2_application_information WHERE app_token =:app_token");
     $stat->execute(array('app_token' => $token));
     if ($stat->rowCount() > 0) {
         $app = new API2ApplicationModel();
         $app->setFromDataBaseRow($stat->fetch());
         return $app;
     }
 }
 public function fetchAll()
 {
     $this->buildStart();
     $this->build();
     $this->buildStat();
     $results = array();
     while ($data = $this->stat->fetch()) {
         $area = new API2ApplicationModel();
         $area->setFromDataBaseRow($data);
         $results[] = $area;
     }
     return $results;
 }