function coder_upgrade_upgrade_call_drupal_http_request_alter in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_drupal_http_request_alter()
Implements hook_upgrade_call_drupal_http_request_alter().
File
- coder_upgrade/
conversions/ call.inc, line 1094 - Provides conversion routines applied to function calls.
Code
function coder_upgrade_upgrade_call_drupal_http_request_alter(&$node, &$reader) {
// DONE
// Create helper objects.
$editor = PGPEditor::getInstance();
// Get the function call object.
$item =& $node->data;
// Process function call.
$name =& $item->name;
cdp($item->parameters
->print_r());
$count = $item->parameters
->count();
if ($count == 1) {
return;
}
$keys = array(
'headers',
'method',
'data',
'max_redirects',
);
$defaults = array(
'xxx_YYY_zzz',
"'GET'",
'NULL',
3,
);
$string = $editor
->arrayitize($item, 1, $keys, $defaults);
$temp = $editor
->expressionToStatement($string);
$temp
->getElement(0)->multiline = 0;
cdp($temp
->print_r());
$item
->setParameter(1, $temp);
}