You are here

interface ItemInterface in Feeds 8.3

The interface for a single feed item.

Hierarchy

Expanded class hierarchy of ItemInterface

All classes that implement ItemInterface

19 files declare their use of ItemInterface
AfterParseBase.php in src/EventSubscriber/AfterParseBase.php
AfterParseBaseTest.php in tests/src/Unit/EventSubscriber/AfterParseBaseTest.php
BasicFieldSource.php in src/Feeds/Source/BasicFieldSource.php
EntityEvent.php in src/Event/EntityEvent.php
EntityProcessorBase.php in src/Feeds/Processor/EntityProcessorBase.php

... See full list

File

src/Feeds/Item/ItemInterface.php, line 8

Namespace

Drupal\feeds\Feeds\Item
View source
interface ItemInterface {

  /**
   * Returns the value for a target field.
   *
   * @param string $field
   *   The name of the field.
   *
   * @return mixed|null
   *   The value that corresponds to this field, or null if it does not exist.
   */
  public function get($field);

  /**
   * Sets a value for a field.
   *
   * @param string $field
   *   The name of the field.
   * @param mixed $value
   *   The value for the field.
   *
   * @return $this
   *   An instance of this class.
   */
  public function set($field, $value);

  /**
   * Converts the item to an array.
   *
   * @return array
   *   The data of the item.
   */
  public function toArray();

  /**
   * Loads data in from an array.
   *
   * @param array $data
   *   The data to load in.
   *
   * @return $this
   *   An instance of this class.
   */
  public function fromArray(array $data);

}

Members

Namesort descending Modifiers Type Description Overrides
ItemInterface::fromArray public function Loads data in from an array. 2
ItemInterface::get public function Returns the value for a target field. 2
ItemInterface::set public function Sets a value for a field. 2
ItemInterface::toArray public function Converts the item to an array. 2