ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Gateway.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
25 interface Gateway
26 {
30  public function create(GenericData $data): int;
31 
37  public function createFromScratch(GenericData $data): int;
38 
44  public function createWithNewPosition(GenericData $data): int;
45 
46  public function readByID(int $field_id): ?GenericData;
47 
51  public function readByIDs(int ...$field_ids): \Generator;
52 
56  public function readByRecords(bool $only_searchable, int ...$record_ids): \Generator;
57 
58  public function readByImportID(string $import_id): ?GenericData;
59 
60  public function update(GenericData $data): void;
61 
62  public function delete(int ...$field_ids): void;
63 }
create(GenericData $data)
Returns the field ID of the created data.
readByRecords(bool $only_searchable, int ... $record_ids)
createWithNewPosition(GenericData $data)
Inserts the data, but replaces position by the next position in the record.
createFromScratch(GenericData $data)
Inserts the data, but replaces position and import ID: next position in the record, and a newly generated import ID is used.