1 | <?php |
||
6 | class DateTimeDeltaToken implements TokenInterface |
||
7 | { |
||
8 | /** @var \DateTime */ |
||
9 | private $value; |
||
10 | /** @var integer */ |
||
11 | private $delta; |
||
12 | |||
13 | public function __construct(\DateTime $value, $delta) |
||
18 | |||
19 | /** |
||
20 | * Calculates token match score for provided argument. |
||
21 | * |
||
22 | * @param $argument |
||
23 | * |
||
24 | * @return bool|int |
||
25 | */ |
||
26 | public function scoreArgument($argument) |
||
34 | |||
35 | /** |
||
36 | * Returns true if this token prevents check of other tokens (is last one). |
||
37 | * |
||
38 | * @return bool|int |
||
39 | */ |
||
40 | public function isLast() |
||
44 | |||
45 | /** |
||
46 | * Returns string representation for token. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function __toString() |
||
54 | } |