Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PoStreamReader.php

function 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.');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal