You are here

public function PoStreamReader::close in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Component/Gettext/PoStreamReader.php \Drupal\Component\Gettext\PoStreamReader::close()

Implements Drupal\Component\Gettext\PoStreamInterface::close().

Throws

Exception If the stream is not open.

Overrides PoStreamInterface::close

File

core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 173
Contains \Drupal\Component\Gettext\PoStreamReader.

Class

PoStreamReader
Implements Gettext PO stream reader.

Namespace

Drupal\Component\Gettext

Code

public function close() {
  if ($this->_fd) {
    fclose($this->_fd);
  }
  else {
    throw new \Exception('Cannot close stream that is not open.');
  }
}