Lines Matching refs:ref

49     public const REF_ATTRIBUTE = "ref";
53 * The type of markup ref (ie media or link)
63 private string $ref;
75 public function __construct($ref, $type)
77 $this->ref = $ref;
82 $ref = trim($ref);
94 if (preg_match('<' . $emailPattern . '>', $ref)) {
96 $position = strpos($ref, "?");
99 $email = substr($ref, 0, $position);
100 $queryStringAndFragment = substr($ref, $position + 1);
104 $this->url = Url::createFromString("mailto:$ref");
120 if (preg_match('#^([a-z0-9\-.+]+?)://#i', $ref)) {
122 $this->url = Url::createFromString($ref);
169 throw new ExceptionBadSyntax("The url string was not validated as an URL ($ref). Error: {$e->getMessage()}");
176 if (preg_match('/^\\\\\\\\[^\\\\]+?\\\\/u', $ref)) {
178 $this->url = LocalPath::createFromPathString($ref)->getUrl();
185 if (preg_match('/^#.?/', $ref)) {
188 $fragment = substr($ref, 1);
200 if (preg_match('/^[a-zA-Z0-9.]+>/u', $ref)) {
205 $this->interWiki = InterWiki::createMediaInterWikiFromString($ref);
208 $this->interWiki = InterWiki::createLinkInterWikiFromString($ref);
211 LogUtility::internalError("The type ($type) is unknown, returning a interwiki link ref");
212 $this->interWiki = InterWiki::createLinkInterWikiFromString($ref);
222 * It can be a link with a ref template
224 if (syntax_plugin_combo_variable::isVariable($ref)) {
235 $questionMarkPosition = strpos($ref, "?");
236 $wikiPath = $ref;
240 $wikiPath = substr($ref, 0, $questionMarkPosition);
241 $queryStringAndAnchorOriginal = substr($ref, $questionMarkPosition + 1);
244 $hashTagPosition = strpos($ref, "#");
246 $wikiPath = substr($ref, 0, $hashTagPosition);
247 $fragment = substr($ref, $hashTagPosition + 1);
269 throw new ExceptionBadArgument("The ref type ($type) is unknown");
344 throw new ExceptionBadArgument("The ref type ($type) is unknown");
463 return $this->ref;
477 throw new ExceptionNotFound("This ref ($this->ref) is not an interWiki.");