function PoStreamWriter::getURI

Same name in other branches
  1. 9 core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::getURI()
  2. 8.9.x core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::getURI()
  3. 11.x core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::getURI()

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

Throws

\Exception If the URI is not set.

Overrides PoStreamInterface::getURI

1 call to PoStreamWriter::getURI()
PoStreamWriter::open in core/lib/Drupal/Component/Gettext/PoStreamWriter.php
Open the stream. Set the URI for the stream earlier with setURI().

File

core/lib/Drupal/Component/Gettext/PoStreamWriter.php, line 150

Class

PoStreamWriter
Defines a Gettext PO stream writer.

Namespace

Drupal\Component\Gettext

Code

public function getURI() {
    if (empty($this->uri)) {
        throw new \Exception('No URI set.');
    }
    return $this->uri;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.