public function ChunkedXMLFIReader::setOptions in Feed Import 8
Sets options for this instance
Parameters
array $options: An assoc array containig options
bool $overwrite: TRUE if the options should pe overwritten, FALSE to merge them
Overrides FeedImportConfigurable::setOptions
File
- feed_import_base/
src/ ChunkedXMLFIReader.php, line 83
Class
- ChunkedXMLFIReader
- CunkedXML Reader class, used for huge XML files.
Namespace
Drupal\feed_import_baseCode
public function setOptions(array $options, $overwrite = FALSE) {
parent::setOptions($options, $overwrite);
// Set substr function.
if (!empty($this->options['substr']) && function_exists($this->options['substr'])) {
$this->substr = $this->options['substr'];
}
// Set XML properties.
if (!empty($this->options['properties'])) {
$this->properties = $this->options['properties'];
}
// Set chunk size.
if (!empty($this->options['size'])) {
$this->size = (int) $this->options['size'];
}
// Check SXE class
if (isset($this->options['class'])) {
$this->sxclass = $this->options['class'];
}
}