Lines Matching defs:match

181      * Parse the attributes part of a match
189 * * as well as in the match of a {@link SyntaxPlugin}
194 * To parse a match, use {@link PluginUtility::getTagAttributes()}
234 public static function getTagAttributes(string $match, array $knownTypes = [], bool $allowFirstBooleanAttributesAsType = false): array
236 return self::getQualifiedTagAttributes($match, false, "", $knownTypes, $allowFirstBooleanAttributesAsType);
242 * @param $match
250 public static function getQualifiedTagAttributes($match, $hasThirdValue, $keyThirdArgument, array $knownTypes = [], bool $allowFirstBooleanAttributesAsType = false): array
253 $match = PluginUtility::getPreprocessEnterTag($match);
256 $spacePosition = strpos($match, " ");
261 $match = trim(substr($match, $spacePosition));
262 if ($match == "") {
270 $spacePosition = strpos($match, " ");
272 $nextArgument = substr($match, 0, $spacePosition);
274 $nextArgument = $match;
297 $match = substr($match, strlen($nextArgument));
298 $match = trim($match);
304 $spacePosition = strpos($match, " ");
306 $nextArgument = substr($match, 0, $spacePosition);
308 $nextArgument = $match;
315 $match = substr($match, strlen($nextArgument));
316 $match = trim($match);
324 $parsedAttributes = self::parseAttributes($match);
597 * @param $match
601 static function getTagContent($match)
604 $start = strpos($match, ">");
606 LogUtility::msg("The match does not contain any opening tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
609 $match = substr($match, $start + 1);
611 if ($match == false) {
612 LogUtility::msg("The match does not contain any closing tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
616 $end = strrpos($match, "</");
618 LogUtility::msg("The match does not contain any closing tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
622 return substr($match, 0, $end);
749 * @param $match
753 static function getMarkupTag($match): ?string
757 $pos = strpos($match, ">");
759 LogUtility::msg("The match does not contain any tag. Match: {$match}", LogUtility::LVL_MSG_ERROR);
762 $match = substr($match, 0, $pos);
765 if ($match[strlen($match) - 1] == "/") {
766 $match = substr($match, 0, -1);
770 if ($match[0] == "<") {
771 $match = substr($match, 1);
773 if ($match[0] == "/") {
774 $match = substr($match, 1);
781 $spacePosition = strpos($match, " ");
784 return $match;
786 return substr($match, 0, $spacePosition);
871 * @param $match
876 static function handleAndReturnUnmatchedData($tagName, $match, \Doku_Handler $handler): array
886 PluginUtility::PAYLOAD => $match,
900 * @param $match
904 static function getPreprocessEnterTag($match)
907 $pos = strpos($match, ">");
909 LogUtility::msg("The match does not contain any tag. Match: {$match}", LogUtility::LVL_MSG_WARNING);
912 $match = substr($match, 0, $pos);
916 $match = trim($match);
919 if ($match[0] == "<") {
920 $match = substr($match, 1);
924 if ($match[strlen($match) - 1] == "/") {
925 $match = substr($match, 0, strlen($match) - 1);
927 return $match;
932 * @param $match
936 static function getSyntaxTagNameFromMatch($match)
938 $preprocessMatch = PluginUtility::getPreprocessEnterTag($match);
941 $spacePosition = strpos($match, " ");