soko-web/src/Interfaces/PersistentData/IPersistentDataManager.php
Pőcze Bence 4fe463fcc5
All checks were successful
soko-web/pipeline/pr-master This commit looks good
do not use app container in classes
2023-04-19 23:26:24 +02:00

21 lines
709 B
PHP

<?php namespace SokoWeb\Interfaces\PersistentData;
use Generator;
use SokoWeb\Database\Query\Select;
use SokoWeb\PersistentData\Model\Model;
interface IPersistentDataManager
{
public function selectFromDb(Select $select, string $type, bool $useRelations = false, array $withRelations = []);
public function selectMultipleFromDb(Select $select, string $type, bool $useRelations = false, array $withRelations = []): Generator;
public function selectFromDbById($id, string $type, bool $useRelations = false);
public function loadRelationsFromDb(Model $model, bool $recursive): void;
public function saveToDb(Model $model): void;
public function deleteFromDb(Model $model): void;
}