Ejemplo n.º 1
0
 /**
  * gc
  *
  * @param string $past
  *
  * @return  bool
  */
 public function gc($past)
 {
     $query = $this->db->getQuery(true);
     $query->delete($this->db->quoteName($this->options['table']))->where($this->db->quoteName($this->options['time_col']) . ' < ' . $this->db->quote((int) $past));
     // Remove expired sessions from the database.
     $this->db->setQuery($query);
     return (bool) $this->db->execute();
 }
Ejemplo n.º 2
0
 /**
  * Quick quote.
  *
  * @param string $value
  *
  * @return  string
  */
 public function q($value)
 {
     return $this->db->quote($value);
 }