Skip to content

Commit

Permalink
Aplicando interface
Browse files Browse the repository at this point in the history
  • Loading branch information
natan-xav2019 committed Feb 20, 2023
1 parent 92fb2c0 commit 6848b3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
12 changes: 6 additions & 6 deletions class/Connection.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
class Connection {
class Connection implements Crud{

public String $server = "localhost";
public String $user = "root";
public String $password = "";
private String $dbname= "????";
private String $server = "localhost";
private String $user = "root";
private String $password = "";
private String $dbname= "crud";

private $connected;

Expand Down Expand Up @@ -36,7 +36,7 @@ function delete(int $id) {

#função destinada a editar um registro do banco.
function update(int $id, array $request) {

}


Expand Down
18 changes: 18 additions & 0 deletions class/Crud.PHP
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

interface Crud {
#Função destinada para criar um novo registro no banco.
public function create();

#Função destinada a fazer uma busca no banco e apresentar ela
public function read();

#função destinada a eliminar um registro do banco.
public function delete(int $id);

#função destinada a editar um registro do banco.
public function update(int $id, array $request);



}

0 comments on commit 6848b3e

Please sign in to comment.