Builds API UrlWildcard object from given SPI UrlWildcard object.

@param \eZ\Publish\SPI\Persistence\Content\UrlWildcard $wildcard

@return \eZ\Publish\API\Repository\Values\Content\URLWildcard
357126
private function buildUrlWildcardDomainObject(SPIUrlWildcard $wildcard)
    {
        return new URLWildcard(
            array(
                'id' => $wildcard->id,
                'destinationUrl' => $wildcard->destinationUrl,
                'sourceUrl' => $wildcard->sourceUrl,
                'forward' => $wildcard->forward,
            )
        );
    }
200283
static function buildUrl($parts)
    {
        $parts = new ArrayObject($parts);

        ###################
        ### PARSE PARTS ###
        ###################

        // scheme
        $scheme = $parts->key('scheme', '', true);

        // host
        $host = $parts->key('host', '', true);

        // port
        $port = $parts->key('port', '', true);

        // path
        $path = $parts->key('path', '', true);

        // parse query string
        $query = '';
        if($parts->keyExists('query')) {
            if(self::isString($parts->key('query'))) {
                parse_str($parts->key('query'), $queryData);
            } else {
                $queryData = $parts->key('query');
            }

            if(self::isArray($queryData)) {
                $query = $queryData;
            }
        }


        ###################
        ### BUILD URL   ###
        ###################
        $url = '';

        // scheme
        if($scheme && $scheme != '') {
            $url .= $scheme . '://';
        }

        // host
        if($host && $host != '') {
            $url .= $host;
        }

        // port
        if($port != '') {
            $url .= ':' . $port;
        }

        // path
        if($path != '') {
            $url .= $path;
        }

        // query
        if(self::isArray($query)) {
            $query = http_build_query($query);
            if($query != "") {
                $url .= '?' . $query;
            }
        }

        try {
            return new UrlObject($url);
        } catch (\Exception $e) {
            throw new UrlObjectException($e->getMessage());
        }
    }
587623
public function loadUrlWildcardData($parentId)
    {
        try {
            return $this->innerGateway->loadUrlWildcardData($parentId);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
945455
protected function _wildcards($value)
    {
        if (!is_string($value)) {
            return false;
        }

        $value = $this->_formatWildcards($value);
        if ($this->getConfig('before')) {
            $value = $this->_formatWildcards($this->getConfig('wildcardAny')) . $value;
        }

        if ($this->getConfig('after')) {
            $value = $value . $this->_formatWildcards($this->getConfig('wildcardAny'));
        }

        return $value;
    }
170332
def get_wildcard_mimetype(self):
		
		mimetype = self.wildcard_mimetype
		if mimetype is None:	# class inherits from module default
			mimetype = WILDCARD_MIMETYPE
		if mimetype is None:	# module is set to None?
			mimetype = 'application/rdf+xml'
		return mimetype
423608
public static function collate($array, $key, $wildcard = null)
    {
        // If no wildcard set or the wildcard is not in the key
        if (null === $wildcard || strpos($key, $wildcard) === false) {
            return static::has($array, $key) ? [$key => static::get($array, $key)] : [];
        }

        $pattern  = '';
        $segments = explode('.', $key);
        while (($segment = array_shift($segments)) !== null) {
            // If we have run out of arrays to look into, stop looking
            if (!Arr::accessible($array)) {
                return [];
            }

            // If this segment is a wildcard
            if ($segment === $wildcard) {
                $values = [];
                foreach (array_keys($array) as $attr) {
                    $subKey = implode('.', array_merge([$attr], $segments));
                    foreach (static::collate($array, $subKey, $wildcard) as $attrKey => $value) {
                        $values[$pattern . $attrKey] = $value;
                    }
                }

                return $values;
            }
            if (Arr::exists($array, $segment)) {
                $array = $array[$segment];
            } else {
                return [];
            }

            $pattern .= $segment . '.';
        }

        return [$key => $array];
    }
53266
public static Pattern convertFileWildCardToRegx(final String wildcard)
    {
        String regex = wildcard;
        regex = regex.replaceAll("[.]", "\\\\.");
        regex = regex.replaceAll("[?]", ".");
        regex = regex.replaceAll("[*]", ".*");
        return Pattern.compile("^" + regex + "$", Pattern.CASE_INSENSITIVE);
    }
987153
private function createRegex($directiveUrlPath)
    {
        $hasMustEndWithWildcard = substr($directiveUrlPath, -1) === self::MUST_END_WITH_WILDCARD;
        if ($hasMustEndWithWildcard) {
            $directiveUrlPath = rtrim($directiveUrlPath, self::MUST_END_WITH_WILDCARD);
        }

        $directiveUrlPath = rtrim($directiveUrlPath, self::ANY_CHARACTER_WILDCARD);
        $directiveValueParts = explode(self::ANY_CHARACTER_WILDCARD, $directiveUrlPath);

        array_walk($directiveValueParts, function (&$directiveValue) {
            $directiveValue = preg_quote($directiveValue, '/');
        });

        return '/^' . implode(".*", $directiveValueParts) . ($hasMustEndWithWildcard ? '$' : '') . '/';
    }
1076778
def _make_wildcard_attr_map():
    '''
    
    '''
    _xmap = {}
    for wc in OpenflowWildcard:
        if not wc.name.endswith('All') and \
            not wc.name.endswith('Mask'):
            translated = ''
            for ch in wc.name:
                if ch.isupper():
                    translated += '_' 
                    translated += ch.lower()
                else:
                    translated += ch
            _xmap[translated] = wc
    return _xmap
269860
public static function escapeGroup($arr, $wildcard=false) {
        return implode('', array_map(function($x) use ($wildcard) {
            if(is_string($x)) {
                if($wildcard) {
                    return Util::escapeString($x);
                } else {
                    return '"' . str_replace('"', '\\"', $x) . '"';
                }
            } else if($x == Token::W_STAR) {
                return '*';
            } else if ($x == Token::W_QMARK) {
                return '?';
            }
        }, $arr));
    }
975108
public int numWildcards() {
        int numWildcards = 0;
        if (WILDCARD.equals(type())) {
            numWildcards++;
        }
        if (WILDCARD.equals(subtype())) {
            numWildcards++;
        }
        return numWildcards;
    }
335224
private function isLanguageWildcard()
    {
        return PreferenceInterface::LANGUAGE === $this->fromField
            && PreferenceInterface::PARTIAL_WILDCARD === $this->serverPref->getPrecedence();
    }
434990
public function build(IUrl $url, $encode = false) {
        $pattern = $this->pattern;
        $pattern = $this->setProtocol($pattern, $url, $encode);
        $pattern = $this->setCredentials($pattern, $url, $encode);
        $pattern = $this->setHost($pattern, $url, $encode);
        $pattern = $this->setPort($pattern, $url, $encode);
        $pattern = $this->setPath($pattern, $url, $encode);
        $pattern = $this->setQuery($pattern, $url, $encode);
        $pattern = $this->setFragment($pattern, $url, $encode);

        return $pattern;
    }
1327266
protected function deleteMatchingFiles($wildcard, $ignored = null)
    {
        if (is_array($files = $this->files->glob($wildcard)))
        {
            foreach ($files as $path)
            {
                if ( ! is_null($ignored))
                {
                    // Spin through each of the ignored assets and if the current file path ends
                    // with any of the ignored asset paths then we'll skip this asset as it
                    // needs to be kept.
                    foreach ((array) $ignored as $ignore)
                    {
                        if (ends_with($path, $ignore)) continue 2;
                    }
                }

                $this->files->delete($path);
            }
        }
        
    }
683280
public function load($id)
    {
        $row = $this->gateway->loadUrlWildcardData($id);

        if (empty($row)) {
            throw new NotFoundException('UrlWildcard', $id);
        }

        return $this->mapper->extractUrlWildcardFromRow($row);
    }
752846
private function generateUrlNode($urlsList)
    {
        $urlNode = new SplashUrlNode();
        foreach ($urlsList as $splashAction) {
            $urlNode->registerCallback($splashAction);
        }

        return $urlNode;
    }
560756
protected function wildcardPath(): string
    {
        $filename = sprintf($this->format, '*');

        return str_repeat('*' . DIRECTORY_SEPARATOR, $this->levels) . $filename;
    }