You are here

public function WordPressBlog::machineName in WordPress Migrate 7

Same name and namespace in other branches
  1. 7.2 wordpress.inc \WordPressBlog::machineName()
2 calls to WordPressBlog::machineName()
WordPressBlog::migrations in ./wordpress.inc
WordPressBlog::__construct in ./wordpress.inc

File

./wordpress.inc, line 139
Implementation of migration from WordPress into Drupal

Class

WordPressBlog

Code

public function machineName($class_name) {

  // If the default classes have been overridden, $class_name might be either
  // the default class name, or the name of the overridden class. Check first
  // for the former case, then the latter
  $classes = $this
    ->migrationClasses();
  if (!isset($classes[$class_name])) {
    $flipped = array_flip($classes);
    $class_name = $flipped[$class_name];
  }
  return $this->title . substr($class_name, strlen('WordPress'), strlen($class_name) - strlen('WordPress'));
}