EntriesRepository.php 680 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
<?php


namespace Source\Gateways\Entries;

use Carbon\Carbon;
use Source\Entities\Entry;

interface EntriesRepository
{
    /**
Jacob Priddy's avatar
Jacob Priddy committed
12
13
     * Records an entry
     *
14
     * @param \Source\Entities\Entry $entry
15
     * @return \Source\Entities\Entry|null
16
     */
17
    public function add(Entry $entry): ?Entry;
18
19

    /**
Jacob Priddy's avatar
Jacob Priddy committed
20
21
22
     * @param \Carbon\Carbon|null $begin
     * @param \Carbon\Carbon|null $end
     * @param string|null         $userId
23
     * @param string|null         $doorLocation
Jacob Priddy's avatar
Jacob Priddy committed
24
     * @return array
Jacob Priddy's avatar
Jacob Priddy committed
25
     */
Jacob Priddy's avatar
Jacob Priddy committed
26
27
28
29
    public function get(
        ?Carbon $begin = null,
        ?Carbon $end = null,
        ?string $userId = null,
30
        ?string $doorLocation = null
Jacob Priddy's avatar
Jacob Priddy committed
31
    ): array;
32
}