diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index 87a1346affc158c16fb3c606d1b06c04af2f7d17..15adcda64b9eb4893a28904c154d4da0b8c6a067 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -45,7 +45,7 @@ class FeedsNodeProcessor extends FeedsProcessor { // Assemble node, map item to it, save. try { - $node = empty($nid) ? $this->newNode($source, $hash) : $this->loadNode($source, $hash, $nid); + $node = empty($nid) ? $this->newEntity($source, $hash) : $this->loadEntity($source, $hash, $nid); $this->map($source, $parser_result, $node); node_save($node); if (!empty($nid)) { @@ -373,7 +373,7 @@ class FeedsNodeProcessor extends FeedsProcessor { /** * Creates a new node in memory and returns it. */ - protected function newNode($source, $hash) { + protected function newEntity($source, $hash) { $node = new stdClass(); $node->type = $this->config['content_type']; $node->changed = REQUEST_TIME; @@ -393,7 +393,7 @@ class FeedsNodeProcessor extends FeedsProcessor { * If the update existing method is not FEEDS_UPDATE_EXISTING, only the node * table will be loaded, foregoing the node_load API for better performance. */ - protected function loadNode($source, $hash, $nid) { + protected function loadEntity($source, $hash, $nid) { if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) { $node = node_load($nid, NULL, TRUE); } diff --git a/plugins/FeedsTermProcessor.inc b/plugins/FeedsTermProcessor.inc index 848cc4311442d2cdb39c06c3d790e0cc421c4a7b..88450171aa2a7f21205f0bec4b81c65ccdefd139 100644 --- a/plugins/FeedsTermProcessor.inc +++ b/plugins/FeedsTermProcessor.inc @@ -30,17 +30,17 @@ class FeedsTermProcessor extends FeedsProcessor { // Map item to a term. if ($tid && $this->config['update_existing'] == FEEDS_UPDATE_EXISTING) { - $term = $this->loadTerm($source, $tid); + $term = $this->loadEntity($source, $tid); } else { - $term = $this->newTerm($source); + $term = $this->newEntity($source); } $term = $this->map($source, $parser_result, $term); // Save the term. $term->feeds_importer_id = $this->id; $term->feed_nid = $source->feed_nid; - if (!$this->validateTerm($term)) { + if (!$this->validateEntity($term)) { continue; } taxonomy_term_save($term); @@ -236,7 +236,7 @@ class FeedsTermProcessor extends FeedsProcessor { /** * Creates a new term in memory and returns it. */ - protected function newTerm($source) { + protected function newEntity($source) { $term = new stdClass(); $this->newItemInfo($term, $source->feed_nid); $vocabulary = $this->vocabulary(); @@ -247,7 +247,7 @@ class FeedsTermProcessor extends FeedsProcessor { /** * Loads an existing term. */ - protected function loadTerm($source, $tid) { + protected function loadEntity($source, $tid) { $term = taxonomy_term_load($tid); if ($this->loadItemInfo($term)) { $this->newItemInfo($term, $source->feed_nid); @@ -258,7 +258,7 @@ class FeedsTermProcessor extends FeedsProcessor { /** * Validates a term. */ - protected function validateTerm($term) { + protected function validateEntity($term) { if (!isset($term->name)) { return FALSE; } diff --git a/plugins/FeedsUserProcessor.inc b/plugins/FeedsUserProcessor.inc index ac5bea50fa2b1c955aa4d1a9114f22b04db59b0f..990fd3b0951b856c7d32a8a45c1974056a8653a8 100644 --- a/plugins/FeedsUserProcessor.inc +++ b/plugins/FeedsUserProcessor.inc @@ -33,15 +33,15 @@ class FeedsUserProcessor extends FeedsProcessor { // Load / create new user and execute mapping. if (empty($uid)) { - $account = $this->newUser($source); + $account = $this->newEntity($source); } else { - $account = $this->loadUser($source, $uid); + $account = $this->loadEntity($source, $uid); } $account = $this->map($source, $parser_result, $account); // Save the user. - if (!$this->validateUser($account)) { + if (!$this->validateEntity($account)) { $failed++; continue; } @@ -214,7 +214,7 @@ class FeedsUserProcessor extends FeedsProcessor { /** * Creates a new user account in memory and returns it. */ - protected function newUser($source) { + protected function newEntity($source) { $account = new stdClass(); $account->uid = 0; $account->roles = array_filter($this->config['roles']); @@ -226,7 +226,7 @@ class FeedsUserProcessor extends FeedsProcessor { /** * Loads an existing user. */ - protected function loadUser($source, $uid) { + protected function loadEntity($source, $uid) { $account = user_load($uid); if (!$this->loadItemInfo($account)) { $this->newItemInfo($account, $source->feed_nid); @@ -237,7 +237,7 @@ class FeedsUserProcessor extends FeedsProcessor { /** * Validates a user account. */ - protected function validateUser($account) { + protected function validateEntity($account) { if (empty($account->name) || empty($account->mail) || !valid_email_address($account->mail)) { return FALSE; }