class MigrateSimpleContentParser in Migrate 7.2
Same name and namespace in other branches
- 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
- class \MigrateContentParser
- class \MigrateSimpleContentParser
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateContentParser:: |
public | property | Tells the MigrateListFiles implementation to always use chunk IDs when constructing item IDs. | |
MigrateContentParser:: |
protected | property | The content of the current file to parse. | |
MigrateContentParser:: |
protected | property | The ID of the current file being parsed. | |
MigrateContentParser:: |
public | function | Set the content and file ID for the current file to parse. | |
MigrateSimpleContentParser:: |
public | function |
Get a single chunk from the current file. Overrides MigrateContentParser:: |
|
MigrateSimpleContentParser:: |
public | function |
Return the count of chunks in the current file. Overrides MigrateContentParser:: |
|
MigrateSimpleContentParser:: |
public | function |
Return the list of IDs for all the chunks found in the current file. Overrides MigrateContentParser:: |