You are here

public function MigrateItemsXML::getAllItems in Migrate 7.2

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

Load the XML at the given URL, and return an array.

Return value

array array of the Items found within it.

1 call to MigrateItemsXML::getAllItems()
MigrateItemsXML::getItem in plugins/sources/xml.inc
Implementers are expected to return an object representing a source item. Items from currentUrl 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 703
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, TRUE);
  }
  return NULL;
}