You are here

public function MigrateItemsXML::getAllItems in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/xml.inc \MigrateItemsXML::getAllItems()

Load the XML at the given URL, and return an array of the Items found within it.

Return value

array

1 call to MigrateItemsXML::getAllItems()
MigrateItemsXML::getItem in plugins/sources/xml.inc
Implementors are expected to return an object representing a source item. Items are cached as an array of key=ID and value=stdclass object with attribute xml containing the xml SimpleXMLElement object of the item.

File

plugins/sources/xml.inc, line 478
Support for migration from XML sources.

Class

MigrateItemsXML
Implementation of MigrateItems, for providing a list of IDs and for retrieving a parsed XML document given an ID from this list.

Code

public function getAllItems() {
  $xml = $this
    ->xml();
  if ($xml !== FALSE) {
    return $this
      ->getItemsFromXML($xml);
  }
  return NULL;
}