Resolve this link's URL from its href or href-template

@param array $options array of href-template params
@return string the resolved URL
488480
public function expand(array $options = [])
    {
        if (!empty($this->href)) {
            return $this->href;
        } else if (!empty($this->{'href-template'})) {
            $parser = new UriTemplate();
            return $parser->expand($this->{'href-template'}, $this->_convertOptions($options));
        } else {
            throw new LinkException('Cannot expand link because no href or href-template defined');
        }
    }
789179
public function render($options = array())
    {
        $template = $options['template'];
        $data = $options['data'];

        if (file_exists(($file = $this->templatePath.DIRECTORY_SEPARATOR.$template.'.tpl.php'))) {
            $template = file_get_contents($file);
        }
        else {
            Console::writeInfo('template '.$file.' was not found...');
        }

        return $this->renderTpl($template, $data);
    }
1207135
public function getLoginUrl($options = array()) {
        $options = array_merge(array(
            'scope' => 'openid profile',
        ), $options);

        if (isset($options['scope']) && is_array($options['scope'])) {
            $options['scope'] = join(' ', $options['scope']);
        }

        // Generate nonce
        if (function_exists('openssl_random_pseudo_bytes')) {
            $nonce = sha1(openssl_random_pseudo_bytes(24));
        } else {
            $nonce = sha1(uniqid(mt_rand(), true));
        }
        $this->sessionStorage->write('nonce', $nonce);

        return $this->getUrl('oauth', 'authorize', array(
            'client_id' => $this->getClientId(),
            'response_type' => 'code',
            'scope' => $options['scope'],
            'redirect_uri' => isset($options['redirect_uri']) ? $options['redirect_uri'] : $this->redirectUri,
            'nonce' => $nonce,
        ));
    }
703368
public function handles(string $path, array $options = []): string
    {
        return $this->resolver->to($path, $options);
    }
428687
public function createLink(array $options)
    {
        $str = ' ';
        foreach ($options as $key => $value) {
            if (($str !== ' ')) {
                $str .= ' '.$key.'="'.$value.'"';
            } else {
                $str .= $key.'="'.$value.'"';
            }
        }

        $html = '<link' . $str;
        if ($this->doctype == self::DOCTYPE_XHTML1_0_FRAMESET ||
                $this->doctype == self::DOCTYPE_XHTML1_0_STRICT ||
                $this->doctype == self::DOCTYPE_XHTML1_0_TRANSITIONAL) {
            $html .= '/>';
        } else {
            $html .= '>';
        }

        return $html;
    }
793632
public function resolveSql(array $parameters = array())
    {
        // sql statement from template
        $sql = preg_replace_callback('|/\*\*(.+?)\*\*/|', function($match) use (&$parameters) {
            $name = trim($match[1]);

            $snippet = $this->builder->resolveSnippet($name, $parameters);

            return $snippet;
        }, $this->sql);

        // resolve parameters
        $types = '';
        $values = [];

        $sql = preg_replace_callback('/@(?P<type>.):(?P<name>.+?)@/', function($match) use (&$types, &$values, $parameters) {
            $types .= $match['type'];
            $values[] = $parameters[$match['name']];

            return $this->builder->resolveParameter(count($values), $match['type'], $match['name']);
        }, $sql);

        return (object)['sql' => $sql, 'types' => $types, 'parameters' => $values];
    }
412607
protected function resolveOptionsAlias(array $options)
	{
		$haystack = array_diff_key($options, $this->getAliasOptions() + ['output' => null]);
		
		foreach ($this->getAliasOptions() as $option => $value)
		{
			if (isset($options[$option]))
			{
				$haystack[$value] = $options[$option];
				
				if (is_bool($options[$option]))
				{
					$haystack[$value] = '';
				}
			}
		}
		
		return $haystack;
	}
814747
public function resolveLinks($value)
    {
        if (is_array($value)) {
            return array_map([$this, 'resolveLinks'], $value);
        }

        if (is_string($value) && strpos($value, '{@') !== false) {
            $value = $this->resolveLinksInString($value);
        }

        return $value;
    }
970578
public function getLink($option = array()) {
		$option['total'] = $this->_total;
		$option['pageSize'] = $this->_pageSize;
		$option['page'] = $this->_index;
		$option['key'] = $this->_key;
		return PageLink::show($option);
	}
108006
public function getUrl(UrlOptionsInterface $options = \null): string
    {
        $query = \null !== $options ? '?'.$options->getQueryString() : '';

        return parent::getUrl().$query;
    }
1067662
protected function resolveCommandClientOptions(array $options)
    {
        $resolver = new OptionsResolver();

        $resolver
            ->setRequired('token')
            ->setAllowedTypes('token', 'string')
            ->setDefined([
                'token',
                'prefix',
                'name',
                'description',
                'defaultHelpCommand',
                'discordOptions',
            ])
            ->setDefaults([
                'prefix'             => '@mention ',
                'name'               => '<UsernamePlaceholder>',
                'description'        => 'A bot made with DiscordPHP.',
                'defaultHelpCommand' => true,
                'discordOptions'     => [],
            ]);

        return $resolver->resolve($options);
    }
99130
public function url(array $options) {
        if (empty($this->elementData) || filter_var($this->elementData, FILTER_VALIDATE_URL)) {
            $this->elementData = filter_var($this->elementData, FILTER_SANITIZE_URL);
            return true;
        }

        $this->addError($this->checkMessage('Value is not a valid url', $options));
        return false;
    }
416932
private function resolveOptions(array $options = array())
    {
        $this->options["ga"] = $this->ga;

        if (!$this->ga->getCode() && isset($options['code'])) {
            $this->ga->setCode($options['code']);
        } else if (!$this->ga->getDomain() && isset($options['domain'])) {
            $this->ga->setDomain($options['domain']);
        }

        return array_merge($this->options, $options);
    }
1235792
public function get($name, $options = null)
    {
        if ($this->has($name)) {
            return $this->resolve($name, $options);
        } else {
            $this->throwNotFound($name);
            return false;
        }
    }
22523
protected function link($value, array $options)
    {
        $return = is_string($value) ? $value : (is_array($value) ? implode(',', $value) : $value);

        if ($options['link']) {
            return sprintf('<a href="%s">%s</a>', $options['link'], $return);
        }

        if ($options['route']) {
            $url = $this->generator->generate($options['route'], $options['parameters'] ?? []);

            return sprintf('<a href="%s">%s</a>', $url, $return);
        }

        return $return;
    }
1266206
protected function resolveOptions(array $options = [])
    {
        $resolver = new OptionsResolver();
        $logger   = new Monolog('DiscordPHP');

        $resolver
            ->setRequired('token')
            ->setAllowedTypes('token', 'string')
            ->setDefined([
                'token',
                'bot',
                'shardId',
                'shardCount',
                'loop',
                'logger',
                'loggerLevel',
                'logging',
                'cachePool',
                'loadAllMembers',
                'disabledEvents',
                'pmChannels',
                'storeMessages',
                'retrieveBans',
            ])
            ->setDefaults([
                'loop'           => LoopFactory::create(),
                'bot'            => true,
                'logger'         => null,
                'loggerLevel'    => Monolog::INFO,
                'logging'        => true,
                'cachePool'      => new ArrayCachePool(),
                'loadAllMembers' => false,
                'disabledEvents' => [],
                'pmChannels'     => false,
                'storeMessages'  => false,
                'retrieveBans'   => true,
            ])
            ->setAllowedTypes('bot', 'bool')
            ->setAllowedTypes('loop', LoopInterface::class)
            ->setAllowedTypes('logging', 'bool')
            ->setAllowedTypes('cachePool', CacheItemPoolInterface::class)
            ->setAllowedTypes('loadAllMembers', 'bool')
            ->setAllowedTypes('disabledEvents', 'array')
            ->setAllowedTypes('pmChannels', 'bool')
            ->setAllowedTypes('storeMessages', 'bool')
            ->setAllowedTypes('retrieveBans', 'bool');

        $options = $resolver->resolve($options);

        if (is_null($options['logger'])) {
            $logger->pushHandler(new StreamHandler('php://stdout', $options['loggerLevel']));
            $options['logger'] = $logger;
        }

        return $options;
    }
1057675
public function get(array $options = [])
    {
        $pagination = '';

        if (isset($options['page']) && is_int($options['page'])) {
            $pagination = '?page='.$options['page'];
        }

        if (isset($options['key'])) {
            return $this->client->get('plugin-licenses/'.$options['key'].$pagination);
        }

        return $this->client->get('plugin-licenses'.$pagination);
    }