In some cases the items being imported may be conglomerated (as in an XML feed, where a single retrieval contains many items). In these cases, MigrateSourceMultiItems may be the right choice to represent the source data.
The subordinate MigrateItems class operates much like a fusion of MigrateList and MigrateItem. To define a MigrateItems class for a particular type of source, you need to implement the following methods:
Should return a string representing the source of the ID (e.g., the URL of an XML feed).
Should return an array of the IDs available from the source.
Should return a count of the IDs available from the source.
Given an ID obtained getIdList(), returns the data for the source item keyed by that ID, as an object.
The MigrateSourceMultiItems class wraps around you MigrateItems object. In your migration constructor, construct a MigrateItems instance, and pass it the MigrateSourceList constructor (you may optionally also pass a source field list and an options array). The MigrateSourceMultiItems instance you create will then iterate over the IDs returned by getIdList(), passing each one to getItem() to obtain source data to be migrated.
See XML-based sources for an example of using these classes in your migration.