[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Plugins/Autolink/ -> Parser.php (summary)

(no description)

File Size: 76 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Parser:: (3 methods):
  parse()
  linkifyUrl()
  trimUrl()


Class: Parser  - X-Ref


parse($text, array $matches)   X-Ref
{@inheritdoc}


linkifyUrl($tagPos, $url)   X-Ref
Linkify given URL at given position

param: integer $tagPos URL's position in the text
param: string  $url    URL
return: void

trimUrl($url)   X-Ref
Remove trailing punctuation from given URL

We remove most ASCII non-letters and Unicode punctuation from the end of the string.
Exceptions:
- dashes and underscores, (base64 IDs could end with one)
- equal signs, (because of "foo?bar=")
- plus signs, (used by some file share services to force download)
- trailing slashes,
- closing parentheses. (they are balanced separately)

param: string $url Original URL
return: string      Trimmed URL



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1