function _drupal_rewrite_settings_is_array_index
Same name and namespace in other branches
- 9 core/includes/install.inc \_drupal_rewrite_settings_is_array_index()
- 8.9.x 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.
Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use SettingsEditor::rewrite() instead. As internal API, _drupal_rewrite_settings_is_array_index() may also be removed in a minor release.
See also
https://www.drupal.org/node/3244583
File
-
core/
includes/ install.inc, line 333
Code
function _drupal_rewrite_settings_is_array_index($type) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use SettingsEditor::rewrite() instead. As internal API, ' . __FUNCTION__ . '() may also be removed in a minor release. See https://www.drupal.org/node/3244583', E_USER_DEPRECATED);
$is_integer = $type == T_LNUMBER;
$is_float = $type == T_DNUMBER;
$is_string = $type == T_CONSTANT_ENCAPSED_STRING;
return $is_integer || $is_float || $is_string;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.