Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Aug 27, 2024
1 parent fad7c88 commit 48a8c9b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Interfaces/Options/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,52 @@
namespace Cone\Root\Interfaces\Options;

use Illuminate\Contracts\Database\Eloquent\Builder;
use Illuminate\Support\Collection;

interface Repository
{
/**
* Get the option query.
*/
public function query(): Builder;

/**
* Get the option.
*/
public function get(string $key, mixed $default = null, bool $refresh = false): mixed;

/**
* Get the options.
*/
public function getMany(array $keys, array $defaults = [], bool $refresh = false): Collection;

/**
* Set the option.
*/
public function set(string $key, mixed $value): void;

/**
* Set the options.
*/
public function setMany(array $values): void;

/**
* Delete the option.
*/
public function delete(string $key): void;

/**
* Delete the options.
*/
public function deleteMany(array $keys): void;

/**
* Set the cast to the given key.
*/
public function cast(string $key, string $cast): static;

/**
* Resolve the cast for the given key.
*/
public function resolveCast(string $key): string;
}

0 comments on commit 48a8c9b

Please sign in to comment.