Simple wrapper for $app->redirect($app['url_generator']->generate());.

@deprecated Deprecated since 3.0, to be removed in 4.0.

@param string $path
@param array  $param
@param string $add

@return \Symfony\Component\HttpFoundation\RedirectResponse
761733
public static function redirect($path, $param = [], $add = '')
    {
        Deprecated::method(3.0);

        return new RedirectResponse(self::path($path, $param, $add));
    }
762115
public function api($path, array $parameters = array(), $method = 'GET')
    {
        return $this->getRequest()->api($path, $method, $parameters);
    }
456660
static public function buildUrl($path, $params=null)
	{
	    $parts = explode('?', $path, 2);
	    $pathParams = isset($parts[1]) ? static::parseQuery($parts[1]) : [];
	    if (is_string($params)) {
	        $params = static::parseQuery($params);
	    }
	    if ($params) {
	        $pathParams = array_merge($pathParams, $params);
	    }
	    
	    return $parts[0] . ($pathParams ? '?' . http_build_query($pathParams) : '');
	}
20352
public function redirect_ajax_url( $url, $path, $blog_id ) {
    if( strpos( $url, 'admin-ajax' ) ) {
      return home_url( "/". $this->keyword ."/" );
    }
    else {
      return $url;
    }
  }
1216177
protected function request($path, $params = [], $type = 'GET')
    {
        $path = 'sms/' . $path;

        // default params
        if (empty($this->config[ 'serverIp' ])) {
            throw new \InvalidArgumentException('RajaSMS: Server Ip Address is not set!');
        }

        if (empty($this->config[ 'apiKey' ])) {
            throw new \InvalidArgumentException('RajaSMS: API Key is not set');
        } else {
            $params[ 'apikey' ] = $this->config[ 'apiKey' ];
        }

        if ( ! empty($this->config[ 'callbackUrl' ]) and isset($params[ 'datapacket' ])) {
            $params[ 'callbackurl' ] = $this->config[ 'callbackUrl' ];
        }

        $uri = (new Uri($this->config[ 'serverIp' ]))->withPath($path);

        $request = new Curl\Request();

        $request->setConnectionTimeout(500);

        switch ($type) {
            default:
            case 'GET':
                $this->response = $request->setUri($uri)->get($params);
                break;

            case 'POST':
                $request->addHeader('content-type', 'application/json');
                $this->response = $request->setUri($uri)->post($params, 'JSON');
                break;
        }

        if (false !== ($error = $this->response->getError())) {
            $this->addError($error->code, $error->message);
        } elseif ($body = $this->response->getBody()) {
            return $body;
        }

        return false;
    }
370540
public function get($path, $params = array())
    {
        if (is_array($params) && array_key_exists("query", $params)) {
            $params["query"] = $this->castBooleanValuesToStrings($params["query"]);
        }

        $response = $this->http_client->request('GET', $path, $params);
        $this->handleErrors($response);
        return $response;
    }
796110
public function getApiURI($path = '', $params = array()) {
        if (!$path) {
          throw new Exception('Missing argument');

        }
        return $this->getUrl('api', $path, array_merge(array('oauth_token' => $this->getAccessToken()),$params));
    }
817014
public static function asset(string $path, string $assetKey = null): Redirect
    {
        return self::temporary(Route::asset($path, $assetKey));
    }
384918
public function generateModuleDirectory($path)
	{
		// Add directory
		if(!file_exists($path)) {
			@mkdir($path, 0755, true);

			// Add file in directory (index.php)
			$newFile = $path.'/index.php';
			$FileHandle = fopen($newFile, 'w');
		} else
			@chmod($path, 0755, true);
	}
1333416
static function loadProvider($key, $redirect) {
    if (!$redirect) {
      throw new \InvalidArgumentException("No redirect provided.");
    }

    switch ($key) {
      case "google":
        return new GoogleWithOpenID(array(
          'clientId' =>\Openclerk\Config::get("oauth2_google_client_id"),
          'clientSecret' => \Openclerk\Config::get("oauth2_google_client_secret"),
          'redirectUri' => $redirect,
          'scopes' => array('email', 'openid'),
          'openid.realm' => \Openclerk\Config::get('openid_host'),
        ));

      case "facebook":
        return new \League\OAuth2\Client\Provider\Facebook(array(
          'clientId' =>\Openclerk\Config::get("oauth2_facebook_app_id"),
          'clientSecret' => \Openclerk\Config::get("oauth2_facebook_app_secret"),
          'redirectUri' => $redirect,
          'scopes' => array('email'),
        ));

      case "github":
        return new \League\OAuth2\Client\Provider\Github(array(
          'clientId' =>\Openclerk\Config::get("oauth2_github_client_id"),
          'clientSecret' => \Openclerk\Config::get("oauth2_github_client_secret"),
          'redirectUri' => $redirect,
          'scopes' => array('email'),
        ));

      default:
        throw new UserAuthenticationException("No such known OAuth2 provider '$key'");
    }
  }
1002241
public function createUrl($path = '', $options = array())
    {

        $builtUrl = '';
        $hasHttp = stristr($path, 'http://') || stristr($path, 'https://');

        if (!empty($options['addServer']) && !$hasHttp) {
            $builtUrl .= $this->_server;
        }

        if (!stristr($path, self::URL_PREFIX) && !$hasHttp) {
            $builtUrl .= self::URL_PREFIX . '/' . self::API_VERSION;
        }

        $builtUrl .= $path;

        if (!empty($options['addMethod']) || !empty($options['addToken'])) {
            $builtUrl .= (stristr($path, '?') ? '&' : '?');
        }

        if (!empty($options['addMethod'])) {
            $builtUrl .= '_method=' . $options['addMethod'];
        }
        if (!empty($options['addToken'])) {
            $builtUrl .= ($options['addMethod'] ? '&' : '') . 'access_token=' . $this->_auth->accessToken();
        }

        return $builtUrl;

    }
1164886
public function generateFromURL($params)
    {
        if(empty($params['url']))
            throw new \Exception('Parameter \'url\' must be set' );

        $params = $this->validator->validate($params);

        try {
            return $this->client->sendRequest('pdf', $params, 'POST');
        } catch (\Exception $ex) {
            throw $ex;
        }

    }
219465
protected HttpPost generatePostRequest(final String path, final String param) {
        final HttpPost post = new HttpPost(buildUri(path));
        post.setEntity(new StringEntity(param, ContentType.APPLICATION_JSON));
        return post;
    }
165805
public function create(
       string $action,
       string $prefix,
       string $controller,
       array $param,
       string $path): RouteInterface
   {
       try {
           return $this->proto->clone()
               ->setAction($action)
               ->setPrefix($prefix)
               ->setController($controller)
               ->setParam($param)
               ->setPath($path);
       } catch (InvalidArgumentException $e) {
           throw new InvalidArgumentException(
               "Can't create route: " . $e->getMessage());
       }
   }
359491
protected function redirect(Response $response, $route, array $params = [])
    {
        return $response->withRedirect($this->container['router']->pathFor($route, $params));
    }
445665
public function redirect($path, $type = 302, $end = true)
    {
        // $type should be one of the following:
        // 301 = Moved permanently
        // 302 = Temporary redirect
        // 303 = Perform GET at new location (instead of POST)

        if (headers_sent()) {
            if (self::$exceptOnHeaders) {
                throw new \Exception('Headers already sent. Redirect cannot be initiated.');
            } else {
                return;
            }
        }

        if (self::$outputBuffering) {
            $this->cleanBuffer();
        }

        $this->code($type);
        header('Location: '. $path);

        if ($end) {
            exit;
        }
    }
344202
public static function add( $key, $path, $url = null )
	{
		static::$paths[$key] = $path;
		
		if ( !is_null( $url ) )
		{
			static::$urls[$key] = $url;
		}
	}