Attainly/backend/app/Element/ElementRepository.php
2026-08-08 23:37:52 +03:00

31 lines
569 B
PHP

<?php
namespace App\Element;
use App\Set\Set;
use DomainException;
interface ElementRepository
{
/**
* @throws DomainException
*/
public function create(CreateElementDto $dto): Element;
public function find(int $id): ?Element;
/**
* @return list<Element>
*/
public function findBySet(Set $set): array;
/**
* @return list<Element>
*/
public function findTopLevelBySet(Set $set): array;
/**
* @return list<Element>
*/
public function findByParentElement(Element $parentElement): array;
}