| Conditions | 3 |
| Paths | 3 |
| Total Lines | 25 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | protected function _process() : void |
||
| 12 | { |
||
| 13 | // split the string by the delimiters: this gives an |
||
| 14 | // array with tokenIDs, and any content that may be left |
||
| 15 | // over that could not be tokenized. |
||
| 16 | $parts = ConvertHelper::explodeTrim($this->delimiter, $this->tokenized); |
||
| 17 | $tokens = array(); |
||
| 18 | |||
| 19 | foreach($parts as $part) |
||
| 20 | { |
||
| 21 | $token = $this->getTokenByID($part); |
||
| 22 | |||
| 23 | // if the entry is a token, simply add it. |
||
| 24 | if($token) |
||
| 25 | { |
||
| 26 | $tokens[] = $token; |
||
| 27 | } |
||
| 28 | // anything else is added as an unknown token. |
||
| 29 | else |
||
| 30 | { |
||
| 31 | $tokens[] = $this->createToken('Unknown', $part); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | $this->tokensTemporary = $tokens; |
||
| 36 | } |
||
| 38 |