PoStreamReader::close

public 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 168

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.');
  }
}
doc_Drupal
2016-10-29 09:34:43
Comments
Leave a Comment

Please login to continue.