You are here

abstract class MigrateList in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/list.inc \MigrateList

Extend the MigrateList class to provide a means to obtain a list of IDs to be migrated from a given source (e.g., MigrateListXML extends MigrateList to obtain a list of IDs from an XML document).

Hierarchy

Expanded class hierarchy of MigrateList

File

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

View source
abstract class MigrateList {
  public function __construct() {
  }

  /**
   * Implementors are expected to return a string representing where the listing
   * is obtained from (a URL, file directory, etc.)
   *
   * @return string
   */
  public abstract function __toString();

  /**
   * Implementors are expected to return an array of unique IDs, suitable for
   * passing to the MigrateItem class to retrieve the data for a single item.
   *
   * @return Mixed, iterator or array
   */
  public abstract function getIdList();

  /**
   * Implementors are expected to return a count of IDs available to be migrated.
   *
   * @return int
   */
  public abstract function computeCount();

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateList::computeCount abstract public function Implementors are expected to return a count of IDs available to be migrated. 3
MigrateList::getIdList abstract public function Implementors are expected to return an array of unique IDs, suitable for passing to the MigrateItem class to retrieve the data for a single item. 3
MigrateList::__construct public function 3
MigrateList::__toString abstract public function Implementors are expected to return a string representing where the listing is obtained from (a URL, file directory, etc.) 3