. */ namespace SP\Domain\Config\Ports; use SP\Domain\Common\Services\ServiceException; use SP\Domain\Config\Dtos\ConfigRequest; use SP\Domain\Config\Models\Config; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\QueryException; use SP\Infrastructure\Common\Repositories\NoSuchItemException; /** * Interface ConfigService */ interface ConfigService { /** * @throws NoSuchItemException * @throws ServiceException */ public function getByParam(string $param, $default = null): ?string; /** * @throws ConstraintException * @throws QueryException */ public function create(Config $config): int; /** * @throws ServiceException */ public function saveBatch(ConfigRequest $configRequest): void; /** * @throws ConstraintException * @throws QueryException */ public function save(string $param, string $value): bool; }