public function purge($lifetime = LibSessionsDomainEntitySession::MAX_LIFETIME, $guestOnly = true)
    {
        $past = time() - $lifetime;

        $query = $this->getQuery()->delete()->where('time < '.$past);

        if ($guestOnly) {
            $query->where('guest', '=', 1);
        }

        return (boolean) $this->getStore()->execute($query);
    }
public function purge($lifetime = LibSessionsDomainEntitySession::MAX_LIFETIME, $guestOnly = true)
    {
        $past = time() - $lifetime;

        $query = $this->getQuery()->delete()->where('time < '.$past);

        if ($guestOnly) {
            $query->where('guest', '=', 1);
        }

        return (boolean) $this->getStore()->execute($query);
    }
public function purge ( $ lifetime = LibSessionsDomainEntitySession :: MAX_LIFETIME , $ guestOnly = true ) { $ past = time ( ) - $ lifetime ; $ query = $ this -> getQuery ( ) -> delete ( ) -> where ( 'time < ' . $ past ) ; if ( $ guestOnly ) { $ query -> where ( 'guest' , '=' , 1 ) ; } return ( boolean ) $ this -> getStore ( ) -> execute ( $ query ) ; }
Removes all expired sessions

@param int maximum session lifetime
@param bool delete guest sessions only
Removes all expired sessions