You are here

public function MigrateSourceList::computeCount in Migrate 6.2

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

It's the list class that knows how many records are available, so ask it.

Return value

int

File

plugins/sources/list.inc, line 132
Support for migration from sources with distinct means of listing items to import and obtaining the items themselves.

Class

MigrateSourceList
Implementation of MigrateSource, providing the semantics of iterating over IDs provided by a MigrateList and retrieving data from a MigrateItem.

Code

public function computeCount() {

  // @API: Support old count method for now.
  if (method_exists($this->listClass, 'computeCount')) {
    return $this->listClass
      ->computeCount();
  }
  else {
    return $this->listClass
      ->count();
  }
}