/**
  * Método inicial do controle
  */
 function inicial()
 {
     try {
         if (!arquivo::gravavel($this->caminhoDefinicao)) {
             $this->registrarComunicacao('Arquivo ');
         }
         $this->passarProximoControle($_POST['sistema']['paginaInicial']);
         $this->montarArquivoDefinicaoXML();
     } catch (erro $e) {
         $this->passarProximoControle('CUtilitario_geradorDefinirSistema');
         throw $e;
     }
 }
 /**
  * Método inicial do controle
  */
 function inicial()
 {
     $this->entidade = $_GET;
     $arNome = explode(' ', strtolower($this->entidade['entidade']));
     $nome = array_shift($arNome);
     $arNome = array_map("ucFirst", $arNome);
     array_unshift($arNome, $nome);
     $this->nomeEntidade = implode('', $arNome);
     $this->nomeNegocio = "N{$this->nomeEntidade}";
     $xml = array();
     if (arquivo::legivel("{$this->nomeEntidade}/xml/entidade.xml")) {
         $xml['entidade'] = simplexml_load_file("{$this->nomeEntidade}/xml/entidade.xml");
     }
     if (arquivo::legivel("{$this->nomeEntidade}/xml/pt_BR.xml")) {
         $xml['inter'] = simplexml_load_file("{$this->nomeEntidade}/xml/pt_BR.xml");
     }
     $j = new json();
     echo $j->pegarJson($xml);
 }