You are here

public function MigrateItemsXML::computeCount in Migrate 6.2

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

Return a count of all available IDs from the source listing.

Overrides MigrateItems::computeCount

File

plugins/sources/xml.inc, line 462
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 computeCount() {
  $count = 0;
  $xml = $this
    ->xml();
  if ($xml !== FALSE) {
    $ids = $this
      ->getIDsFromXML($xml, TRUE);
    $count = count($ids);
  }
  return $count;
}