Renders the given URI with Symfony stack

@param string|\Symfony\Component\HttpKernel\Controller\ControllerReference $uri
@param array $options

@return string
7082
public static function renderUri( $uri, $options = array() )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();
        $fragmentHandler = $serviceContainer->get( 'fragment.handler' );

        $strategy = isset( $options['strategy'] ) ? $options['strategy'] : 'inline';
        unset( $options['strategy'] );

        try
        {
            return $fragmentHandler->render( $uri, $strategy, $options );
        }
        catch ( InvalidArgumentException $e )
        {
            throw new InvalidArgumentException( "The URI {$uri->controller} couldn't be rendered", 0, $e );
        }
    }
1211413
public function route(array $method, $uri, $callback, $options = [])
    {
        if (is_array($uri)) {
            foreach ($uri as $u) {
                $this->route($method, $u, $callback, $options);

            }
            return $this;
        }
        $options = array_merge(['ajaxOnly' => false, 'continue' => false], (array)$options);

        if ($uri != '/') {
            $uri = $this->removeDuplSlash($uri) . '/';
        }
        // Replace named uri param to regex pattern.
        $pattern = $this->namedParameters($uri);
        $this->currentUri = $pattern;

        if ($options['ajaxOnly'] == false || $options['ajaxOnly'] && $this->req->ajax) {
            // If matched before, skip this.
            if ($this->matched === false) {
                // Prepare.
                $pattern = $this->prepare(
                    str_replace(['/?', '/*'], [$this->pattern['/?'], $this->pattern['/*']], $this->removeDuplSlash($this->group . $pattern))
                );

                // If matched.
                $method = count($method) > 0 ? in_array($this->req->method, $method) : true;
                if ($method && $this->matched($pattern)) {
                    if ($this->isGroup) {
                        $this->prams = array_merge($this->pramsGroup, $this->prams);
                    }

                    $this->req->args = $this->bindArgs($this->prams, $this->matchedArgs);

                    $this->matchedPath = $this->currentUri;
                    $this->routeCallback[] = $callback;

                    if ($options['continue']) {
                        $this->matched = false;
                    }
                }
            }
        }
        $this->_as($this->removeParameters($this->trimSlash($uri)));
        return $this;
    }
346183
public function requestRaw(string $url, string $method = 'GET', array $options = [])
    {
        return Response::buildFromPsrResponse($this->request($url, $method, $options, true));
    }
1340230
public static function diSemantic($controller, $options = ["defer"=>true,"gc"=>true]) {
		$jquery = new \Ajax\php\ubiquity\JsUtils ( $options, $controller );
		$jquery->semantic ( new \Ajax\Semantic () );
		$jquery->setAjaxLoader ( "<div class=\"ui active centered inline text loader\">Loading</div>" );
		return $jquery;
	}
164363
public function map($uri, $method)
    {
        if ($uri === '/') {
            $uri = '';
        }

        $controller = $this;

        return $this->app->map(
            $this->baseUri.$uri,
            function () use ($controller, $method) {
                $params = func_get_args();
                $i = 0;
                $a = preg_replace_callback('/:(\w+)/', function($matches) use ($controller, $params, &$i) {
                    $value = @$params[$i++];
                    $controller->routeData($matches[1], $value);
                    return $value;
                }, $controller->baseUri);
                $controller->delegate($method, array_slice($params, $i));
            }
        );
    }
403981
protected function getControllerAction($options)
    {
        if (is_array($options)) {
            return $this->url->action($options[0], array_slice($options, 1));
        }

        return $this->url->action($options);
    }
654454
public function usePostMethod($uri, array $options)
    {
        if (isset($options['query'])) {
            $url = Url::factory($this->getBaseUrl())->combine($this->expandTemplate($uri, $options['query']));
            return strlen($url) > $this->getConfig('max_query_length');
        }
        return false;
    }
1271332
protected function httpRequest($method, $uri, array $options = [])
    {
        if (null !== $this->proxy) {
            $options[RequestOptions::PROXY] = $this->proxy;
        }

        if (!isset($options[RequestOptions::HEADERS])) {
            $options[RequestOptions::HEADERS] = $this->getHttpHeaders();
        } else {
            $options[RequestOptions::HEADERS] = array_merge($this->getHttpHeaders(), $options[RequestOptions::HEADERS]);
        }

        if (!isset($options[RequestOptions::HTTP_ERRORS])) {
            $options[RequestOptions::HTTP_ERRORS] = false;
        }

        if (!isset($options[RequestOptions::ALLOW_REDIRECTS])) {
            $options[RequestOptions::ALLOW_REDIRECTS] = false;
        }

        if (!isset($options[RequestOptions::TIMEOUT]) && null !== $this->timeout) {
            $options[RequestOptions::TIMEOUT] = $this->timeout;
        }

        if (null !== $this->qps && null !== $this->lastRequestTime) {
            $lastInterval = floor((microtime(true) - $this->lastRequestTime) * 1000000);
            $timeout = ceil(1000000 / $this->qps);
            if ($lastInterval < $timeout) {
                usleep($timeout - $lastInterval);
            }
        }

        $response = $this->getHttpClient()->request($method, $uri, $options);
        $this->lastRequestTime = microtime(true);
        $this->history[] = [
            'method' => $method,
            'uri' => $uri,
            'time' => $this->lastRequestTime,
            'status' => $response->getStatusCode(),
        ];

        return $response;
    }
678489
public function render(Request $request, array $options = array())
    {
        return $this->doRender(
            $options + array(
                'app_id' => $this->appId,
                'width' => $this->defaultWidth,
                'num_posts' => $this->defaultNumPosts,
                'color_scheme' => $this->defaultColorScheme,
                'include_sdk' => $this->defaultIncludeSDK,
                'url' => $request->getSchemeAndHttpHost() . $request->attributes->get('semanticPathinfo', $request->getPathInfo()),
            )
        );
    }
1112176
public function render($options = array())
    {
        $pattern = $options['pattern'];
        $data = $options['data'];

        return $this->renderTpl($pattern, $data);
    }
877949
public function get($uri, $parameters = array())
    {
        return $this->request(self::METHOD_GET, $this->getUrl($uri), $parameters);
    }
78852
public function _renderPagination($options) {
		if ($this->Paginator->request->params['paging'][$this->Paginator->defaultModel()]['pageCount'] < 2) {
			return '';
		}

		if (CakePlugin::loaded('TwitterBootstrap')) {
		}

		$out = array();

		$paginate = $options['paginate'];
		$prev = $paginate['prev'];
		$next = $paginate['next'];

		$this->Paginator->options($paginate['attrs']);

		$after = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$glue = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$before = '';
		if (CakePlugin::loaded('TwitterBootstrap')) {
			$glue .= "\t";
			$before .= "\n";
			$paginate['numbers']['separator'] = $after . "\t";
			// Hack for the `BootstrapPaginatorHelper::prev()` and `BootstrapPaginatorHelper::next()` to apply the correct `class`.
			$prev['options']['disabled'] = $prev['disabledOptions']['class'];
			$next['options']['disabled'] = $next['disabledOptions']['class'];
		}

		$out[] = $this->Paginator->prev($prev['title'], $prev['options'], $prev['disabledTitle'], $prev['disabledOptions']);
		$out[] = $this->Paginator->numbers($paginate['numbers']);
		$out[] = $this->Paginator->next($next['title'], $next['options'], $next['disabledTitle'], $next['disabledOptions']);

		$out = $glue . implode($glue, $out);
		if (CakePlugin::loaded('TwitterBootstrap') || CakePlugin::loaded('BoostCake')) {
			if (!isset($paginate['ulOptions'])) {
				$paginate['ulOptions'] = array('class' => 'pagination');
			}
			$out = $this->Html->tag('ul', $out . $after, $paginate['ulOptions']);
		}

		if (false !== $paginate['divOptions']) {
			return $this->Html->useTag('block', $this->_parseAttributes($paginate['divOptions']), $before . "\t" . $out . "\n");
		}

		return "\t" . $this->Html->useTag(
			'tablerow',
			$this->_parseAttributes($paginate['trOptions']),
			"\n\t\t" . $this->Html->useTag(
				'tablecell',
				$this->_parseAttributes(array_merge($paginate['tdOptions'], array('colspan' => count($options['columns'])))),
				$before . "\t\t\t" . $out . "\n\t\t"
			) . "\n\t"
		);
	}
1235420
public function createUrlFromUri($uri)
    {
        $uri = ltrim($uri, '/');

        return empty($this->baseUrl)
            ? $this->app[\Illuminate\Contracts\Routing\UrlGenerator::class]->to($uri)
            : $this->baseUrl.$uri;
    }
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);
    }
237804
public function any($uri, $pattern, array $options = [])
    {
        $patterns = explode('@', $pattern);
        $controller = $patterns[0];
        $method = ucfirst($patterns[1]);

        $this->get($uri, "$controller@get$method", $options);
        $this->post($uri, "$controller@post$method", $options);
    }
1192902
protected function getControllerAction($options)
    {
        if (is_array($options)) {
            return URL::action($options[0], array_slice($options, 1));
        }

        return URL::action($options);
    }
539318
public function head($uri, array $options = null)
    {
        return $this->request(self::REQUEST_METHOD_HEAD, $uri, null, $options);
    }