1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Cli;
4:
5: use DateTimeImmutable;
6:
7: /**
8: * Command line option value types
9: *
10: * @api
11: */
12: interface CliOptionValueType
13: {
14: /**
15: * A boolean value
16: *
17: * Boolean strings are accepted.
18: */
19: public const BOOLEAN = 0;
20:
21: /**
22: * An integer value
23: *
24: * Integer strings are accepted.
25: */
26: public const INTEGER = 1;
27:
28: /**
29: * A string
30: */
31: public const STRING = 2;
32:
33: /**
34: * A date and/or time
35: *
36: * Strings understood by {@see strtotime()} are accepted and normalised to
37: * {@see DateTimeImmutable} instances.
38: */
39: public const DATE = 3;
40:
41: /**
42: * Path to an existing file or directory
43: */
44: public const PATH = 4;
45:
46: /**
47: * Path to an existing file
48: */
49: public const FILE = 5;
50:
51: /**
52: * Path to an existing directory
53: */
54: public const DIRECTORY = 6;
55:
56: /**
57: * Path to an existing file or directory, or a dash ('-') for standard input
58: * or output
59: */
60: public const PATH_OR_DASH = 7;
61:
62: /**
63: * Path to an existing file, or a dash ('-') for standard input or output
64: */
65: public const FILE_OR_DASH = 8;
66: }
67: