You are here

private function Link::cleanupAnchor in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dom-crawler/Link.php \Symfony\Component\DomCrawler\Link::cleanupAnchor()

Remove the anchor from the uri.

Parameters

string $uri:

Return value

string

2 calls to Link::cleanupAnchor()
Link::cleanupUri in vendor/symfony/dom-crawler/Link.php
Removes the query string and the anchor from the given uri.
Link::getUri in vendor/symfony/dom-crawler/Link.php
Gets the URI associated with this link.

File

vendor/symfony/dom-crawler/Link.php, line 216

Class

Link
Link represents an HTML link (an HTML a, area or link tag).

Namespace

Symfony\Component\DomCrawler

Code

private function cleanupAnchor($uri) {
  if (false !== ($pos = strpos($uri, '#'))) {
    return substr($uri, 0, $pos);
  }
  return $uri;
}