/** * getHookTagList * * @return void */ public static function getHookTagList() { static $regex = '/([\\S]+)\\s*?([^=]*)?=?([\\S]*)?/'; $hook_tag = FeedProcessorHelper::getHookTag(); $whitemode = strpos($hook_tag, '+') === 0 ? 1 : 0; if ($whitemode) { $hook_tag = self::str_replace_first('+', '', $hook_tag); } $parts = TextUtil::listToArray($hook_tag); $tags_attrs = array(); foreach ($parts as $part) { preg_match($regex, $part, $matches); if (count($matches) == 4) { $element = trim($matches[1]); $attr = trim($matches[2]); $value = trim($matches[3]); $tags_attrs[$element . '-' . $attr] = $value; } } self::$hasHookTags = !empty($tags_attrs); self::$whitemode = $whitemode; self::$tags_attrs = $tags_attrs; }