public function Language::extend

Extend $this with properties from the given object.

@todo Remove this function once $GLOBALS['language'] is gone.

File

drupal/core/lib/Drupal/Core/Language/Language.php, line 143
Definition of Drupal\Core\Language\Language.

Class

Language
An object containing the information for an interface language.

Namespace

Drupal\Core\Language

Code

public function extend($obj) {
  $vars = get_object_vars($obj);
  foreach ($vars as $var => $value) {
    $this->{$var} = $value;
  }
}