1 | <?php |
||
18 | class QuotedStringConsumer extends GenericConsumer |
||
19 | { |
||
20 | /** |
||
21 | * QuotedStringConsumer doesn't have any sub-consumers. This method returns |
||
22 | * an empty array. |
||
23 | * |
||
24 | * @return array |
||
25 | */ |
||
26 | 1 | public function getSubConsumers() |
|
30 | |||
31 | /** |
||
32 | * Returns true if the token is a double quote. |
||
33 | * |
||
34 | * @param string $token |
||
35 | * @return bool |
||
36 | */ |
||
37 | 1 | protected function isStartToken($token) |
|
41 | |||
42 | /** |
||
43 | * Returns true if the token is a double quote. |
||
44 | * |
||
45 | * @param type $token |
||
46 | * @return type |
||
47 | */ |
||
48 | 2 | protected function isEndToken($token) |
|
49 | { |
||
50 | 2 | return ($token === '"'); |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * Returns a single regex pattern for a double quote. |
||
55 | * |
||
56 | * @return string[] |
||
57 | */ |
||
58 | 1 | protected function getTokenSeparators() |
|
62 | |||
63 | /** |
||
64 | * Constructs a Part\LiteralPart and returns it. |
||
65 | * |
||
66 | * @param string $token |
||
67 | * @param bool $isLiteral not used - everything in a quoted string is a |
||
68 | * literal |
||
69 | * @return \ZBateson\MailMimeParser\Header\Part\LiteralPart |
||
70 | */ |
||
71 | 1 | protected function getPartForToken($token, $isLiteral) |
|
75 | } |
||
76 |