public function criar(Docente $e) { $sql = 'INSERT INTO docente (nome, utilizador_id) VALUES (:nome, :utilizador_id)'; if (!$this->existe($e->utilizador())) { $statement = $this->_db->prepare($sql); $statement->bindParam(':nome', $e->nome(), PDO::PARAM_STR, 128); $statement->bindParam(':utilizador_id', $e->utilizador()->id(), PDO::PARAM_INT); $ret = $statement->execute(); return true; } else { return false; } }