You are here

public static function MigrationBase::encryptArguments in Migrate 7.2

Make sure any arguments we want to be encrypted get encrypted.

Parameters

array $arguments:

Return value

array

2 calls to MigrationBase::encryptArguments()
MigrateGroup::register in includes/group.inc
Register a new migration group in the migrate_group table.
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 1343
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

public static function encryptArguments(array $arguments) {
  if (isset($arguments['encrypted_arguments'])) {
    foreach ($arguments['encrypted_arguments'] as $argument_name) {
      if (isset($arguments[$argument_name])) {
        $arguments[$argument_name] = self::encrypt(serialize($arguments[$argument_name]));
      }
    }
  }
  return $arguments;
}