writeHeader example

public function setLangcode($langcode) {
    $this->langcode = $langcode;
  }

  /** * {@inheritdoc} */
  public function open() {
    // Open in write mode. Will overwrite the stream if it already exists.     $this->fd = fopen($this->getURI(), 'w');
    // Write the header at the start.     $this->writeHeader();
  }

  /** * Implements Drupal\Component\Gettext\PoStreamInterface::close(). * * @throws \Exception * If the stream is not open. */
  public function close() {
    if ($this->fd) {
      fclose($this->fd);
    }
Home | Imprint | This part of the site doesn't use cookies.