public function FeedImportReader::getStreamContext in Feed Import 8
Returns a stream context
Parameters
mixed $ctx: Context options
Return value
resource Stream context or NULL on failure
5 calls to FeedImportReader::getStreamContext()
- ChunkedXMLFIReader::init in feed_import_base/
src/ ChunkedXMLFIReader.php - Here you'll init your reader.
- CSVFIReader::init in feed_import_base/
src/ CSVFIReader.php - Here you'll init your reader.
- DomXMLFIReader::init in feed_import_base/
src/ DomXMLFIReader.php - Here you'll init your reader.
- JSONFIReader::init in feed_import_base/
src/ JSONFIReader.php - Here you'll init your reader.
- SimpleXMLFIReader::init in feed_import_base/
src/ SimpleXMLFIReader.php - Here you'll init your reader.
File
- feed_import_base/
src/ FeedImportReader.php, line 72
Class
- FeedImportReader
- Abstract implementation of reader.
Namespace
Drupal\feed_import_baseCode
public function getStreamContext($ctx) {
if ($ctx && (is_array($ctx) || is_scalar($ctx) && ($ctx = json_decode($ctx, TRUE)))) {
return stream_context_create($ctx);
}
return NULL;
}