@param array $deeplinkSuffix

@return Shopgate_Model_Redirect_DeeplinkSuffix
335511
protected function createDeeplinkSuffixes(array $deeplinkSuffix)
    {
        $suffixModel = new Shopgate_Model_Redirect_DeeplinkSuffix();

        foreach ($deeplinkSuffix as $name => $template) {
            $valueModel = new Shopgate_Model_Redirect_DeeplinkSuffixValue();
            $valueModel->setName($name);
            $valueModel->setValue($template);

            if ($template === false) {
                $valueModel->setDisabled(true);
            } else {
                $valueModel->setVariables($this->templateParser->getVariables($template));
            }

            $suffixModel->addValue($name, $valueModel);
        }

        return $suffixModel;
    }
433079
protected function request($urlSuffix, array $options)
    {
        $client = new Client([
            'base_uri' => $this->blizzardClient->getApiUrl(),
        ]);

        $options = $this->generateQueryOptions($options);

        return $client->get($this->serviceParam.$urlSuffix, $options);
    }
30197
public function redirectionLink()
    {
        // Check external redirect
        if ($this->RedirectionType == 'External') {
            return $this->ExternalURL ?: null;
        }

        // Check internal redirect
        /** @var SiteTree $linkTo */
        $linkTo = $this->LinkToID ? SiteTree::get()->byID($this->LinkToID) : null;
        if (empty($linkTo)) {
            return null;
        }

        // We shouldn't point to ourselves - that would create an infinite loop!  Return null since we have a
        // bad configuration
        if ($this->ID == $linkTo->ID) {
            return null;
        }

        // If we're linking to another redirectorpage then just return the URLSegment, to prevent a cycle of redirector
        // pages from causing an infinite loop.  Instead, they will cause a 30x redirection loop in the browser, but
        // this can be handled sufficiently gracefully by the browser.
        if ($linkTo instanceof RedirectorPage) {
            return $linkTo->regularLink();
        }

        // For all other pages, just return the link of the page.
        return $linkTo->Link();
    }
67458
public function getFaqIndexPermalink(array $parameters = [], $absolute = 1)
    {
        return $this->getContainer()->get('router')->generate($this->getFaqIndexRoute(), $this->getFaqIndexRouteParameters($parameters), $absolute);
    }
795441
public function getSelfLink()
    {
        if (($sValue = $this->getViewConfigParam('selflink')) === null) {
            $sValue = $this->getConfig()->getShopHomeUrl();
            $this->setViewConfigParam('selflink', $sValue);
        }

        return $sValue;
    }
817172
protected function getRelativeLinkToShared() {
        return $this->fs->makePathRelative(realpath(Platform::sharedDir()), realpath(Platform::webDir() . '/sites/default/'));
    }
1339962
public function returnUrl() {
        if ( ! isset($this->claim) ) return false;
        return isset($this->claim->deep_link_return_url) ? $this->claim->deep_link_return_url : false;
    }
1299628
public function replaceNameSuffix($nameSuffix)
    {
        $atoms = $this->nameAtoms();
        if (array('', '') === $atoms) {
            if (null === $nameSuffix) {
                return $this;
            }

            return $this->replaceName(
                static::EXTENSION_SEPARATOR . $nameSuffix
            );
        }

        $numAtoms = count($atoms);

        if (null === $nameSuffix) {
            $replacement = array();
        } else {
            $replacement = array($nameSuffix);
        }
        array_splice($atoms, 1, count($atoms), $replacement);

        return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
    }
1116897
public function getDomain(bool $withSuffix = true)
    {
        if (!isset($this->uri['host'])) {
            return null;
        }

        $manager = new Manager(new Cache(sys_get_temp_dir() . '/publicsuffix/'), new CurlHttpClient());
        $rules = $manager->getRules();
        $domain = $rules->resolve($this->uri['host']);

        if (!$domain->isKnown()) {
            return $this->uri['host'];
        }

        if ($withSuffix) {
            return $domain->getRegistrableDomain();
        } else {
            return substr($domain->getRegistrableDomain(), 0, -strlen($domain->getPublicSuffix()) - 1);
        }
    }
578934
public function withSubDomain($subDomain)
    {
        $uri = clone $this;

        if (is_null($subDomain)) {
            $uri->subDomain = null;
            $uri->subDomains = [];
        } elseif (is_string($subDomain)) {
            $uri->subDomain = $subDomain;
            $uri->subDomains = [$subDomain];
        } elseif (is_array($subDomain)) {
            $uri->subDomain = reset($subDomain);
            $uri->subDomains = $subDomain;
        }

        $uri->subDomains = array_unique($uri->subDomains);
        $this->setOrdinalKeys($uri->subDomains, count($uri->subDomains) + 2);

        return $uri;
    }
1313237
private function getLink()
    {
        // unset GET vars that we want to ignore
        $vars = $_GET;

        foreach ($vars as $name => $value) {
            if (in_array($name, $this->unset_get_vars)) {
                unset($vars[$name]);
            }
        }

        $key_orderby = $this->getLinkPrefix() . 'orderby';
        $key_orderbydir = $this->getLinkPrefix() . 'orderbydir';

        unset($vars[$key_orderby]);
        unset($vars[$key_orderbydir]);

        $next_dir = $this->getNextDirection();

        if ($next_dir != $this->default_direction) {
            $vars[$key_orderby] = $this->id;
            $vars[$key_orderbydir] = $this->getDirectionAsString(
                $next_dir,
                false
            );
        }

        // build the new link
        $link = $this->link . '?';
        $first = true;

        foreach ($vars as $name => $value) {
            if ($first) {
                $first = false;
            } else {
                $link .= '&amp;';
            }

            $link .= $name . '=' . $value;
        }

        return $link;
    }
1363464
public function updatePreviewLink(&$link, $action = null)
    {
        $url = Director::absoluteURL($this->owner->Link($action));
        $link = HTTP::setGetVar('SubsiteID', $this->owner->SubsiteID, $url);
        return $link;
    }
452007
public function fetchControllerSuffix($method = 'GET', $customSuffix = [])
    {
        $method = strtoupper($method);

        // Validate that we have a map to handle the given HTTP method.
        if (!isset($this->suffixMap[$method])) {
            // throw new \RuntimeException(sprintf('Unable to support the HTTP method `%s`.', $method), 404);
        }

        if (isset($customSuffix['*'])) {
            return $customSuffix['*'];
        }

        $customSuffix = array_change_key_case($customSuffix, CASE_UPPER);

        // Split GET|POST|PUT format
        foreach ($customSuffix as $key => $value) {
            $keyArray = explode('|', $key);

            if (count($keyArray) <= 1) {
                continue;
            }

            foreach ($keyArray as $splitedMethod) {
                $customSuffix[$splitedMethod] = $value;
            }

            unset($customSuffix[$key]);
        }

        $suffix = array_merge($this->suffixMap, $customSuffix);

        if (!isset($suffix[$method])) {
            throw new RouteNotFoundException(sprintf('Unable to support the HTTP method `%s`.', $method), 404);
        }

        return trim($suffix[$method], '\\');
    }
913936
public function evidenceUrlWithSuffix($urlSuffix)
    {
        $evidenceUrl = $this->getEvidenceUrl();
        if (!empty($urlSuffix)) {
            if (($urlSuffix[0] != '/') && ($urlSuffix[0] != ';') && ($urlSuffix[0]
                != '?')) {
                $evidenceUrl .= '/';
            }
            $evidenceUrl .= $urlSuffix;
        }
        return $evidenceUrl;
    }
130589
public function setLinkDefaults(array $Settings = [])
    {
        if (isset($Settings["R"])) {
            $this->Default["LinkR"] = $Settings["R"];
        }
        if (isset($Settings["G"])) {
            $this->Default["LinkG"] = $Settings["G"];
        }
        if (isset($Settings["B"])) {
            $this->Default["LinkB"] = $Settings["B"];
        }
        if (isset($Settings["Alpha"])) {
            $this->Default["LinkAlpha"] = $Settings["Alpha"];
        }
    }
262956
public static function buildDeepArray($path, $index = 0, array $deepArray = array())
    {
        if (is_string($path)) {
            $path = explode('.', $path);
        }

        if (isset($path[$index])) {
            $key = $path[$index];

            $deepArray[$key] = self::buildDeepArray(
                $path,
                $index + 1,
                isset($deepArray[$key]) ? $deepArray[$key] : array()
            );
        }

        return $deepArray;
    }
134889
public function replyComment($depth = 0)
    {
        $args = array(
            'depth' => $depth,
            'max_depth' => 3
        );
        return get_comment_reply_link($args, $this->id(), $this->postId());
    }