destructr/src/DSOFactoryInterface.php

22 lines
930 B
PHP
Raw Normal View History

2018-08-17 17:32:10 +00:00
<?php
2018-08-17 22:32:26 +00:00
/* Destructr | https://gitlab.com/byjoby/destructr | MIT License */
namespace Destructr;
2018-08-17 17:32:10 +00:00
interface DSOFactoryInterface
{
public function __construct(Drivers\DSODriverInterface &$driver, string $table);
public function class(array $data) : ?string;
public function createTable() : bool;
public function create(array $data = array()) : DSOInterface;
public function read(string $value, string $field = 'dso.id', $deleted = false) : ?DSOInterface;
public function insert(DSOInterface &$dso) : bool;
public function update(DSOInterface &$dso, bool $sneaky = false) : bool;
2018-08-17 17:32:10 +00:00
public function delete(DSOInterface &$dso, bool $permanent = false) : bool;
public function search() : Search;
public function executeSearch(Search $search, array $params = array(), $deleted = false) : array;
2019-10-17 15:35:31 +00:00
public function executeCount(Search $search, array $params = array(), $deleted = false) : ?int;
2018-08-17 17:32:10 +00:00
}