Note: Depending on the applied replacement rules, this method might result in an empty string.

@param string $name URL path (without domain or query parameters), in utf8 encoding
@return string A filtered path compatible with RFC 3986
427035
public function filter($name)
    {
        if (!$this->getAllowMultibyte()) {
            // Only transliterate when no multibyte support is requested
            $transliterator = $this->getTransliterator();
            if ($transliterator) {
                $name = $transliterator->toASCII($name);
            }
        }

        $name = mb_strtolower($name);
        $replacements = $this->getReplacements();

        // Unset automated removal of non-ASCII characters, and don't try to transliterate
        if ($this->getAllowMultibyte() && isset($replacements['/[^A-Za-z0-9\-]+/u'])) {
            unset($replacements['/[^A-Za-z0-9\-]+/u']);
        }

        foreach ($replacements as $regex => $replace) {
            $name = preg_replace($regex, $replace, $name);
        }

        // Multibyte URLs require percent encoding to comply to RFC 3986.
        // Without this setting, the "remove non-ASCII chars" regex takes care of that.
        if ($this->getAllowMultibyte()) {
            $name = rawurlencode($name);
        }

        return $name;
    }
420132
public function post(string $name): string {
        if (!isset($this->post[$name])) {
            return "";
        }
        return $this->post[$name];
    }
960943
protected function getViewPath($name)
    {
        $pieces = explode('/', $name);

        // dont plural if reserve word
        foreach ($pieces as $k => $value) {
            if (!in_array($value, config('generators.reserve_words'))) {
                $pieces[$k] = str_plural(snake_case($pieces[$k]));
            }
        }

        $name = implode('.', $pieces);

        //$name = implode('.', array_map('str_plural', explode('/', $name)));

        return strtolower(rtrim(ltrim($name, '.'), '.'));
    }
373088
protected function getPath($name)
	{
		$name = str_replace($this->getAppNamespace(), '', $name);

		return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php';
	}
1215827
public function get(string $name): string
    {
        $name = strtolower($name);
        return isset($this->headers[$name]) ? $this->headers[$name] : '';
    }
776366
protected function getRequestContent($name)
    {
        if (!$stub = $this->getRequestStub($name)) {
            return '';
        }

        $namespace = $this->appNs.'\Http\Requests\\'.implode('\\', $this->sectionSegmentsStudly);

        return strtr($stub, array_merge($this->getCommonReplacements(), [
            '{{namespace}}' => $namespace,
        ]));
    }
1270439
protected function getPath($name)
    {
        $name = str_replace_first($this->laravel->getNamespace(), '', $name);

        return sprintf('%s/%s/%s/%s',
            $this->laravel['path'],
            str_replace('\\', '/', $name),
            $this->convention->providersFolder(),
            'ModuleServiceProvider.php'
        );
    }
185478
protected function getTranslationName($name)
    {
        $name = $this->getRouteName($name);
        $name = array_last(explode('.', $name));

        return $name;
    }
337100
protected function getPath($name) {
		$path = [];
		$matches = null;
		preg_match('/^([^\[]+)/', $name, $matches);
		$path[] = $matches[0];
		preg_match_all('/\[([^\]]*)\]/', $name, $matches);
		$path = array_merge($path, $matches[1]);

		return $path;
	}
599818
private static function filterName( $name ) {
		if ( function_exists( 'apply_filters' ) ) {
			return (string) apply_filters( strtolower( self::HOST_NAME_KEY ), $name );
		}

		return $name;
	}
68766
protected function getHtmlName($name)
    {
        if (strpos($name, '.')) {
            $segments = explode('.', $name);
            return array_shift($segments).'['.implode('][', $segments).']';
        }

        return $name;
    }
561566
public function getFullName($name)
    {
        $prefix = $this->getPrefix();
        if (strlen($prefix) && false === strpos($name, $prefix)) {
            return $prefix . $name;
        }

        return $name;
    }
222637
public final function getHeaderLine($name): string
   {
       $key = $this->parseHeaderName($name);
       return array_key_exists($key, $this->header)
            ? implode(",", $this->header[$key])
            : "";
   }
881390
protected function _getFileName($name){

		$name = trim($name);

		$name = iconv('ISO-8859-1', 'ASCII//TRANSLIT', $name);
		$name = preg_replace('/[^a-z0-9\-:]+/i', '_', $name);
		$name = str_replace(':', '.', $name);

		if($name == ''){

			throw new CacheException('Cache-entry name cannot be empty');
		}

		return "{$name}.cache";
	}
964534
public function quoteName(string $name): string
    {
        $sql = explode('.', $name);

        $sql = array_map(function ($part) {
            return $part !== '*' ? $this->quoteNameWith . $part . $this->quoteNameWith : $part;
        }, $sql);

        $sql = implode('.', $sql);

        return $sql;
    }
1155589
private function parseReferences($name): string
    {
        if (preg_match_all('/\$\{(.*[a-z\.0-9])\}/si', $name, $results, PREG_SET_ORDER)) {
            foreach ($results as $match) {
                $replace = $match[0];
                $key = $match[1];

                // Handle using relative placement like get('db.${.default}.host');
                if (strpos($key, '.') === 0) {
                    // using relative placement
                    $key = substr($name, 0, strpos($name, $replace) - 1) . $key;
                }

                // get the value
                $value = $this->get($key);
                if ($value === null || $value === '' || $value === false) {
                    throw new InvalidArgumentException(
                        $key . ' replacement for ' . $name . ' must not be null or empty'
                    );
                }

                $name = str_replace($replace, $value, $name);
            }
        }

        return $name;
    }
812426
protected function urlize($name)
    {
        $transliterator = '\Behat\Transliterator\Transliterator';

        if (class_exists($transliterator)) {
            $name = $transliterator::transliterate($name);
            $name = $transliterator::urlize($name);
        } else {
            $name = strtolower($name);
            $name = str_replace(' ', '-', $name);
            $name = preg_replace('/([^a-z0-9\-]+)/m', '', $name);
        }

        return $name;
    }