abstract class MigrateItems in Migrate 7.2
Same name and namespace in other branches
- 6.2 plugins/sources/multiitems.inc \MigrateItems
Extend the MigrateItems class to provide a means to obtain a list of IDs to be migrated from a given source (e.g., MigrateItemsXML extends MigrateItem to obtain a list of IDs from an XML document). This class also provides a means to obtain the data for a given migratable item given its ID.
Hierarchy
- class \MigrateItems
Expanded class hierarchy of MigrateItems
File
- plugins/
sources/ multiitems.inc, line 16 - Support for migration from sources where data spans multiple lines (ex. xml, json) and IDs for the items are part of each item and multiple items reside in a single file.
View source
abstract class MigrateItems {
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();
/**
* Implementors are expected to return an object representing a source item.
*
* @param mixed $id
*
* @return stdClass
*/
public abstract function getItem($id);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateItems:: |
abstract public | function | Implementors are expected to return a count of IDs available to be migrated. | 1 |
MigrateItems:: |
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. | 1 |
MigrateItems:: |
abstract public | function | Implementors are expected to return an object representing a source item. | 1 |
MigrateItems:: |
public | function | 1 | |
MigrateItems:: |
abstract public | function | Implementors are expected to return a string representing where the listing is obtained from (a URL, file directory, etc.) | 1 |