protected static function MigrationBase::machineFromClass in Migrate 6.2
Same name and namespace in other branches
- 7.2 includes/base.inc \MigrationBase::machineFromClass()
2 calls to MigrationBase::machineFromClass()
- MigrationBase::generateMachineName in includes/base.inc
- By default, the migration machine name is the class name (with the
Migration suffix, if present, stripped).
- MigrationBase::registerMigration in includes/base.inc
- Register a new migration process in the migrate_status table. This will
generally be used in two contexts - by the class detection code for
static (one instance per class) migrations, and by the module implementing
dynamic (parameterized class)…
File
- includes/base.inc, line 410
- Defines the base class for migration processes.
Class
- MigrationBase
- The base class for all objects representing distinct steps in a migration
process. Most commonly these will be Migration objects which actually import
data from a source into a Drupal destination, but by deriving classes directly
from MigrationBase…
Code
protected static function machineFromClass($class_name) {
if (preg_match('/Migration$/', $class_name)) {
$machine_name = substr($class_name, 0, strlen($class_name) - strlen('Migration'));
}
else {
$machine_name = $class_name;
}
return $machine_name;
}