public function stream()
    {

        // filesystem
        if( isset( $this->filePath ) ) {

            return readfile( $this->filePath );

        } elseif ( $this->oid ) {

            $pg = $this->oid->pg;

            $pg->query( new Query( 'BEGIN' ) );

            $handle = pg_lo_open( $pg->resource->get(), $this->oid->oid, 'r' );

            pg_lo_read_all( $handle );
            pg_lo_close( $handle );

            $pg->query( new Query( 'COMMIT' ) );

            return null;

        }

        throw \LogicException("Shouldn't ever get tripped");

    }
public function stream()
    {

        // filesystem
        if( isset( $this->filePath ) ) {

            return readfile( $this->filePath );

        } elseif ( $this->oid ) {

            $pg = $this->oid->pg;

            $pg->query( new Query( 'BEGIN' ) );

            $handle = pg_lo_open( $pg->resource->get(), $this->oid->oid, 'r' );

            pg_lo_read_all( $handle );
            pg_lo_close( $handle );

            $pg->query( new Query( 'COMMIT' ) );

            return null;

        }

        throw \LogicException("Shouldn't ever get tripped");

    }
public function stream ( ) { // filesystem if ( isset ( $ this -> filePath ) ) { return readfile ( $ this -> filePath ) ; } elseif ( $ this -> oid ) { $ pg = $ this -> oid -> pg ; $ pg -> query ( new Query ( 'BEGIN' ) ) ; $ handle = pg_lo_open ( $ pg -> resource -> get ( ) , $ this -> oid -> oid , 'r' ) ; pg_lo_read_all ( $ handle ) ; pg_lo_close ( $ handle ) ; $ pg -> query ( new Query ( 'COMMIT' ) ) ; return null ; } throw \ LogicException ( "Shouldn't ever get tripped" ) ; }
Output the data stored in the large object resource to stdout.
@param void
@return void
Output the data stored in the large object resource to stdout .