. */ namespace SP\Domain\Common\Ports; use Closure; use SP\Infrastructure\Database\QueryResult; /** * Interface RepositoryItemInterface * * @package SP\Domain\Common\Ports */ interface RepositoryInterface { /** * Bubbles a Closure in a database transaction * * @param \Closure $closure * @param object $newThis * * @return mixed * @throws \SP\Domain\Common\Services\ServiceException * @throws \Exception */ public function transactionAware(Closure $closure, object $newThis): mixed; /** * Run a SQL select query to get any data from any table * * @param array $columns * @param string $from * @param string|null $where * @param array|null $bindValues * * @return \SP\Infrastructure\Database\QueryResult */ public function getAny( array $columns, string $from, ?string $where = null, ?array $bindValues = null ): QueryResult; }