public function Registrar(Tarea $data) { try { $sql = "INSERT INTO tb_tarea (nvchtarea,vchmaterial,nvchdescripciontarea) \n\t\t VALUES (?, ?, ?)"; $this->pdo->prepare($sql)->execute(array($data->__GET('nvchtarea'), $data->__GET('vchmaterial'), $data->__GET('nvchdescripciontarea'))); } catch (Exception $e) { die($e->getMessage()); } }