src/Koldy/Session/Adapter/Db.php
private function getDbData($sessionid): ?stdClass
    {
        $r = null;

        try {
            if ($this->disableLog) {
                Log::temporaryDisable('sql');
            }

            $r = $this->getAdapter()
              ->select($this->getTableName())
              ->field('time')
              ->field('data')
              ->where('id', $sessionid)
              ->fetchFirstObj();

        } catch (DbException $e) {
            throw $e;

        } finally {
            if ($this->disableLog) {
                Log::restoreTemporaryDisablement();
            }
        }

        return $r;
    }
private function getDbData($sessionid): ?stdClass
    {
        $r = null;

        try {
            if ($this->disableLog) {
                Log::temporaryDisable('sql');
            }

            $r = $this->getAdapter()
              ->select($this->getTableName())
              ->field('time')
              ->field('data')
              ->where('id', $sessionid)
              ->fetchFirstObj();

        } catch (DbException $e) {
            throw $e;

        } finally {
            if ($this->disableLog) {
                Log::restoreTemporaryDisablement();
            }
        }

        return $r;
    }
private function getDbData ( $ sessionid ) : ? stdClass { $ r = null ; try { if ( $ this -> disableLog ) { Log :: temporaryDisable ( 'sql' ) ; } $ r = $ this -> getAdapter ( ) -> select ( $ this -> getTableName ( ) ) -> field ( 'time' ) -> field ( 'data' ) -> where ( 'id' , $ sessionid ) -> fetchFirstObj ( ) ; } catch ( DbException $ e ) { throw $ e ; } finally { if ( $ this -> disableLog ) { Log :: restoreTemporaryDisablement ( ) ; } } return $ r ; }
Get the session data from database

@param string $sessionid

@return null|stdClass if data doesn't exist in database
@throws DbException
@throws \Koldy\Config\Exception
@throws \Koldy\Exception
Get the session data from database