src/InputController/HTTPController/HTTPRoute.php
protected function generatePathRegex() {
		if( $this->pathRegex ) { return; }
		$variables = array();
		$this->pathRegex = preg_replace_callback(
			'#\{([^\}]+)\}#sm',
			function($matches) use(&$variables) {
// 				debug('$matches', $matches);
				$regex = $var = null;
				static::extractVariable(str_replace('\.', '.', $matches[1]), $var, $regex);
				$variables[] = $var;
				return '('.$regex.')';
			},
			str_replace('.', '\.', $this->path)
		);
		$this->pathVariables = $variables;
	}
protected function generatePathRegex() {
		if( $this->pathRegex ) { return; }
		$variables = array();
		$this->pathRegex = preg_replace_callback(
			'#\{([^\}]+)\}#sm',
			function($matches) use(&$variables) {
// 				debug('$matches', $matches);
				$regex = $var = null;
				static::extractVariable(str_replace('\.', '.', $matches[1]), $var, $regex);
				$variables[] = $var;
				return '('.$regex.')';
			},
			str_replace('.', '\.', $this->path)
		);
		$this->pathVariables = $variables;
	}
protected function generatePathRegex ( ) { if ( $ this -> pathRegex ) { return ; } $ variables = array ( ) ; $ this -> pathRegex = preg_replace_callback ( '#\{([^\}]+)\}#sm' , function ( $ matches ) use ( & $ variables ) { // 				debug('$matches', $matches); $ regex = $ var = null ; static :: extractVariable ( str_replace ( '\.' , '.' , $ matches [ 1 ] ) , $ var , $ regex ) ; $ variables [ ] = $ var ; return '(' . $ regex . ')' ; } , str_replace ( '.' , '\.' , $ this -> path ) ) ; $ this -> pathVariables = $ variables ; }
Generate all regex of the path from extracted variables
Generate all regex of the path from extracted variables