Je aktualni stranka povolena
@param string $link
@return bool
6932
public function isLinkAllowed(string $link): bool
	{
		$this->prepareLink($link);
		return $this->links[$link]->allowed;
	}
389496
public function itHasATextSpanLinkedTo($text, $link)
    {
        $this->assertSession()->pageTextContains($text);
        Assertion::assertCount(
            1,
            $this->getXpath()->findXpath(sprintf('//a[@href="%s"]/span[text()="%s"]', $link, $text))
        );
    }
379440
protected function processLinkHtml($link)
    {
        $_html  = !empty($link[0]) ? $link[0] : '';
        $_href  = !empty($link[1]) ? $link[1] : '';
        $_url   = !empty($link[2]) ? $link[2] : '';
        $_title = isset($link[3]) && strip_tags($link[3]) ? strip_tags($link[3]) : $_url;

        // --------------------------------------------------------------------------

        /**
         * Only process if there's at least the HTML tag and a detected URL
         * otherwise it's not worth it/possible to accurately replace the tag
         */

        if ($_html && $_url) {
            $_html = $this->processLinkGenerate($_html, $_url, $_title, true);
        }

        return $_html;
    }
406897
public function assertSeeLink($link)
    {
        if ($this->resolver->prefix) {
            $message = "Did not see expected link [{$link}] within [{$this->resolver->prefix}].";
        } else {
            $message = "Did not see expected link [{$link}].";
        }

        PHPUnit::assertTrue(
            $this->seeLink($link),
            $message
        );

        return $this;
    }
369222
public static function href($link) {
        if(isset($link['uri']) || isset($link['fragment'])) {
            return ' href="'.URI::getHref($link).'"';
        }
        return false;
    }
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;
    }
1050221
public function merge(self $link)
    {
        $this->parameters = array_replace(
            $link->getParameters(),
            $this->parameters
        );

        $this->metadata = array_replace(
            $link->getMetadata(),
            $this->metadata
        );
    }
62091
public static function htmlID($link) {
        if(isset($link['id']) && is_string($link['id']) && !empty(trim($link['id']))) {
            return ' id="'.trim($link['id']).'"';
        }
        return false;
    }
1209518
public function foundLinkToBeScanned(Event $event, $link)
    {
        $this->io->verbose(__d('link-scanner', 'Link found: {0}', $link));

        return true;
    }
903277
public function cleanLink($link)
	{
		$link = strtolower(preg_replace(
					array('#[\\s-]+#', '#[^A-Za-z0-9/ -]+#'),
					array('-', ''),
				    $this->cleanString(urldecode($link))
		));

		$link = preg_replace('/\/+/', '/', $link);
		$link = preg_replace('/-+/', '-', $link);
		
		return $link;
	}
385586
public function linkAdded(Span $span, Link $link)
    {
        // If the span is already attached (managed by the extension), then
        // tell the extension to add the link.
        if ($span->attached()) {
            $this->addLink($link->traceId(), $link->spanId(), [
                'type' => $link->type(),
                'attributes' => $link->attributes(),
                'span' => $span
            ]);
        }
    }
708056
function symlink($target, $link)
    {
        if ($this->exists($link)) {
            $this->unlink($link);
        }

        symlink($target, $link);
    }
201966
public function addLink(Link $link)
    {
        if ( ! $this->links instanceof ArrayIterator) {
            $this->links = new ArrayIterator();
        }

        $this->links->push($link);

        return $this;
    }
1209803
public function seeLink($link)
    {
        $this->ensurejQueryIsAvailable();

        $selector = addslashes(trim($this->resolver->format("a:contains('{$link}')")));

        $script = <<<JS
            var link = jQuery.find("{$selector}");
            return link.length > 0 && jQuery(link).is(':visible');
JS;

        return $this->driver->executeScript($script);
    }
1116779
public static function title($link) {
        if(isset($link['title']) || isset($link['label'])){
            return ' title="'.trim(isset($link['title']) && !empty(trim($link['title'])) ? $link['title'] : $link['label']).'"';
        }
        return false;
    }
206089
public static function convertToPunycode($link = null){
		$Idna = new IdnaConvert();

		$link = self::httpLess($link);

		// для конветрации нужно выделить домен и конвертировать только его.
		$host = self::getHost($link);
		$artUrl = str_replace(self::getHost($link),'', $link);

		$res['linkPunyEnc'] = $Idna->encode($host).$artUrl;
		$res['linkPunyDec'] = $Idna->decode(strtolower($host)).$artUrl; // strtolower необходим из-за того, что idna_convert неверно декодирует при большебуквенном написании

		return $res;
	}
402924
public function isolateYoutubeVideoCode($link)
    {
        try {
            if (preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $link, $matches)) {
                return $matches[0];
            }
        } catch (\Exception $e) {
            throw new VideoException("can't match youtube code in given url", $e);
        }
    }