1 | <?php |
||
5 | final class Method |
||
6 | { |
||
7 | const COPY = 'copy'; |
||
8 | const DOWNLOAD = 'download'; |
||
9 | const MOVE = 'move'; |
||
10 | const POSSIBLE_VALUES = [ |
||
11 | self::COPY, |
||
12 | self::DOWNLOAD, |
||
13 | self::MOVE |
||
14 | ]; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $method; |
||
18 | |||
19 | private function __construct(string $method) |
||
29 | |||
30 | public static function fromString(string $method): Method |
||
34 | |||
35 | public function __toString(): string |
||
39 | |||
40 | public function equals(Method $method): bool |
||
44 | |||
45 | public static function copy(): Method |
||
49 | |||
50 | public function isCopy(): bool |
||
54 | |||
55 | public static function move(): Method |
||
59 | |||
60 | public function isMove(): bool |
||
64 | |||
65 | public static function download(): Method |
||
69 | |||
70 | public function isDownload(): bool |
||
74 | |||
75 | public function getMethod(): string |
||
79 | } |
||
80 |