public function getContent($asResource = false)
    {
        if ($asResource === true) {
            if ($this->content !== null) {
                throw new Exception('Cannot return request content as resource because it has already been retrieved.', 1332942478);
            }
            $this->content = '';

            return fopen($this->inputStreamUri, 'rb');
        }

        if ($this->content === null) {
            $this->content = file_get_contents($this->inputStreamUri);
        }

        return $this->content;
    }
public function getContent($asResource = false)
    {
        if ($asResource === true) {
            if ($this->content !== null) {
                throw new Exception('Cannot return request content as resource because it has already been retrieved.', 1332942478);
            }
            $this->content = '';

            return fopen($this->inputStreamUri, 'rb');
        }

        if ($this->content === null) {
            $this->content = file_get_contents($this->inputStreamUri);
        }

        return $this->content;
    }
public function getContent ( $ asResource = false ) { if ( $ asResource === true ) { if ( $ this -> content !== null ) { throw new Exception ( 'Cannot return request content as resource because it has already been retrieved.' , 1332942478 ) ; } $ this -> content = '' ; return fopen ( $ this -> inputStreamUri , 'rb' ) ; } if ( $ this -> content === null ) { $ this -> content = file_get_contents ( $ this -> inputStreamUri ) ; } return $ this -> content ; }
Returns the content of the request body

If the request body has not been set with setContent() previously, this method
will try to retrieve it from the input stream. If $asResource was set to true,
the stream resource will be returned instead of a string.

If the content which has been set by setContent() originally was a stream
resource, that resource will be returned, no matter if $asResource is set.


@param boolean $asResource If set, the content is returned as a resource pointing to PHP's input stream
@return string|resource
@throws Exception
@deprecated Since Flow 5.1, use getBody
@see getBody()
Returns the content of the request body