PHP Interface Zend\Stratigility\Http\ResponseInterface

Defines the following responses capabilities: - Write to the content - End the response (mark it complete) - Determine if the response is complete
Deprecation: since 1.3.0; to be removed with 2.0.0. Do not use the methods defined in this interface; use only those defined in PSR-7.
Mostra file Open project: zendframework/zend-stratigility Interface Usage Examples

Public Methods

Method Description
end ( string $data = null ) Mark the response as complete
isComplete ( ) : boolean Indicate whether or not the response is complete.
write ( string $data ) Write data to the response body

Method Details

end() public method

A completed response should no longer allow manipulation of either headers or the content body. If $data is passed, that data should be written to the response body prior to marking the response as complete.
public end ( string $data = null )
$data string

isComplete() public method

I.e., if end() has previously been called.
public isComplete ( ) : boolean
return boolean

write() public method

Proxies to the underlying stream and writes the provided data to it.
public write ( string $data )
$data string