public function criar(ModeloGenerico $e) { $sql = "INSERT INTO {$e->getTabela()} (nome, codigo) VALUES (:nome, :codigo)"; $statement = $this->_db->prepare($sql); $statement->bindParam(':nome', $e->getNome(), PDO::PARAM_STR, 128); $statement->bindParam(':codigo', $e->getCodigo(), PDO::PARAM_STR, 128); $ret = $statement->execute(); return true; }