Example #1
0
 /**
  * check(): Check if nonce exists (having deleted stale ones); if it is, delete it and return true.
  * @param  string $nonce  Nonce to check.
  * @return bool
  */
 public static function check($nonce)
 {
     self::clean();
     if (TlonData::select(self::$TABLE, 'nonce', $nonce)) {
         TlonData::delete(self::$TABLE, TlonDataComparison::equals('nonce', $nonce));
         return true;
     } else {
         return false;
     }
 }
 public static function deleteByGroupname($groupname)
 {
     return TlonData::delete(self::$TABLE, TlonDataComparison::equals('groupname', $groupname));
 }
Example #3
0
 public static function deleteByDocumentID($document_id)
 {
     return TlonData::delete(self::$TABLE, TlonDataComparison::equals('document_id', $document_id));
 }
Example #4
0
 public static function deleteByArrivalTimeBefore($time)
 {
     return TlonData::delete(self::$TABLE, array(TlonDataComparison::lessThan('arrival_time', $time), TlonDataComparison::equals('applied', 1)));
 }