-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65a1d73
commit 491ac38
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Effectra\Contracts\Database; | ||
|
||
use PDO; | ||
use PDOStatement; | ||
|
||
interface DBFacadeInterface | ||
{ | ||
public static function getConn(): PDO; | ||
public static function getQuery(): string; | ||
public static function getStatement(): PDOStatement|false; | ||
public static function setConn(PDO $conn); | ||
public static function withQuery($query): self; | ||
public static function withStatement(PDOStatement|false $stmt): self; | ||
public static function query(string $query = ''): string; | ||
public static function run(array|null $params = null): bool; | ||
public static function get(?array $params = null): array; | ||
public static function data(array $data): self; | ||
public static function table(string $name):self; | ||
public static function insert($data):void; | ||
public static function update($data,$conditions = null):void; | ||
public static function getColumns():array|false; | ||
public static function getColumnsField():array|false; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Effectra\Contracts\Database; | ||
|
||
use PDO; | ||
use PDOStatement; | ||
|
||
interface DBInterface | ||
{ | ||
public function __construct(PDO $conn = null); | ||
public function getConn(): PDO; | ||
public function getQuery(): string; | ||
public function getStatement(): PDOStatement|false; | ||
public function setConn(PDO $conn); | ||
public function withQuery($query): self; | ||
public function withStatement(PDOStatement|false $stmt): self; | ||
public function query(string $query = ''): string; | ||
public function run(array|null $params = null): bool; | ||
public function get(?array $params = null): array; | ||
public function data(array $data): self; | ||
public function table(string $name):self; | ||
public function insert($data):void; | ||
public function update($data,$conditions = null):void; | ||
public function getColumns():array|false; | ||
public function getColumnsField():array|false; | ||
|
||
} |