NFePHP\NFe\ConvertNFe::zArray2xml PHP Метод

zArray2xml() защищенный Метод

zArray2xml Converte uma Nota Fiscal em um array de txt em um xml
protected zArray2xml ( array $aDados = [] ) : string
$aDados array
Результат string
    protected function zArray2xml($aDados = array())
    {
        foreach ($aDados as $dado) {
            $aCampos = explode("|", $dado);
            array_walk_recursive($aCampos, '\\NFePHP\\NFe\\ConvertNFe::clearFieldString');
            $metodo = strtolower(str_replace(' ', '', $aCampos[0])) . 'Entity';
            if (!method_exists($this, $metodo)) {
                $msg = "O txt tem um metodo não definido!! {$dado}";
                throw new Exception\RuntimeException($msg);
            }
            $this->{$metodo}($aCampos);
        }
    }