summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Component/Gettext/PoMetadataInterface.php
blob: f5bb3db0c75e13c40d0c44c9d3b187da432627e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php

/**
 * @file
 * Definition of Drupal\Component\Gettext\PoMetadataInterface.
 */

namespace Drupal\Component\Gettext;

use Drupal\Component\Gettext\PoHeader;

/**
 * Methods required for both reader and writer implementations.
 *
 * @see Drupal\Component\Gettext\PoReaderInterface
 * @see Drupal\Component\Gettext\PoWriterInterface
 */
interface PoMetadataInterface {

  /**
   * Set language code.
   *
   * @param string $langcode
   *   Language code string.
   */
  function setLangcode($langcode);

  /**
   * Get language code.
   *
   * @return string
   *   Language code string.
   */
  function getLangcode();

  /**
   * Set header metadata.
   *
   * @param Drupal\Component\Gettext\PoHeader $header
   *   Header object representing metadata in a PO header.
   */
  function setHeader(PoHeader $header);

  /**
   * Get header metadata.
   *
   * @return Drupal\Component\Gettext\PoHeader $header
   *   Header instance representing metadata in a PO header.
   */
  function getHeader();
}