function __construct(Cliente $cliente = null) { parent::__construct(); $this->tabela = 'cliente'; if ($cliente == NULL) { $this->cliente = new Cliente(); } else { $this->cliente = $cliente; } }
function emailExist($where) { $colunas = array('email'); $bWhere = array('email' => $where); $pessoaDao = new PessoaDao('pessoa', new Pessoa()); $resultado = $pessoaDao->listar($colunas, $bWhere); if ($resultado[0]['email']) { return true; } return false; }