You are here

protected function FeedsProcessor::newEntity in Feeds 7.2

Create a new entity.

Parameters

FeedsSource $source: The feeds source that spawns this entity.

Return value

object A new entity object.

4 calls to FeedsProcessor::newEntity()
FeedsNodeProcessor::newEntity in plugins/FeedsNodeProcessor.inc
Creates a new node in memory and returns it.
FeedsProcessor::process in plugins/FeedsProcessor.inc
Process the result of the parsing stage.
FeedsTermProcessor::newEntity in plugins/FeedsTermProcessor.inc
Creates a new term in memory and returns it.
FeedsUserProcessor::newEntity in plugins/FeedsUserProcessor.inc
Creates a new user account in memory and returns it.
3 methods override FeedsProcessor::newEntity()
FeedsNodeProcessor::newEntity in plugins/FeedsNodeProcessor.inc
Creates a new node in memory and returns it.
FeedsTermProcessor::newEntity in plugins/FeedsTermProcessor.inc
Creates a new term in memory and returns it.
FeedsUserProcessor::newEntity in plugins/FeedsUserProcessor.inc
Creates a new user account in memory and returns it.

File

plugins/FeedsProcessor.inc, line 115
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

protected function newEntity(FeedsSource $source) {
  $entity = new stdClass();
  $info = $this
    ->entityInfo();
  if (!empty($info['entity keys']['language'])) {
    $entity->{$info['entity keys']['language']} = $this
      ->entityLanguage();
  }
  return $entity;
}