@param $link

@return string
338992
protected function composeListLink($link)
    {
        $query = $this->addIdToQuery();
        $query = $this->addPaginationToQuery($query);

        $link .= '?' . http_build_query($query);

        return $link;
    }
921413
public static function toString($args, $link  = '') {
		$str = '';
		if (is_array($args)) {
			foreach ($args as $value) {
				$str .= self::toString($value, $link);
			}
		} else {
			$str .= $args.$link;
		}
		return $str;
	}
592939
public function setHref($menulink)
    {
        if ($menulink->url) {
            return $menulink->url;
        }
        if ($menulink->page) {
            return $menulink->page->uri();
        }

        return '/';
    }
1068232
public function setLink($link)
    {
        if ($this->version == Feed::ATOM)
            $this->setAtomLink($link);
        else
            $this->setChannelElement('link', $link);

        return $this;
    }
1248468
public static function getReferencedOID($link) {
    preg_match_all("/([A-Za-z0-9]+(:[0-9]+)+)/", $link, $matches);
    if (sizeof($matches) > 0 && sizeof($matches[1]) > 0) {
      $oid = $matches[1][0];
      return ObjectId::parse($oid);
    }
    return null;
  }
558912
public function clickLinkInHeader(string $link)
    {
        $header_link = $this->find('css', '.page-title-action');

        if ($header_link->getText() === $link) {
            $header_link->click();
        } else {
            $this->getHeaderElement()->clickLink($link);
        }
    }
205657
public static function read(string $link = ''): string
    {
        $link = static::normalizePath($link);
        if (static::exists($link)) {
            return @\readlink($link);
        }
        return '';
    }
43082
private function _parseMemcacheAddress($link)
    {
        $protoSeparator = strpos($link, '://');
        if ($protoSeparator !== false) {
            $link = substr($link, $protoSeparator + 3);
        }
        $server = $link;
        $serverOptions = [];
        $hookSeparator = strpos($link, '?');
        if ($hookSeparator !== false) {
            $server = substr($link, 0, $hookSeparator);
            parse_str(substr($link, $hookSeparator + 1), $serverOptions);
        }
        $server = explode(':', $server);
        $serverOptions['host'] = $server[0];
        $serverOptions['port'] = $server[1];
        return $serverOptions;
    }
64776
public static function getLinkName($issueLink)
    {
        $linkName = null;

        if (isset($issueLink['outwardIssue'])) {
            if (isset($issueLink['outwardIssue']['key'], $issueLink['type']['outward'])) {
                $linkName = $issueLink['type']['outward'];
            }
        } elseif (isset($issueLink['inwardIssue'], $issueLink['type']['inward'])) {
            if (isset($issueLink['inwardIssue']['key'])) {
                $linkName = $issueLink['type']['inward'];
            }
        }

        return $linkName;
    }
721830
public function homeLink($link)
    {
        if (!(strpos($link, "http://") === 0 or
            strpos($link, "https://") === 0 or
            strpos($link, "ftp://") === 0 or
            strpos($link, "www.") === 0)
        ) {
            $home = $this->container->get("router")->generate('claro_index').$link;

            $home = str_replace("//", "/", $home);

            return $home;
        }

        return $link;
    }
788581
public function isLinkAllowed(string $link): bool
	{
		if (isset($this->allowedLinks[$link])) {
			return true;
		} else {
			$pos = strrpos($link, ':');
			$link = substr($link, 0, ($pos + 1));
			return isset($this->allowedLinks[$link]);
		}
	}
159780
private function addLinkHeader ($link)
    {
        $headers = Craft::$app->getResponse()->getHeaders();

        if ( $headers->get('Link') ) {
            $link = $headers->get('Link') . ',' . $link;
        }

        $headers->set('Link', $link);
    }
533519
public static function getRssLink($link = '')
    {
        while (stristr($link, 'http') != $link) {
            $link = substr($link, 1);
        }
        $link = esc_url(strip_tags($link));

        return $link;
    }
422011
protected function link($link, $anchor = "") {
        $link = trim($link);
        if (preg_match("/^(https?|s?ftp):\/\/.+$/i", $link)) {
            $link = trim($link, ",.?!");
            return array('content' => $link, 'url' => $link);
        } else {
            $callbackargs = $this->linkgeneratorcallbackargs;
            $callbackargs['anchor'] = $anchor;
            $link = call_user_func_array($this->linkgeneratorcallback, array($link, $callbackargs));

            if (isset($link['link_info'])) {
                $l = $link['link_info']['link'];
                unset($link['link_info']['link']);
                $this->returnvalues['link_count'][$l] = $link['link_info'];
            }
            return $link;
        }
    }
71558
protected function clientClick(Link $link)
    {
        if ($link instanceof Form) {
            return $this->proceedSubmitForm($link);
        }
        return $this->clientRequest($link->getMethod(), $link->getUri());
    }
1328496
private function renderView($links)
	{
		$defaults = $this->defaults;

		return View::make($this->view, compact('links', 'defaults'))->render();
	}
1332497
protected function parseLinkHeader( $link ) {
		$parts = explode( ';', $link );
		$attrs = [
			'href' => trim( array_shift( $parts ), '<>' ),
		];
		foreach ( $parts as $part ) {
			if ( ! strpos( $part, '=' ) ) {
				continue;
			}
			list( $key, $value ) = explode( '=', $part, 2 );
			$key = trim( $key );
			$value = trim( $value, '" ' );
			$attrs[ $key ] = $value;
		}
		return $attrs;
	}