src/Qlake/Routing/Route.php
protected function createRegex($matched)
	{
		$startSlash = $matched[1] ? true : false;
		$param      = $matched[2];
		$optional   = $matched[3] ? true : false;
		$pattern    = $matched[4] ?: null;

		$pattern = $this->conditions[$param] ?: $pattern ?: '[^/]+';

		$this->paramNames[] = $param;

		if ($startSlash)
		{
			$regex = ($optional ? "(/" : '/') .'(?P<' . $param . '>' . $pattern . ')'. ($optional ? ')?' : '');
		}
		else
		{
			$regex = '(?P<' . $param . '>' . $pattern . ')'. ($optional ? '?' : '');
		}

		return $regex;
	}
protected function createRegex($matched)
	{
		$startSlash = $matched[1] ? true : false;
		$param      = $matched[2];
		$optional   = $matched[3] ? true : false;
		$pattern    = $matched[4] ?: null;

		$pattern = $this->conditions[$param] ?: $pattern ?: '[^/]+';

		$this->paramNames[] = $param;

		if ($startSlash)
		{
			$regex = ($optional ? "(/" : '/') .'(?P<' . $param . '>' . $pattern . ')'. ($optional ? ')?' : '');
		}
		else
		{
			$regex = '(?P<' . $param . '>' . $pattern . ')'. ($optional ? '?' : '');
		}

		return $regex;
	}
protected function createRegex ( $ matched ) { $ startSlash = $ matched [ 1 ] ? true : false ; $ param = $ matched [ 2 ] ; $ optional = $ matched [ 3 ] ? true : false ; $ pattern = $ matched [ 4 ] ? : null ; $ pattern = $ this -> conditions [ $ param ] ? : $ pattern ? : '[^/]+' ; $ this -> paramNames [ ] = $ param ; if ( $ startSlash ) { $ regex = ( $ optional ? "(/" : '/' ) . '(?P<' . $ param . '>' . $ pattern . ')' . ( $ optional ? ')?' : '' ) ; } else { $ regex = '(?P<' . $ param . '>' . $ pattern . ')' . ( $ optional ? '?' : '' ) ; } return $ regex ; }
Callback for creating route param names regex

@param array $matched
@return string
Callback for creating route param names regex