You are here

class MigrateSourceView in Migrate 6.2

Implementation of MigrateSource, to handle imports from views. All that should be necessary (once Views is ported to D7) is to pull the SQL query from the view, the MigrateSourceSQL class can then just handle it like hand-constructed queries.

Hierarchy

Expanded class hierarchy of MigrateSourceView

File

plugins/sources/view.inc, line 14
Define a MigrateSource for importing from views

View source
class MigrateSourceView extends MigrateSourceSQL {
  protected $viewName;
  public function __construct($view_name) {
    $this->viewName = $view_name;

    // TODO: Derive the query from the view
    parent::__construct($query);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateSource::$activeMap protected property The MigrateMap class for the current migration.
MigrateSource::$activeMigration protected property The Migration class currently invoking us, during rewind() and next().
MigrateSource::$cacheCounts protected property Whether this instance should cache the source count.
MigrateSource::$cacheKey protected property Key to use for caching counts.
MigrateSource::$currentKey protected property The primary key of the current row
MigrateSource::$currentRow protected property The current row from the quey
MigrateSource::$highwaterField protected property Information on the highwater mark for the current migration, if any.
MigrateSource::$idList protected property List of source IDs to process.
MigrateSource::$mapRowAdded protected property By default, next() will directly read the map row and add it to the data row. A source plugin implementation may do this itself (in particular, the SQL source can incorporate the map table into the query) - if so, it should set this TRUE so we…
MigrateSource::$numIgnored protected property Number of rows intentionally ignored (prepareRow() returned FALSE)
MigrateSource::$skipCount protected property Whether this instance should not attempt to count the source.
MigrateSource::count public function Return a count of available source records, from the cache if appropriate. Returns -1 if the source is not countable.
MigrateSource::current public function Implementation of Iterator::current() - called when entering a loop iteration, returning the current row
MigrateSource::getCurrentKey public function
MigrateSource::getIgnored public function
MigrateSource::getProcessed public function
MigrateSource::key public function Implementation of Iterator::key - called when entering a loop iteration, returning the key of the current row. It must be a scalar - we will serialize to fulfill the requirement, but using getCurrentKey() is preferable.
MigrateSource::next public function Implementation of Iterator::next() - subclasses of MigrateSource should implement getNextRow() to retrieve the next valid source rocord to process.
MigrateSource::prepareRow protected function Give the calling migration a shot at manipulating, and possibly rejecting, the source row.
MigrateSource::resetStats public function Reset numIgnored back to 0.
MigrateSource::rewind public function Implementation of Iterator::rewind() - subclasses of MigrateSource should implement performRewind() to do any class-specific setup for iterating source records.
MigrateSource::valid public function Implementation of Iterator::valid() - called at the top of the loop, returning TRUE to process the loop and FALSE to terminate it
MigrateSourceSQL::$fields protected property List of available source fields.
MigrateSourceSQL::$highwaterSeen protected property Whether, in the current iteration, we have reached the highwater mark.
MigrateSourceSQL::$mapJoinable protected property If the map is a MigrateSQLMap, and the table is compatible with the source query, we can join directly to the map and make things much faster and simpler.
MigrateSourceSQL::$numProcessed protected property Number of eligible rows processed so far (used for itemlimit checking) Overrides MigrateSource::$numProcessed
MigrateSourceSQL::$originalQuery protected property The SQL query objects from which to obtain data, and counts of data
MigrateSourceSQL::$result protected property The result object from executing the query - traversed to process the incoming data.
MigrateSourceSQL::$usingHighwater protected property Whether this source is configured to use a highwater mark, and there is a highwater mark present to use.
MigrateSourceSQL::computeCount public function Return a count of all available source records.
MigrateSourceSQL::fields public function Returns a list of fields available to be mapped from the source query. Overrides MigrateSource::fields
MigrateSourceSQL::getNextRow public function Implementation of MigrateSource::getNextRow().
MigrateSourceSQL::options public static function Return an options array for PDO sources.
MigrateSourceSQL::performRewind public function Implementation of MigrateSource::performRewind().
MigrateSourceSQL::setMapJoinable public function
MigrateSourceSQL::__toString public function Return a string representing the source query.
MigrateSourceView::$viewName protected property
MigrateSourceView::__construct public function Simple initialization. Overrides MigrateSourceSQL::__construct