1 | <?php declare(strict_types=1); |
||
13 | class Structure |
||
14 | { |
||
15 | /** array Supported character group types */ |
||
16 | const CG_TYPES = [ |
||
17 | FixedVariableFixedCG::class, |
||
18 | VariableFixedCG::class, |
||
19 | VariableCG::class, |
||
20 | FixedCG::class, |
||
21 | ]; |
||
22 | |||
23 | /** @var AbstractCharacterGroup[] */ |
||
24 | public $groups = []; |
||
25 | |||
26 | /** @var string Input string */ |
||
27 | public $input; |
||
28 | |||
29 | /** |
||
30 | * Create string character group structure from input string. |
||
31 | * |
||
32 | * @param string $input Input string for string character group structure |
||
33 | */ |
||
34 | 14 | public function __construct(string $input) |
|
50 | |||
51 | /** |
||
52 | * Compare structure character groups. |
||
53 | * |
||
54 | * @param Structure $structure Compared string structure group |
||
55 | * |
||
56 | * @return int Comparison result |
||
57 | */ |
||
58 | 13 | public function compare(Structure $structure): int |
|
80 | } |
||
81 |