src/mako/http/routing/Router.php
protected function constraintFactory(string $constraint): ConstraintInterface
	{
		[$constraint, $parameters] = $this->parseFunction($constraint);

		if(!isset($this->constraints[$constraint]))
		{
			throw new RuntimeException(vsprintf('No constraint named [ %s ] has been registered.', [$constraint]));
		}

		$constraint = $this->container->get($this->constraints[$constraint], $parameters);

		return $constraint;
	}
protected function constraintFactory(string $constraint): ConstraintInterface
	{
		[$constraint, $parameters] = $this->parseFunction($constraint);

		if(!isset($this->constraints[$constraint]))
		{
			throw new RuntimeException(vsprintf('No constraint named [ %s ] has been registered.', [$constraint]));
		}

		$constraint = $this->container->get($this->constraints[$constraint], $parameters);

		return $constraint;
	}
protected function constraintFactory ( string $ constraint ) : ConstraintInterface { [ $ constraint , $ parameters ] = $ this -> parseFunction ( $ constraint ) ; if ( ! isset ( $ this -> constraints [ $ constraint ] ) ) { throw new RuntimeException ( vsprintf ( 'No constraint named [ %s ] has been registered.' , [ $ constraint ] ) ) ; } $ constraint = $ this -> container -> get ( $ this -> constraints [ $ constraint ] , $ parameters ) ; return $ constraint ; }
Constraint factory.

@param  string                                             $constraint Constraint
@throws \RuntimeException
@return \mako\http\routing\constraints\ConstraintInterface
Constraint factory .