/**
  * @param string|json $Json passe o json com todas as informações da url
  */
 public function __construct($Espacialidade, $Filtros = null)
 {
     $this->espacialidade = $Espacialidade;
     $this->filtros = $Filtros;
     $this->indicadores;
     parent::__construct();
     $this->objPublicMethods = new PublicMethods($this);
 }
 public function __construct($municipio)
 {
     parent::__construct();
     if ($municipio == null || $municipio == "") {
     }
     $divisao = explode('_', $this->retira_acentos($municipio));
     $this->nomeCru = $divisao[0];
     $stringTratada = cidade_anti_sql_injection(str_replace('-', ' ', $divisao[0]));
     $this->UrlNome = $stringTratada;
     if (sizeof($divisao) > 1) {
         $this->ufCru = $divisao[1];
         $stringUfTratada = cidade_anti_sql_injection(str_replace('-', ' ', $divisao[1]));
         $this->UrlUf = $stringUfTratada;
     }
     $this->read();
 }
 public function __construct($municipio, $perfilType = null)
 {
     parent::__construct();
     //        if ($municipio == null || $municipio == "") {
     //
     //        }
     $gets = explode("/", $_SERVER['REQUEST_URI']);
     if ($perfilType != null) {
         $this->perfilType = $perfilType;
     } else {
         $this->perfilType = @$gets[3];
     }
     $divisao = explode('_', $this->retira_acentos($municipio));
     $this->nomeCru = $divisao[0];
     //$stringTratada = cidade_anti_sql_injection(str_replace('-', ' ', $divisao[0]));
     $stringTratada = str_replace('-', ' ', $divisao[0]);
     $this->UrlNome = $stringTratada;
     if (sizeof($divisao) > 1) {
         $this->ufCru = $divisao[1];
         //$stringUfTratada = cidade_anti_sql_injection(str_replace('-', ' ', $divisao[1]));
         $stringUfTratada = str_replace('-', ' ', $divisao[1]);
         $this->UrlUf = $stringUfTratada;
     }
     if (is_numeric($divisao[0])) {
         $this->UrlCod = $divisao[0];
     } else {
         $this->UrlCod = 0;
     }
     if (@$gets[3] == "perfil_m" || $perfilType == "perfil_m") {
         $this->read();
     } else {
         if (@$gets[3] == "perfil_rm" || $perfilType == "perfil_rm") {
             $this->readRM();
         } else {
             if (@$gets[3] == "perfil_uf" || $perfilType == "perfil_uf") {
                 $this->readUF();
             } else {
                 if (@$gets[3] == "perfil_udh" || $perfilType == "perfil_udh") {
                     $this->readUDH();
                 }
             }
         }
     }
     //        else if (@$gets[3] == "perfil_rm" || $perfilType == "perfil_rm" || @$gets[3] == "perfil_udh" || $perfilType == "perfil_udh" )
     //            echo "<script type='text/javascript'>alert('Este perfil ainda não se encontra disponível!');</script>";
 }
 /**
  * 
  * Classe para manipular a tabela.
  * @param UrlController $iConsulta Aqui você passa o objeto UrlController
  * @param int $iLimiteExibicao Quantidade de cidades que podem ser exibidas 
  * ao mesmo tempo
  * @param int $iPaginaAtual página atual para pesquisa
  * @param string $iOrderBy Ordenação da tabela
  */
 public function __construct($iConsulta, $arrayAreas, $atpagina, $atord, $iLimiteExibicao, $_varOnly, $isSearchName)
 {
     try {
         $iPaginaAtuall = 300;
         $iEsp = 1;
         //die(var_dump($iConsulta));
         parent::__construct();
         $this->varOnly = $_varOnly;
         $this->consulta = $iConsulta;
         $this->LimiteExibicao = $iLimiteExibicao;
         $this->PaginaAtual = $iPaginaAtuall;
         $this->isSearchName = $isSearchName;
         $this->Esp = $iEsp;
         //$IntLimit = $this->LimiteExibicao;
         $this->Count = 0;
         $sqlSecundaria = $this->getSQLSecundarioCC($arrayAreas, $atpagina, $atord);
         $this->getSQLResultsSecundarioCC($this->results, $sqlSecundaria);
     } catch (Exception $e) {
         die("erro :-)");
     }
 }