Пример #1
0
 public function excluirPorId($id)
 {
     $nome_tabela = $this->converterClasseParaTabela();
     $avaliacaoDAO = new AvaliacaoDAO();
     $comentarioDAO = new ComentarioDAO();
     $imagemDAO = new ImagemDAO();
     $videoDAO = new VideoDAO();
     switch ($nome_tabela) {
         case "Eventos":
             $avaliacaoDAO->excluirPorIdEvento($id);
             $comentarioDAO->excluirPorIdEvento($id);
             $imagemDAO->excluirPorIdEvento($id);
             $videoDAO->excluirPorIdEvento($id);
             break;
         case "Estabelecimentos":
             $avaliacaoDAO->excluirPorIdEstabelecimento($id);
             $comentarioDAO->excluirPorIdEstabelecimento($id);
             $imagemDAO->excluirPorIdEstabelecimento($id);
             $videoDAO->excluirPorIdEstabelecimento($id);
             break;
     }
     parent::excluir($id, 'id', $nome_tabela);
 }
Пример #2
0
 public function excluirPorId($id)
 {
     $estabelecimentoDAO = new EstabelecimentoDAO();
     $eventoDAO = new EventoDAO();
     $estabelecimentoDAO->excluirPorIdEstacao($id);
     $eventoDAO->excluirPorIdEstacao($id);
     parent::excluir($id, 'id', 'Estacoes');
 }
Пример #3
0
 public function excluirPorIdEvento($id)
 {
     parent::excluir($id, 'id_evento', $this->converterClasseParaTabela());
 }