src/Budkit/Session/repository/Database.php
public function read($splash, $session, $sessionId)
    {

        $database = $this->database;
        //$token = (string) $input->getCookie($sessId);
        $statement =
            $database->where("session_agent", $database->quote($splash['agent']))
                ->where("session_ip", $database->quote($splash['ip']))
                ->where("session_host", $database->quote($splash['domain']))
                ->where("session_key", $database->quote($sessionId))
                ->select("*")->from($session->table)->prepare();

        $result = $statement->execute();

        //Do we have a session that fits this criteria in the db? if not destroy
        if ((int)$result->rowCount() < 1) {
            $session->destroy($sessionId);
            return false; //will lead to re-creation
        }

        $object = $result->fetchObject();

        return $object;
    }
public function read($splash, $session, $sessionId)
    {

        $database = $this->database;
        //$token = (string) $input->getCookie($sessId);
        $statement =
            $database->where("session_agent", $database->quote($splash['agent']))
                ->where("session_ip", $database->quote($splash['ip']))
                ->where("session_host", $database->quote($splash['domain']))
                ->where("session_key", $database->quote($sessionId))
                ->select("*")->from($session->table)->prepare();

        $result = $statement->execute();

        //Do we have a session that fits this criteria in the db? if not destroy
        if ((int)$result->rowCount() < 1) {
            $session->destroy($sessionId);
            return false; //will lead to re-creation
        }

        $object = $result->fetchObject();

        return $object;
    }
public function read ( $ splash , $ session , $ sessionId ) { $ database = $ this -> database ; //$token = (string) $input->getCookie($sessId); $ statement = $ database -> where ( "session_agent" , $ database -> quote ( $ splash [ 'agent' ] ) ) -> where ( "session_ip" , $ database -> quote ( $ splash [ 'ip' ] ) ) -> where ( "session_host" , $ database -> quote ( $ splash [ 'domain' ] ) ) -> where ( "session_key" , $ database -> quote ( $ sessionId ) ) -> select ( "*" ) -> from ( $ session -> table ) -> prepare ( ) ; $ result = $ statement -> execute ( ) ; //Do we have a session that fits this criteria in the db? if not destroy if ( ( int ) $ result -> rowCount ( ) < 1 ) { $ session -> destroy ( $ sessionId ) ; return false ; //will lead to re-creation } $ object = $ result -> fetchObject ( ) ; return $ object ; }
Read the session from the database

@param type $splash
@param type $session
@param type $sessionId
@return boolean
Read the session from the database