public function get($hash = null)
    {
        // If the hash is not received, get it from the request
        $hash = $hash?: $this->app->request->token();

        // Determine token path
        $path = $this->path($hash);

        // Abort if the session does not exist
        if (!file_exists($path)) {
            return false;
        }

        // Update token file modification time
        touch($path);

        // Get session data
        $data = json_decode(file_get_contents($path), true);

        // Return session
        return $data;
    }
public function get($hash = null)
    {
        // If the hash is not received, get it from the request
        $hash = $hash?: $this->app->request->token();

        // Determine token path
        $path = $this->path($hash);

        // Abort if the session does not exist
        if (!file_exists($path)) {
            return false;
        }

        // Update token file modification time
        touch($path);

        // Get session data
        $data = json_decode(file_get_contents($path), true);

        // Return session
        return $data;
    }
public function get ( $ hash = null ) { // If the hash is not received, get it from the request $ hash = $ hash ? : $ this -> app -> request -> token ( ) ; // Determine token path $ path = $ this -> path ( $ hash ) ; // Abort if the session does not exist if ( ! file_exists ( $ path ) ) { return false ; } // Update token file modification time touch ( $ path ) ; // Get session data $ data = json_decode ( file_get_contents ( $ path ) , true ) ; // Return session return $ data ; }
Gets the token data

@param string $hash Token hash
@return array|bool Token data or false
Gets the token data