1: <?php
2: class Horde_Date_Parser_Locale_Base_Timezone
3: {
4: public $scanner = array(
5: '/[PMCE][DS]T/i' => 'tz',
6: );
7:
8: public function scan($tokens)
9: {
10: foreach ($tokens as &$token) {
11: if ($t = $this->scanForAll($token)) {
12: $token->tag('timezone', $t);
13: }
14: }
15: return $tokens;
16: }
17:
18: public function scanForAll($token)
19: {
20: foreach ($this->scanner as $scannerItem => $scannerTag) {
21: if (preg_match($scannerItem, $token->word)) {
22: return $scannerTag;
23: }
24: }
25: }
26:
27: }
28: