Esempio n. 1
0
 function onStartCommand(StackDataStore $login)
 {
     $fields = $login->getHierarchy();
     $this->resourceIndex = @mysqli_connect($fields[self::DB_SERVER], $fields[self::DB_USERNAME], $fields[self::DB_PASSWORD]);
     if (!$this->resourceIndex) {
         return false;
     }
     return true;
 }
Esempio n. 2
0
 function onStartCommand(StackDataStore $login)
 {
     $fields = $login->getHierarchy();
     if (!$fields[self::DB_USE_EXTRAS]) {
         $this->resourceIndex = new \SQLite3($fields[self::DB_FILE]);
     } else {
         $this->resourceIndex = new \SQLite3($fields[self::DB_FILE], $fields[self::DB_OPTIONS], $fields[self::DB_ENCRYPT_KEY]);
     }
     return true;
 }
Esempio n. 3
0
 function __construct(StackDataStore $login)
 {
     $this->log = new Log(self::TAG);
     if (!$login->checkAndDone()) {
         $this->log->e("Server connection arguments not accepted");
         return false;
     }
     if (!$this->onStartCommand($login)) {
         $this->log->e("Server connection failured");
         return false;
     }
     return true;
 }