1 | <?php |
||
23 | final class FluentPattern implements Pattern |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | const DELIMITER_SLASH = "/"; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $subject; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $pattern; |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function __toString() |
||
48 | |||
49 | /** |
||
50 | * @return \Relax\Greppy\Pattern |
||
51 | */ |
||
52 | public function any() |
||
57 | |||
58 | /** |
||
59 | * @return \Relax\Greppy\Pattern |
||
60 | */ |
||
61 | public function digit() |
||
66 | |||
67 | /** |
||
68 | * @return \Relax\Greppy\Pattern |
||
69 | */ |
||
70 | public function literal() |
||
84 | |||
85 | /** |
||
86 | * @param int|string $from |
||
87 | * @param int|string $to |
||
88 | * @return \Relax\Greppy\Pattern |
||
89 | */ |
||
90 | public function range($from, $to) |
||
95 | |||
96 | /** |
||
97 | * @param string $character |
||
98 | * @param int $min |
||
99 | * @param int $max |
||
100 | * @return \Relax\Greppy\Pattern |
||
101 | */ |
||
102 | public function repetition($character, $min, $max = null) |
||
112 | } |
||
113 |