Auth, Login, Home, Venta->Listados->Precios
This commit is contained in:
14
app/common/Define/Connection.php
Normal file
14
app/common/Define/Connection.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Incoviba\Common\Define;
|
||||
|
||||
use PDO;
|
||||
use PDOStatement;
|
||||
|
||||
interface Connection
|
||||
{
|
||||
public function connect(): Connection;
|
||||
public function query(string $query): PDOStatement;
|
||||
public function prepare(string $query): PDOStatement;
|
||||
public function execute(string $query, ?array $data = null): PDOStatement;
|
||||
public function getPDO(): PDO;
|
||||
}
|
8
app/common/Define/Database.php
Normal file
8
app/common/Define/Database.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Common\Define;
|
||||
|
||||
interface Database
|
||||
{
|
||||
public function getDSN(): string;
|
||||
public function needsUser(): bool;
|
||||
}
|
8
app/common/Define/Model.php
Normal file
8
app/common/Define/Model.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Incoviba\Common\Define;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
interface Model extends JsonSerializable
|
||||
{
|
||||
}
|
11
app/common/Define/Repository.php
Normal file
11
app/common/Define/Repository.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Incoviba\Common\Define;
|
||||
|
||||
interface Repository
|
||||
{
|
||||
public function create(?array $data = null): Model;
|
||||
public function save(Model $model): Model;
|
||||
public function load(array $data_row): Model;
|
||||
public function edit(Model $model, array $new_data): Model;
|
||||
public function remove(Model $model): void;
|
||||
}
|
Reference in New Issue
Block a user