@param string $pattern

@throws \InvalidArgumentException
519865
public function setPattern($pattern)
    {
        $pattern = $this->validator->validate($pattern);

        $this->parts = $this->parsePattern($pattern);
        $this->pattern = $pattern;
    }
884598
public function setHost($pattern)
    {
        $this->host = (string) $pattern;
        $this->compiled = null;

        return $this;
    }
924856
public function match($pattern)
    {
        if (!is_string($pattern)) {
            throw new InvalidStringException('pattern', $pattern);
        } elseif (empty($pattern)) {
            throw new InvalidNotEmptyException('pattern');
        }

        if (!is_string($this->value)) {
            throw new InvalidStringException($this->name, $this->value);
        }

        // God please sorry for this @
        $checkResult = @preg_match($pattern, $this->value);

        if ((preg_last_error() !== PREG_NO_ERROR) || ($checkResult === false)) {
            throw new InvalidRegExpPatternException('pattern', $pattern);
        }

        if ($checkResult === 0) {
            throw new StringNotMatchRegExpException($this->name, $this->value, $pattern);
        }

        return $this;
    }
974637
public function map($methods, $pattern, $handler)
    {
        if (!is_string($pattern)) {
            throw new InvalidArgumentException('Route pattern must be a string');
        }

        // Prepend parent group pattern(s)
        if ($this->routeGroups) {
            $pattern = $this->processGroups().$pattern;
        }

        // Add route
        $route = new Route($methods, $pattern, $handler, $this->routeGroups);
        $this->routes[] = $route;

        return $route;
    }
1055744
public function match($pattern) {
        if (!$this->_isValid) {
            return $this;
        }
        if (!preg_match($pattern, $this->_unsafeVar)) {
            $this->_isValid = false;
        }
        return $this;
    }
447516
public function pattern($pattern = null)
        {
            if ($pattern === null) return $this->rulePattern;

            $this->rulePattern = $pattern;

            return $this;
        }
901256
public function setPattern($name, $pattern)
    {
        if (is_array($pattern)) {
            return $this->provideHelper($this->patternName($name), $pattern);
        }

        $this->registerHelper('patterns.'.$name, $pattern);

        return $this->provideHelper($this->patternName($name), [
            'pattern',
            'patterns.'.$name,
            function ($proceed, $pattern) {
                return function () use ($proceed, $pattern) {
                    $args = func_get_args();
                    array_unshift($args, $pattern);

                    return call_user_func_array($proceed, $args);
                };
            },
        ]);
    }
1274564
public function setPattern(string $pattern)
    {
        $this->getTag()->setAttribute('pattern', $pattern);
        $this->removeValidators(PatternValidator::class);

        if ($pattern !== '') {
            $this->addValidator(new PatternValidator($pattern));
        }

        return $this;
    }
629538
public function validatePattern($pattern)
    {
        $this->validator_attributes[] = 'data-parsley-pattern="' . $pattern . '"';

        $this->validator_checks['pattern'] = (int)$pattern;

        return $this;
    }
617436
public function notName(string $pattern): self
    {
        $filter = new Iterator\FilenameFilterIterator($this->getIterator(), [], [$pattern]);

        return new self(iterator_to_array($filter));
    }
291688
public function rule($pattern)
    {
        $rewrite = $this->container->make(Rewrite::class);

        $rewrite->setPattern($pattern);

        return $this->hang($rewrite);
    }
774938
public function add($pattern)
    {
        if (is_array($pattern)) {
            $this->items += $pattern;
        } else {
            $this->items[] = $pattern;
        }
    }
48602
public function map($methods, $pattern, $callable)
	{
		$methods = (array) $methods;
		if (!is_string($pattern)) {
			throw new InvalidArgumentException('Route pattern must be a string');
		}
		
		// Prepend parent group pattern(s)
		if ($this->routeGroups) {
			$pattern = $this->processGroups() . $pattern;
		}
		
		// According to RFC methods are defined in uppercase (See RFC 7231)
		$methods = array_map("strtoupper", $methods);
		
		// Add route
		$route = $this->createRoute($methods, $pattern, $callable);
		$this->routes[$route->getIdentifier()] = $route;
		$this->routeCounter++;
		
		return $route;
	}
952508
protected function addPatternAndReplacement($pattern, $replacement)
    {
        $instance = new \stdClass();
        $instance->pattern = $pattern;
        $instance->replacement = $replacement;
        $this->patternsAndReplacements[] = $instance;
    }
875930
public function glob($pattern)
    {
        foreach (glob($pattern) as $result) {
            $this->builder->add($result);
        }
    }
66811
public void setPattern(String pattern) {
        if (pattern == null || pattern.length() <= 0) {
            throw new IllegalArgumentException(
                    "Pattern to search for can not be null or of length 0");
        }
        pattern_.text_ = pattern;
        initialize();
    }
903581
public function put(string $pattern, callable $callback)
    {
        if ($this->requestMethod === "PUT") {
            $this->mapRoute($pattern, $callback);
        }
    }