1 | <?php |
||
23 | class ParameterConsumer extends GenericConsumer |
||
24 | { |
||
25 | /** |
||
26 | * Returns semi-colon and equals char as token separators. |
||
27 | * |
||
28 | * @return string[] |
||
29 | */ |
||
30 | protected function getTokenSeparators() |
||
34 | |||
35 | /** |
||
36 | * Creates and returns a \ZBateson\MailMimeParser\Header\Part\Token out of |
||
37 | * the passed string token and returns it, unless the token is an escaped |
||
38 | * literal, in which case a LiteralPart is returned. |
||
39 | * |
||
40 | * @param string $token |
||
41 | * @param bool $isLiteral |
||
42 | * @return \ZBateson\MailMimeParser\Header\Part\HeaderPart |
||
43 | */ |
||
44 | protected function getPartForToken($token, $isLiteral) |
||
51 | |||
52 | /** |
||
53 | * Instanciates and returns either a MimeLiteralPart if $strName is empty, |
||
54 | * or a ParameterPart otherwise. |
||
55 | * |
||
56 | * @param string $strName |
||
57 | * @param string $strValue |
||
58 | * @return \ZBateson\MailMimeParser\Header\Part\MimeLiteralPart| |
||
59 | * \ZBateson\MailMimeParser\Header\Part\ParameterPart |
||
60 | */ |
||
61 | private function getPartFor($strName, $strValue) |
||
68 | |||
69 | /** |
||
70 | * Handles parameter separator tokens during final processing. |
||
71 | * |
||
72 | * If the end token is found, a new HeaderPart is assigned to the passed |
||
73 | * $combined array. If an '=' character is found, $strCat is assigned to |
||
74 | * $strName and emptied. |
||
75 | * |
||
76 | * Returns true if the token was processed, and false otherwise. |
||
77 | * |
||
78 | * @param string $tokenValue |
||
79 | * @param array $combined |
||
80 | * @param string $strName |
||
81 | * @param string $strCat |
||
82 | * @return boolean |
||
83 | */ |
||
84 | private function processTokenPart($tokenValue, array &$combined, &$strName, &$strCat) |
||
98 | |||
99 | /** |
||
100 | * Post processing involves creating Part\LiteralPart or Part\ParameterPart |
||
101 | * objects out of created Token and LiteralParts. |
||
102 | * |
||
103 | * @param \ZBateson\MailMimeParser\Header\Part\HeaderPart[] $parts |
||
104 | * @return \ZBateson\MailMimeParser\Header\Part\HeaderPart[]|array |
||
105 | */ |
||
106 | protected function processParts(array $parts) |
||
121 | } |
||
122 |