You are here

class MigrateSimpleContentParser in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/sources/files.inc \MigrateSimpleContentParser

Simple parser that doesn't actually parse anything - it just returns the whole file as a single chunk. This is the default parser used and is primarily for when your HTML files map one-to-one to nodes.

Hierarchy

Expanded class hierarchy of MigrateSimpleContentParser

File

plugins/sources/files.inc, line 98
Support for migration from files sources.

View source
class MigrateSimpleContentParser extends MigrateContentParser {
  public function getChunkIDs() {
    return array(
      '1',
    );
  }
  public function getChunk($id) {
    return $this->content;
  }
  public function getChunkCount() {
    return 1;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateContentParser::$alwaysUseChunkIDs public property Tells the MigrateListFiles implementation to always use chunk IDs when constructing item IDs.
MigrateContentParser::$content protected property The content of the current file to parse.
MigrateContentParser::$item_id protected property The ID of the current file being parsed.
MigrateContentParser::setContent public function Set the content and file ID for the current file to parse.
MigrateSimpleContentParser::getChunk public function Get a single chunk from the current file. Overrides MigrateContentParser::getChunk
MigrateSimpleContentParser::getChunkCount public function Return the count of chunks in the current file. Overrides MigrateContentParser::getChunkCount
MigrateSimpleContentParser::getChunkIDs public function Return the list of IDs for all the chunks found in the current file. Overrides MigrateContentParser::getChunkIDs