You are here

public function FeedImportReader::getStreamContext in Feed Import 7.3

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/inc/feed_import_readers.inc
Here you'll init your reader.
CSVFIReader::init in feed_import_base/inc/feed_import_readers.inc
Here you'll init your reader.
DomXMLFIReader::init in feed_import_base/inc/feed_import_readers.inc
Here you'll init your reader.
JSONFIReader::init in feed_import_base/inc/feed_import_readers.inc
Here you'll init your reader.
SimpleXMLFIReader::init in feed_import_base/inc/feed_import_readers.inc
Here you'll init your reader.

File

feed_import_base/inc/feed_import_abstract.inc, line 117
This file contains abstract classes and interfaces for feed import.

Class

FeedImportReader
Abstract implementation of reader.

Code

public function getStreamContext($ctx) {
  if ($ctx && (is_array($ctx) || is_scalar($ctx) && ($ctx = json_decode($ctx, TRUE)))) {
    return stream_context_create($ctx);
  }
  return NULL;
}