public function LocaleTranslation::destruct

Performs destruct operations.

Overrides DestructableInterface::destruct

File

drupal/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php, line 77
Contains \Drupal\Core\Language\LocaleTranslation.

Class

LocaleTranslation
String translator using the locale module.

Namespace

Drupal\locale

Code

public function destruct() {

  // @see \Drupal\locale\Locale\Lookup::__destruct().
  // @todo Remove once http://drupal.org/node/1786490 is in.
  foreach ($this->translations as $context) {
    foreach ($context as $lookup) {
      if ($lookup instanceof DestructableInterface) {
        $lookup
          ->destruct();
      }
    }
  }
}