protected function DrupalRemoteStreamWrapper::getStreamContent in Remote Stream Wrapper 7
Fetch the content of the file using drupal_http_request().
2 calls to DrupalRemoteStreamWrapper::getStreamContent()
- DrupalRemoteStreamWrapper::stream_open in ./
remote_stream_wrapper.inc - Support for fopen(), file_get_contents(), file_put_contents() etc.
- DrupalRemoteStreamWrapper::stream_stat in ./
remote_stream_wrapper.inc - Support for fstat().
File
- ./
remote_stream_wrapper.inc, line 535
Class
- DrupalRemoteStreamWrapper
- Stream wrapper to support local files.
Code
protected function getStreamContent() {
if (!isset($this->stream_content)) {
$this->stream_content = NULL;
$request = drupal_http_request($this->uri);
if (empty($request->error) && !empty($request->data)) {
$this->stream_content = $request->data;
}
}
return $this->stream_content;
}