Finds all of the keys whose keys start with the given prefix.

@param string $prefix
772920
public function find_by_prefix($prefix) {
        $this->ensure_path_exists();
        $prefix = preg_replace('#(\*|\?|\[)#', '[$1]', $prefix);
        $files = glob($this->glob_keys_pattern($prefix), GLOB_MARK | GLOB_NOSORT);
        $return = array();
        if ($files === false) {
            return $return;
        }
        foreach ($files as $file) {
            // Trim off ".cache" from the end.
            $return[] = substr(basename($file), 0, -6);
        }
        return $return;
    }
1256862
public function addPrefix($prefix)
	{
		if (!in_array($prefix, $this->prefixes))
		{
			array_push($this->prefixes, trim($prefix));
		}

		return $this;
	}
1086403
public function setPrefix($prefix)
    {
        foreach ($this->storage as &$path) {
            $path->setPrefix((string) $prefix);
        }

        return $this;
    }
955777
protected function getConstNameToIds($prefix)
    {
        if (!isset(self::$constNameToIds[$prefix])) {
            foreach ($this->getConsts($prefix) as $const) {
                self::$constNameToIds[$prefix][$const['name']] = $const['id'];
            }
        }

        return self::$constNameToIds[$prefix];
    }
531416
public function beginsWith($prefix)
    {
        return $prefix === ''
        || mb_strpos(
            $this->contents,
            (string) $prefix,
            null,
            $this->encoding
        ) === 0;
    }
433168
public function prefix(string $prefix): Route
	{
		if(!empty($prefix))
		{
			$this->prefix .= '/' . trim($prefix, '/');
		}

		return $this;
	}
645596
public function prefix($prefix) {
		// Reset values before matching.
		$this->prefix = $this->parentPrefix;
		$this->requestPathOffset = $this->parentRequestPathOffset;
		if ($this->parentPrefixMatched) {
			$this->prefixMatched = $this->parentPrefixMatched;
		}

		if (!$this->result->hasHandler() && $this->prefixMatched) {
			$this->prefixMatched = $this->matchPartial($prefix);
		}

		$this->prefix .= $prefix;

		return $this;
	}
742134
public function setPrefix($prefix)
    {
        $this->prefix = $prefix;

        if (!empty($this->prefix)) {
            $this->prefix .= ".";
        }
    }
850237
public function setIdPrefix(string $prefix = null)
    {
        foreach ((array)$this as $element) {
            if (is_object($element)) {
                $element->setIdPrefix($prefix);
            }
        }
    }
515294
public static function checkUrlPrefix($prefix) {
        return isset(self::$prefix['check'][ $prefix ]) ? self::$prefix['check'][ $prefix ] : null;
    }
978687
public static function prefix($prefix = null)
	{
		if(null !== $prefix)
		{
			self::$prefix = $prefix;
		}
		return self::$prefix;
	}
1208823
protected function setPrefix($prefix) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        if ($len=strlen($prefix)) {
            if ($prefix[     0] == '/') throw new StrutsConfigException('Non-root module prefixes must not start with a slash "/" character, found: "'.$prefix.'"');
            if ($prefix[$len-1] != '/') throw new StrutsConfigException('Non-root module prefixes must end with a slash "/" character, found: "'.$prefix.'"');
        }
        $this->prefix = $prefix;
    }
782446
private function prefix($prefix)
    {
        if ($prefix) {
            $prefixLastChar = substr($prefix, -1);

            if ($prefixLastChar != '.' && $prefixLastChar != ':') {
                $prefix .= '.';
            }
        }

        return $prefix;
    }
458503
public function prefix($prefix = null)
	{
		if (null !== $prefix)
		{
			$this->prefix = $prefix;
		}
		return $this->prefix;
	}
1174678
private function setPrefix($prefix)
    {
        if (0 === strlen($prefix)) {
            throw new \InvalidArgumentException('Group prefix may not be empty.');
        }

        $prefix = '/'.trim($prefix, '/');

        $this->prefix = $this->hasParent() ? $this->parent->getPrefix() . $prefix : $prefix;
    }
1232407
public function prefix(string $prefix) {
        if ($this->running) {
            throw new \Error("Cannot alter routes after the server has started");
        }

        $prefix = \trim($prefix, "/");

        if ($prefix !== "") {
            $this->prefix = "/" . $prefix . $this->prefix;
        }
    }
603549
private function resolveKey($keys)
    {
        if (is_array($keys)) {
            $result = [];
            foreach ($keys as $key) {
                $result[] = $this->prefix . $key;
            }

            return $result;
        }

        return $this->prefix . $keys;
    }