Jyxo\Gettext\Parser\Header::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $items )
$items string PO file header
    public function __construct(string $items)
    {
        $items = explode("\n", $items);
        foreach ($items as $item) {
            $item = trim($item, '"');
            $array = explode(': ', $item);
            if (!empty($array[0])) {
                if (!empty($array[1])) {
                    $this->{$array[0]} = $array[1];
                }
            }
        }
    }