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

        $ini = new Ini();
        $store = $session->folder . DIRECTORY_SEPARATOR;

        //We need to know the array;
        if (!is_array($splash)) return false;

        $sfile = $store . $sessionId . ".ini";


        if (!$ini->isFile($sfile)) {
            //If we can't file the sessionf file;
            //throw new \Exception("The session file does not exists");
            return false;
        }

        //Temporarily chmode the file;
        $ini->chmod($sfile, 0755);

        if (!$ini->readParams($sfile)) {
            throw new \Exception("Could not read the session configuration file");
            return false;
        }

        $sess = $ini->getParams($sfile);

        if (!is_array($sess) || empty($sess)) {
            throw new \Exception("Invalid session file");
            return false;
        }

        //return data as an object;
        $object = new \stdClass;
        $object->session_id = $sessionId;
        $object->session_key = $sess['key'];
        $object->session_ip = $sess['ip'];
        $object->session_host = $sess['domain'];
        $object->session_agent = $sess['agent'];
        $object->session_token = $sess['token'];
        $object->session_expires = $sess['expiry'];
        $object->session_lastactive = $sess['active'];
        $object->session_registry = $sess['registry'];

        return $object;

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

        $ini = new Ini();
        $store = $session->folder . DIRECTORY_SEPARATOR;

        //We need to know the array;
        if (!is_array($splash)) return false;

        $sfile = $store . $sessionId . ".ini";


        if (!$ini->isFile($sfile)) {
            //If we can't file the sessionf file;
            //throw new \Exception("The session file does not exists");
            return false;
        }

        //Temporarily chmode the file;
        $ini->chmod($sfile, 0755);

        if (!$ini->readParams($sfile)) {
            throw new \Exception("Could not read the session configuration file");
            return false;
        }

        $sess = $ini->getParams($sfile);

        if (!is_array($sess) || empty($sess)) {
            throw new \Exception("Invalid session file");
            return false;
        }

        //return data as an object;
        $object = new \stdClass;
        $object->session_id = $sessionId;
        $object->session_key = $sess['key'];
        $object->session_ip = $sess['ip'];
        $object->session_host = $sess['domain'];
        $object->session_agent = $sess['agent'];
        $object->session_token = $sess['token'];
        $object->session_expires = $sess['expiry'];
        $object->session_lastactive = $sess['active'];
        $object->session_registry = $sess['registry'];

        return $object;

    }
public function read ( $ splash , $ session , $ sessionId ) { $ ini = new Ini ( ) ; $ store = $ session -> folder . DIRECTORY_SEPARATOR ; //We need to know the array; if ( ! is_array ( $ splash ) ) return false ; $ sfile = $ store . $ sessionId . ".ini" ; if ( ! $ ini -> isFile ( $ sfile ) ) { //If we can't file the sessionf file; //throw new \Exception("The session file does not exists"); return false ; } //Temporarily chmode the file; $ ini -> chmod ( $ sfile , 0755 ) ; if ( ! $ ini -> readParams ( $ sfile ) ) { throw new \ Exception ( "Could not read the session configuration file" ) ; return false ; } $ sess = $ ini -> getParams ( $ sfile ) ; if ( ! is_array ( $ sess ) || empty ( $ sess ) ) { throw new \ Exception ( "Invalid session file" ) ; return false ; } //return data as an object; $ object = new \ stdClass ; $ object -> session_id = $ sessionId ; $ object -> session_key = $ sess [ 'key' ] ; $ object -> session_ip = $ sess [ 'ip' ] ; $ object -> session_host = $ sess [ 'domain' ] ; $ object -> session_agent = $ sess [ 'agent' ] ; $ object -> session_token = $ sess [ 'token' ] ; $ object -> session_expires = $ sess [ 'expiry' ] ; $ object -> session_lastactive = $ sess [ 'active' ] ; $ object -> session_registry = $ sess [ 'registry' ] ; return $ object ; }
Reads session data from file

@param type $splash
@param type $session
@param type $sessionId
Reads session data from file