You are here

function _drupal_rewrite_settings_is_array_index in Drupal 10

Same name and namespace in other branches
  1. 8 core/includes/install.inc \_drupal_rewrite_settings_is_array_index()
  2. 9 core/includes/install.inc \_drupal_rewrite_settings_is_array_index()

Helper for drupal_rewrite_settings().

Checks whether this token represents a valid array index: a number or a string.

Parameters

int $type: The token type.

Return value

bool TRUE if this token represents a number or a string.

See also

token_name()

1 call to _drupal_rewrite_settings_is_array_index()
drupal_rewrite_settings in core/includes/install.inc
Replaces values in settings.php with values in the submitted array.

File

core/includes/install.inc, line 444
API functions for installing modules and themes.

Code

function _drupal_rewrite_settings_is_array_index($type) {
  $is_integer = $type == T_LNUMBER;
  $is_float = $type == T_DNUMBER;
  $is_string = $type == T_CONSTANT_ENCAPSED_STRING;
  return $is_integer || $is_float || $is_string;
}