public function StringBase::setValues

Implements Drupal\locale\StringInterface::setValues().

Overrides StringInterface::setValues

1 call to StringBase::setValues()
StringBase::__construct in drupal/core/modules/locale/lib/Drupal/locale/StringBase.php
Constructs a new locale string object.

File

drupal/core/modules/locale/lib/Drupal/locale/StringBase.php, line 132
Definition of Drupal\locale\StringBase.

Class

StringBase
Defines the locale string base class.

Namespace

Drupal\locale

Code

public function setValues(array $values, $override = TRUE) {
  foreach ($values as $key => $value) {
    if (property_exists($this, $key) && ($override || !isset($this->{$key}))) {
      $this->{$key} = $value;
    }
  }
  return $this;
}