Generate a key for the property to use during export

@param string $uri
@return string
2527
protected function generateId($uri)
    {
        $property = new \core_kernel_classes_Property($uri);
        $label = strtolower(trim($property->getLabel()));
        $label = preg_replace(array('/\s/', '[^a-z\-]'), array('-', ''), $label);
        return empty($label) ? 'key' : $label;
    }
969296
public function resolveAssetUri(string $uri): ?string
    {
        $targetObject = $this->convertUriToObject($uri);
        if ($targetObject === null) {
            $this->systemLogger->info(sprintf('Could not resolve "%s" to an existing asset; The asset was probably deleted.', $uri), LogEnvironment::fromMethodName(__METHOD__));
            return null;
        }
        return $this->resourceManager->getPublicPersistentResourceUri($targetObject->getResource());
    }
696691
public function setUri($uri)
    {
        if (null === $uri) {
            $uri = 'amqp://guest:guest@localhost:5672/';
        }
        $this->uri = parse_url($uri);
        if (($this->uri['scheme'] != 'amqp' && $this->uri['scheme'] != 'amqps')) {
            throw new \UnexpectedValueException(
                sprintf(
                    'a valid URI scheme is request expected format [%s] ' .
                        'received: [%s]', 'tcp://user:pass@host:port/vhost',
                    $uri
                )
            );
        }
        if (empty($this->uri['user']) || empty($this->uri['pass'])) {
            throw new \RuntimeException(
                'AMQPLAIN Auth requires both a user and pass be specified'
            );
        }
        if ($this->uri['scheme'] === 'amqps') {
            if (!extension_loaded('openssl')) {
                throw new \RuntimeException(
                    'SSL connection attempted however openssl extension is not loaded'
                );
            }
            $ssl_context = stream_context_create();
            foreach ($this->options['ssl_options'] as $k => $v) {
                stream_context_set_option($ssl_context, 'ssl', $k, $v);
            }
        }
        return $this;
    }
410175
protected function signUrl($uri) {
        $uri = '/' . $this->account . '/' . $uri;
        $time_str = $this->hmacTime($uri);
        $sign = $this->hmacSign($uri, $time_str);
        return $uri . $time_str . '&hmac_sign=' . $sign;
    }
542527
private static function obfuscateUri($uri)
    {
        $userInfo = $uri->getUserInfo();

        if (false !== ($pos = strpos($userInfo, ':'))) {
            return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
        }

        return $uri;
    }
301139
public static function createFromString (string $uri)
    {
        $parts = parse_url($uri);
        $scheme = isset($parts['scheme']) ? $parts['scheme'] : '';
        $user = isset($parts['user']) ? $parts['user'] : '';
        $pass = isset($parts['pass']) ? $parts['pass'] : '';
        $host = isset($parts['host']) ? $parts['host'] : '';
        $port = isset($parts['port']) ? $parts['port'] : null;
        $path = isset($parts['path']) ? $parts['path'] : '';
        $query = isset($parts['query']) ? $parts['query'] : '';
        $fragment = isset($parts['fragment']) ? $parts['fragment'] : '';

        return new \Resilient\Http\Uri($scheme, $host, $port, $path, $query, $fragment, $user, $pass);
    }
486768
public function toRequestString(string $uri = ''): string
    {
        return !empty($this->raw) ? self::kvToRequestString($this->toRequestArray($uri)) : '';
    }
682560
public function createRelative($uri = null)
    {
        if (empty($uri)) {
            // Empty uri means baseurl
            return $this->baseUrl;
        } elseif (substr($uri, 0, 7) == "http://"
            || substr($uri, 0, 8) == "https://"
            || substr($uri, 0, 2) == "//"
        ) {
            // Fully qualified, just leave as is.
            return rtrim($uri, '/');
        } elseif ($uri[0] == '/') {
            // Absolute url, prepend with siteUrl
            return rtrim($this->siteUrl . rtrim($uri, '/'), '/');
        }

        $uri = rtrim($uri, '/');
        return $this->baseUrl . '/' . $uri;
    }
1217686
public static function getAbsoluteUri(string $uri = null) : string
    {
        $uri = new self($uri);

        return $uri->get(false);
    }
1236006
private function load(string $uri): Description
    {
        if ($this->cache && $description = $this->cache->get($cacheKey = bin2hex($uri))) {
            return $description;
        }

        $description = $this->factory->create($uri, $this->loader->load($uri));

        if (isset($cacheKey)) {
            $this->cache->set($cacheKey, $description);
        }

        return $description;
    }
109724
public function build($uri)
	{
		// Create the URI object
		$uri = $this->createUri($uri);

		// Process the uri information based on custom defined rules
		foreach ($this->rules['build'] as $rule)
		{
			$uri = $rule($uri);
		}

		return $uri;
	}
1374070
public function toBrandCoreStats(string $uri = ''): string
    {
        if ($this->App->Parent) { // Looking for the root core.
            return $this->App->Parent->Utils->§BrandUrl->toBrandCoreStats($uri);
        }
        return $this->toBrandStats($uri);
    }
183346
public function uriToClassName(string $uri): string 
    {
        $string_parts = explode("-", $uri);
        $string = array_map('ucfirst', $string_parts);
        $string = implode("", $string) . "Controller"; 
        return preg_replace("/[^a-zA-Z0-9\-]/", "", $string);
    }
1064977
protected function hostToAscii($uri)
    {
        static $modifier;
        if (null === $modifier) {
            $modifier = new HostToAscii();
        }

        return $modifier->process($uri);
    }
466565
protected function makeUriRelativeTo($uri, $root)
    {
        if (!$root) {
            return $uri;
        }

        if (is_array($uri)) {
            $uris = [];
            foreach ($uri as $u) {
                $uris[] = $this->makeUriRelativeTo($u, $root);
            }
            return $uris;
        }

        if (substr($uri, 0, 1) === '/' || preg_match('/^([a-zA-Z]+:\/\/|[a-zA-Z]:\/|[a-zA-Z]:\\\)/', $uri)) {
            return $uri;
        }
        return rtrim($root, '/') . "/$uri";
    }
958387
protected function addPrefixToUri($uri)
    {
        if (! isset($this->prefix)) {
            return $uri;
        }

        $uri = \trim($uri, '/');

        if (Str::startsWith($uri, $this->prefix)) {
            return $uri;
        }

        return \rtrim('/'.\trim($this->prefix, '/').'/'.$uri, '/');
    }
711387
public function sanitizeUri(string $uri): string {
        if ($uri == '') {
            throw new BadMethodCallException('URI is empty');
        }
        $baseUrl = !$this->txUrl ? $this->apiUrl : $this->txUrl;
        $uri     = preg_replace('|^/|', '', $uri);
        $uri     = preg_replace('|^https?://[^/]+/rest/?(tx:[-0-9a-zA-Z]+/)?|', '', $uri);
        $uri     = $baseUrl . '/' . $uri;
        return $uri;
    }