OverrideUpdateUseCase.php 946 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php


namespace Source\UseCases\Overrides\OverrideUpdate;

use Source\UseCases\Overrides\OverrideCreate\Presenter;

interface OverrideUpdateUseCase
{
    /**
     * Optional Attributes
     *  - reason: string (reason for override)
     *  - start: string (start of override string must be parsable by DateTime)
     *  - end: string (end of override string must be parsable by DateTime)
     * Throws an exception if the dates are not parsable
     * Will use previous entries values if any attributes are omitted
     *
     * @param string                                              $overrideId
     * @param array                                               $attributes
     * @param \Source\UseCases\Overrides\OverrideCreate\Presenter $presenter
     * @throws \Source\Exceptions\EntityNotFoundException
     * @throws \Exception
     */
    public function update(string $overrideId, array $attributes, Presenter $presenter): void;
}