abstract class FeedImportConfigurable in Feed Import 8
This class provides methods to set options.
Hierarchy
- class \Drupal\feed_import_base\FeedImportConfigurable
Expanded class hierarchy of FeedImportConfigurable
File
- feed_import_base/
src/ FeedImportConfigurable.php, line 7
Namespace
Drupal\feed_import_baseView source
abstract class FeedImportConfigurable {
// Class options
protected $options = array();
/**
* Sets options for this instance
*
* @param array $options
* An assoc array containig options
* @param bool $overwrite
* TRUE if the options should pe overwritten, FALSE to merge them
*/
public function setOptions(array $options, $overwrite = FALSE) {
if ($overwrite) {
$this->options = $options;
}
else {
$this->options = $options + $this->options;
}
}
/**
* Helper function to get lines of a string
*
* @param string $str
* The string to get non empty lines from
*
* @return array
* An array of strings
*/
public static function cleanLines($str) {
return preg_split('/\\r?\\n/', $str);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedImportConfigurable:: |
protected | property | ||
FeedImportConfigurable:: |
public static | function | Helper function to get lines of a string | |
FeedImportConfigurable:: |
public | function | Sets options for this instance | 4 |