NanoFramework
1.6.1
A tiny PHP Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
ModelInterface.php
Go to the documentation of this file.
1
<?php
2
3
namespace
SteeveDroz\NanoFramework;
4
10
interface
ModelInterface
11
{
17
public
function
findAll
(): array;
18
26
public
function
find
(
int
$id): ?array;
27
33
public
function
insert
(array $data): void;
34
41
public
function
update
(
int
$id, array $data): void;
42
48
public
function
delete
(
int
$id): void;
49
58
public
function
where
(
string
$key, mixed $value):
ModelInterface
;
59
65
public
function
getLastInsertedId
(): int;
66
95
public
function
validate
(array $data,
string
$ruleset, array &$errors = []): bool;
96
}
SteeveDroz\NanoFramework\ModelInterface
Interface that the user can implement in order to create a new Model, based on a real ODBC.
Definition
ModelInterface.php:11
SteeveDroz\NanoFramework\ModelInterface\find
find(int $id)
SteeveDroz\NanoFramework\ModelInterface\findAll
findAll()
SteeveDroz\NanoFramework\ModelInterface\insert
insert(array $data)
SteeveDroz\NanoFramework\ModelInterface\where
where(string $key, mixed $value)
SteeveDroz\NanoFramework\ModelInterface\update
update(int $id, array $data)
SteeveDroz\NanoFramework\ModelInterface\getLastInsertedId
getLastInsertedId()
SteeveDroz\NanoFramework\ModelInterface\validate
validate(array $data, string $ruleset, array &$errors=[])
Generated by
1.17.0