You are here

public function DynamicItem::set in Feeds 8.3

Sets a value for a field.

Parameters

string $field: The name of the field.

mixed $value: The value for the field.

Return value

$this An instance of this class.

Overrides ItemInterface::set

1 call to DynamicItem::set()
DynamicItem::fromArray in src/Feeds/Item/DynamicItem.php
Loads data in from an array.

File

src/Feeds/Item/DynamicItem.php, line 29

Class

DynamicItem
Defines an item class for when a parser has a dynamic set of fields.

Namespace

Drupal\feeds\Feeds\Item

Code

public function set($field, $value) {
  $this->data[$field] = $value;
  return $this;
}