LdapTools\Utilities\MBString::array_change_key_case PHP Метод

array_change_key_case() публичный статический Метод

Change the keys in an array to their lower-case values.
public static array_change_key_case ( array $values ) : array
$values array
Результат array
    public static function array_change_key_case(array $values)
    {
        if (self::isMbstringLoaded()) {
            $newValues = [];
            foreach ($values as $key => $value) {
                $newValues[self::strtolower($key)] = $value;
            }
            return $newValues;
        } else {
            return array_change_key_case($values);
        }
    }

Usage Example

Пример #1
0
 /**
  * Make sure that the current attribute has actually been defined.
  *
  * @throws AttributeConverterException
  */
 protected function validateCurrentAttribute()
 {
     if (!array_key_exists(MBString::strtolower($this->getAttribute()), MBString::array_change_key_case($this->getOptions()))) {
         throw new AttributeConverterException(sprintf('Attribute "%s" must be defined in the converter options.', $this->getAttribute()));
     }
 }
All Usage Examples Of LdapTools\Utilities\MBString::array_change_key_case