You are here

function coder_upgrade_do_conversions in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/includes/main.inc \coder_upgrade_do_conversions()

Loops on from and to arrays, converting the text of the subject string.

Parameters

string $from: The pattern to search for.

string $to: The string to replace the pattern with.

string $subject: The string to search and replace.

8 calls to coder_upgrade_do_conversions()
coder_upgrade_convert_regex_simple_changes in coder_upgrade/conversions/other.inc
Upgrades text using simple regular expressions.
coder_upgrade_upgrade_regex_alter in coder_upgrade/conversions/regex.inc
Implements hook_upgrade_regex_alter().
coder_upgrade_upgrade_regex_info_alter in coder_upgrade/conversions/regex.inc
Implements hook_upgrade_regex_info_alter().
hook_upgrade_regex_alter in coder_upgrade/coder_upgrade.api.php
Alters the text of a code file using regular expressions.
hook_upgrade_regex_info_alter in coder_upgrade/coder_upgrade.api.php
Alters the text of an info file using regular expressions.

... See full list

File

coder_upgrade/includes/main.inc, line 659
Manages application of conversion routines, logging, and patch file creation.

Code

function coder_upgrade_do_conversions($from, $to, &$subject) {
  for ($i = 0; $i < count($from); $i++) {
    $subject = preg_replace($from[$i], $to[$i], $subject);
  }
}