Return the url for the path given

@param string $path      Path url path or Route name if type_name is not uri
@param string $type_name Url type uri|route
@param array $params     Array params route
@return string
438887
public function urlFor($path, $type_name = 'asset', array $params = array())
    {
        switch ($type_name) {
            case 'asset':
                return $this->container->getRequest()->getRootUri() . $path;
                break;
            case 'route':
                $routeUrl = $this->container->getRequest()->getRootUri($this->getSetting('debug')) . $this->container->getRoute($path)->getPatternUri();
                return (!empty($params)) ? $routeUrl . '?' . http_build_query($params) : $routeUrl;
                break;
        }
    }
367453
public static function url($name, array $params = null, $protocol = null)
    {
        $route = Route::get($name);
        return $route->isExternal()
            ? $route->uri($params)
            : Url::site($route->uri($params), $protocol);
    }
389636
public function getUrl(string $path = '')
    {
        if (is_multisite() && defined(SUBDOMAIN_INSTALL) && SUBDOMAIN_INSTALL) {
            return sprintf(
                '%s/%s/themes/%s',
                get_home_url(),
                CONTENT_DIR,
                $this->getDirectory()
            ).($path ? '/'.$path : $path);
        }

        return get_template_directory_uri().($path ? '/'.$path : $path);
    }
294965
public function from_path(string $path, $type = 'page'): ?string
  {
    $parent = null;
    if ( $root = $this->opt->from_code($type, self::$option_root_id) ){
      $parts = explode('/', $path);
      $parent = $root;
      foreach ( $parts as $i => $p ){
        $is_not_last = $i < (\count($parts) - 1);
        if ( !empty($p) ){
          $prev_parent = $parent;
          // Adds a slash for each bit of the path except the last one
          $parent = $this->opt->from_code($p.($is_not_last ? '/' : ''), $prev_parent);
          // If not found looking for a subpermission
          if ( !$parent && $is_not_last ){
            $parent = $this->opt->from_code($p, $prev_parent);
          }
        }
      }
    }
    return $parent ?: null;
  }
288836
static function path_to_url( $path )
    {
        // We are replacing DIRECTORY_SEPARATOR with forward slash here 
        // to avoid issues in Windows systems
        $path    = str_replace( DIRECTORY_SEPARATOR, '/', $path);
        $abspath = str_replace( DIRECTORY_SEPARATOR, '/', ABSPATH);
        $url     = str_replace( $abspath, '', $path );

        return esc_url_raw( site_url( $url ) );
    }
998457
public function url($path)
    {
        $protocol = "http" . $this->isSecure();

        return $protocol . $_SERVER['HTTP_HOST'] .$this->getBaseUri() . $path;
    }
138732
public function getUrlByRoutePath($route_path)
    {
        if (null === $url = $this->getRouteCollection()->getRoutePath($route_path)) {
            $url = '/';
        }

        return $url;
    }
53158
public function getUrl($params): string
    {
        // prepare params
        $params = $this->getParams($params);

        // retrieve URL
        return Router::getUrl(
            $this->getModule(),
            $this->getController(),
            $params
        );
    }
54838
protected function buildUrl($path)
    {
        $baseUrl = $this->getOption('base_url');

        //add trailing slash to the url if not supplied in the base_url setting nor supplied in path #6
        $url = $baseUrl . ((substr($baseUrl, -1) == '/' || substr($path, 0, 1) == '/') ? '' : '/') . $path;

        if (strpos($url, '.json') === false) {
            $url .= '.json';
        }

        return $url;
    }
389972
public static function url($route = '', Array $params = [])
    {
        $dir = dirname($_SERVER['PHP_SELF']);
        $dir = $dir == DIRECTORY_SEPARATOR ? '':$dir;
        $scheme = isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS'] ? 'https':'http';
        $baseUrl = $scheme.'://'.$_SERVER['HTTP_HOST'].$dir.'/?r='.$route;
        return empty($params) ? $baseUrl : $baseUrl . '&' . http_build_query($params);
    }
285416
protected function getUrl($route, $params = array())
    {
        $urlHelper = $this->getView()->plugin('url');

        if ('#' === $route[0]) {
            return $route;
        }

        return $urlHelper($route, $params, $this->getRouteOptions());
    }
1061459
public function path($path, $args = [])
    {
        if (is_array($path)) {
            $path = array_merge($path, $args);
        } elseif ($args !== []) {
            $path = array_merge([$path], $args);
        }

        return Url::to($path);
    }
896767
public static function route($param = '')
    {
        $param = parent::route($param);

        switch ($param) {
            case 'types':
                return static::URL . '/' . $param;
        }

        // Otherwise, we may have been sent a longer path, e.g. types/manage/$type/fields
        if (0 == strpos($param, 'types/manage')) {
            // @todo Better checking on these paths.
            return static::URL . '/' . $param;
        }
        throw new RuntimeException('Invalid route parameter passed to AdminStructure PageObject.');
    }
207807
public function url($path = null)
    {
        $routeAction = 'Cms\Classes\CmsController@run';

        if (self::$actionExists === null) {
            self::$actionExists = Route::getRoutes()->getByAction($routeAction) !== null;
        }

        if (substr($path, 0, 1) == '/') {
            $path = substr($path, 1);
        }

        if (self::$actionExists) {
            return Url::action($routeAction, ['slug' => $path]);
        }

        return Url::to($path);
    }
275781
public function getUrl($path): string
    {
        \assert('is_string($path)');
        if (strpos($path, ':') === 0) {
            $key = substr($path, 0, strpos($path, '/') ?: \strlen($path));
            $path = $key === $path ? '' : (string)substr($path, \strlen($key));
        } else {
            $key = ':dist';
        }
        if (!isset($this->map[$key])) {
            throw new \InvalidArgumentException(sprintf('No path "%s" for subpackage "%s".', $path, $key));
        }
        return parent::getUrl(substr($key, 1) . $path);
    }
215346
protected function request($path, $params = [], $type = 'GET')
    {
        $apiUrl = 'https://my.ipaymu.com';

        $uri = (new Uri($apiUrl))->withPath($path);
        $request = new Curl\Request();

        $params[ 'key' ] = $this->config['apiKey'];
        $params[ 'format' ] = 'json';

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

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

        // Try to get curl error
        if (false !== ($error = $this->response->getError())) {
            $this->errors = $error;
        } else {
            $body = $this->response->getBody();

            if (empty($body[ 'Status' ])) {
                return $body->getArrayCopy();
            } else {
                $this->errors[ $body[ 'Status' ] ] = $body[ 'Keterangan' ];
            }
        }

        return false;
    }
392406
public function getUrl(string $path, ?string $packageName = null): string
    {
        if ($this->status == self::NOT_LOADED) {
            $namedPackages = $this->getNamedPackages();
            if (empty($namedPackages)) {
                $this->package = $this->getDefaultPackage();
                $this->status = self::ONE_PACKAGE;
            } else {
                $defaultPackage = $this->getDefaultPackage();
                $this->packages = new Packages($defaultPackage, $namedPackages);
                $this->status = self::MUTI_PACKAGES;
            }
        }
        if ($this->status == self::ONE_PACKAGE) {
            return $this->package->getUrl($path);
        } else {
            return $this->packages->getUrl($path, $packageName);
        }
    }