. */ namespace SP\Domain\Config\Ports; use SP\Domain\Common\Ports\Repository; use SP\Domain\Config\Models\Config as ConfigModel; use SP\Domain\Core\Exceptions\ConstraintException; use SP\Domain\Core\Exceptions\QueryException; use SP\Infrastructure\Database\QueryResult; /** * Interface ConfigRepository * * @template T of ConfigModel */ interface ConfigRepository extends Repository { /** * @param ConfigModel $config * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function update(ConfigModel $config): QueryResult; /** * @param ConfigModel $config * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function create(ConfigModel $config): QueryResult; /** * @param string $param * * @return QueryResult * @throws ConstraintException * @throws QueryException */ public function getByParam(string $param): QueryResult; /** * @param string $param * * @return bool * @throws ConstraintException * @throws QueryException */ public function has(string $param): bool; }