Set the prefix for all future URLs, used mainly internally.
@param  string    $prefix the prefix to prepend
@return self
428880
public function setPrefix(string $prefix) : RouterInterface {
        $prefix = trim($prefix, '/');
        $this->prefix = $prefix.(strlen($prefix) ? '/' : '');
        return $this;
    }
433168
public function prefix(string $prefix): Route
	{
		if(!empty($prefix))
		{
			$this->prefix .= '/' . trim($prefix, '/');
		}

		return $this;
	}
1191319
protected function getPathBuilder($prefix)
    {
        return function ($value) use (&$prefix) {
            $prefix .= static::SEP_MAJOR . $this->fixString($value);
            return $prefix;
        };
    }
841744
public function addPrefix($prefix, $paths)
    {
        if (!$prefix) {
            foreach ((array) $paths as $path) {
                $this->fallbackDirs[] = $path;
            }

            return;
        }
        if (isset($this->prefixes[$prefix])) {
            $this->prefixes[$prefix] = array_merge(
                $this->prefixes[$prefix],
                (array) $paths
            );
        } else {
            $this->prefixes[$prefix] = (array) $paths;
        }
    }
1036186
public function addPrefixPath($prefix, $path, $prepend = true)
    {
        if ($prepend) {
            $this->_dirs = array($prefix => $path) + $this->_dirs;
        } else {
            $this->_dirs[$prefix] = $path;
        }

        if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
            $this->_loader->addOverloaders([$prefix]);
        } else {
            $this->_loader->addPrefixPath($prefix, $path, $prepend);
        }

        return $this;
    }
514377
public static function autoPrefixUrl($url, $prefix = null) {
		if ($prefix === null) {
			$prefix = 'http://';
		}

		$pos = strpos($url, '.');
		if ($pos !== false) {
			if (strpos(substr($url, 0, $pos), '//') === false) {
				$url = $prefix . $url;
			}
		}
		return $url;
	}
901718
public function titlize($prefix = '-') 
    {
        //argument 1 must be a string
        Eden_String_Argument::i()->test(1, 'string');

        $this->data = ucwords(str_replace($prefix, ' ', $this->data));

        return $this;
    }
343796
public function withNameAndConstraintsPrefixedBy(string $prefix) : Table
    {
        if ($prefix === '') {
            return $this;
        }

        $indexes = [];
        foreach ($this->indexes as $index) {
            $indexes[] = $index->withNamePrefixedBy($prefix);
        }

        $foreignKeys = [];
        foreach ($this->foreignKeys as $foreignKey) {
            $foreignKeys[] = $foreignKey->withNamePrefixedBy($prefix);
        }

        return new self(
            $prefix . $this->name,
            $this->columns,
            $indexes,
            $foreignKeys
        );
    }
369155
public function prefix($prefix)
    {
        $uri = rtrim($prefix, '/').'/'.ltrim($this->uri, '/');

        $this->uri = trim($uri, '/');

        return $this;
    }
1047867
final public function prefix($prefix)
    {
        if (\is_array($prefix)) {
            if (null === $this->parentPrefixes) {
                // no-op
            } elseif ($missing = array_diff_key($this->parentPrefixes, $prefix)) {
                throw new \LogicException(sprintf('Collection "%s" is missing prefixes for locale(s) "%s".', $this->name, implode('", "', array_keys($missing))));
            } else {
                foreach ($prefix as $locale => $localePrefix) {
                    if (!isset($this->parentPrefixes[$locale])) {
                        throw new \LogicException(sprintf('Collection "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $this->name, $locale));
                    }

                    $prefix[$locale] = $this->parentPrefixes[$locale].$localePrefix;
                }
            }
            $this->prefixes = $prefix;
            $this->route->setPath('/');
        } else {
            $this->prefixes = null;
            $this->route->setPath($prefix);
        }

        return $this;
    }
692514
protected function buildUrl(string $prefix): string
    {
        return $this->isSubUrl ? $prefix . $this->value : $this->value;
    }
988749
public function setPrefix(int $prefix) : self
    {
        $this->prefix = $prefix;

        if ($this instanceof ConsoleOutput) {
            $this->getErrorOutput()->setPrefix($prefix);
        }

        return $this;
    }
1361567
public function setPrefix($prefix)
    {
        if (!$this->checker->setString($prefix)->getString()) {
            throw ServerException::forInvalidPrefix($prefix, 'The path is expected to be a string. Got: %s');
        }

        if (!$this->checker->isValidAbsolutePath()) {
            throw ServerException::forInvalidPrefix(
                $prefix,
                'The path is expected to be absolute and an existing directory. Got: %s'
            );
        }

        $this->prefix = $prefix;

        return $this;
    }
783731
protected function getCurrentUrl($prefix = '/')
    {
        //$url = substr(request()->url(), strlen(config('app.url')));
        // prefix (request can be http://xx and app.url is https)
        $url = request()->path();
        $url = $prefix . ltrim($url, $prefix);

        return $url;
    }
833858
public function setPathPrefix($prefix)
    {
        parent::setPathPrefix($prefix);
        if (null === $this->pathPrefix) {
            $this->pathPrefix = $this->pathSeparator;
        }
    }
1354662
public function setPrefix($prefix)
    {
        $this->publishedIOService->setPrefix($prefix);
        $this->draftIOService->setPrefix($prefix);
    }
35644
public function removePrefixPath($prefix, $path = null)
    {
        $this->_loader->removePrefixPath($prefix, $path);

        return $this;
    }