Download src/Stat/Domain/Repositories/StatRepositoryInterface.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Stat/Domain/Repositories/StatRepositoryInterface.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Stat/Domain/Repositories/StatRepositoryInterface.php
-
curl -L -o StatRepositoryInterface.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Stat/Domain/Repositories/StatRepositoryInterface.php
1.63 kB
| declare(strict_types=1); | |
| namespace Stat\Domain\Repositories; | |
| use DateTimeInterface; | |
| use Shared\Domain\Repositories\RepositoryInterface; | |
| use Stat\Domain\Entities\AbstractStatEntity; | |
| use Stat\Domain\ValueObjects\DatasetCategory; | |
| use Stat\Domain\ValueObjects\StatType; | |
| use Traversable; | |
| interface StatRepositoryInterface extends RepositoryInterface | |
| { | |
| /** | |
| * Add a stat entity to the repository. | |
| * | |
| * @param AbstractStatEntity $stat | |
| * @return static | |
| */ | |
| public function add(AbstractStatEntity $stat): static; | |
| /** | |
| * Filter the stat entity by type. | |
| * | |
| * @param StatType $type | |
| * @return static | |
| */ | |
| public function filterByType(StatType $type): static; | |
| /** | |
| * Filter the stat entity by year. | |
| * | |
| * @param DateTimeInterface $date | |
| * @return static | |
| */ | |
| public function filterByYear(DateTimeInterface $date): static; | |
| /** | |
| * Filter the stat entity by month. | |
| * | |
| * @param DateTimeInterface $date | |
| * @return static | |
| */ | |
| public function filterByMonth(DateTimeInterface $date): static; | |
| /** | |
| * Filter the stat entity by day. | |
| * | |
| * @param DateTimeInterface $date | |
| * @return static | |
| */ | |
| public function filterByDay(DateTimeInterface $date): static; | |
| /** | |
| * Get the total of the stat entity. | |
| * | |
| * @return int | |
| */ | |
| public function stat(): int; | |
| /** | |
| * Get the dataset for the stat entity. | |
| * | |
| * @return Traversable<array{category:string,value:int}> | |
| */ | |
| public function getDataset(DatasetCategory $type = DatasetCategory::DATE): Traversable; | |
| } | |