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

__construct() public method

Retrieves a fragment of the PO file and parses it.
public __construct ( string $chunk )
$chunk string Translation fragment
    public function __construct(string $chunk)
    {
        $array = explode("\n", $chunk);
        $this->parse($array);
        if (empty($this->msgid)) {
            throw new Exception('Msgid is empty which is not acceptable');
        }
    }