NanoFramework 1.4.0
A tiny PHP Framework
ModelInterface.php
Go to the documentation of this file.
1<?php
2
4
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}
Interface that the user can implement in order to create a new Model, based on a real ODBC.
where(string $key, mixed $value)
validate(array $data, string $ruleset, array &$errors=[])