original_string: public function gc($maxlifetime)
      {
          $platform = $this->tableGateway->getAdapter()->getPlatform();
  
          $where = new Where();
          $where->lessThan(
              $this->options->getModifiedColumn(),
              new Expression('(' . time() . ' - ' . $platform->quoteIdentifier($this->options->getLifetimeColumn()) . ')')
          );
  
          $rows = $this->tableGateway->select($where);
  
          $ids = [];
  
          /* @var \UthandoSessionManager\Model\SessionModel $row */
          foreach ($rows as $row) {
              $ids[] = $row->{$this->options->getIdColumn()};
          }
  
          if (count($ids) > 0) {
              $where = new Where();
              $result = (bool) $this->tableGateway->delete(
                  $where->in($this->options->getIdColumn(), $ids)
              );
          } else {
              $result = false;
          }
  
          return $result;
      }
code: public function gc($maxlifetime)
      {
          $platform = $this->tableGateway->getAdapter()->getPlatform();
  
          $where = new Where();
          $where->lessThan(
              $this->options->getModifiedColumn(),
              new Expression('(' . time() . ' - ' . $platform->quoteIdentifier($this->options->getLifetimeColumn()) . ')')
          );
  
          $rows = $this->tableGateway->select($where);
  
          $ids = [];
  
          /* @var \UthandoSessionManager\Model\SessionModel $row */
          foreach ($rows as $row) {
              $ids[] = $row->{$this->options->getIdColumn()};
          }
  
          if (count($ids) > 0) {
              $where = new Where();
              $result = (bool) $this->tableGateway->delete(
                  $where->in($this->options->getIdColumn(), $ids)
              );
          } else {
              $result = false;
          }
  
          return $result;
      }
code_tokens: public function gc ( $ maxlifetime ) { $ platform = $ this -> tableGateway -> getAdapter ( ) -> getPlatform ( ) ; $ where = new Where ( ) ; $ where -> lessThan ( $ this -> options -> getModifiedColumn ( ) , new Expression ( '(' . time ( ) . ' - ' . $ platform -> quoteIdentifier ( $ this -> options -> getLifetimeColumn ( ) ) . ')' ) ) ; $ rows = $ this -> tableGateway -> select ( $ where ) ; $ ids = [ ] ; /* @var \UthandoSessionManager\Model\SessionModel $row */ foreach ( $ rows as $ row ) { $ ids [ ] = $ row -> { $ this -> options -> getIdColumn ( ) } ; } if ( count ( $ ids ) > 0 ) { $ where = new Where ( ) ; $ result = ( bool ) $ this -> tableGateway -> delete ( $ where -> in ( $ this -> options -> getIdColumn ( ) , $ ids ) ) ; } else { $ result = false ; } return $ result ; }
docstring: Garbage Collection
  Only delete sessions that have expired.
  
  @param int $maxlifetime
  @return true
docstring_tokens: Garbage Collection Only delete sessions that have expired .