protected function addConvertor(AbstractConvertor $convertor)
	{
		foreach ($convertor->getRegexpGroups() as $name => $group)
		{
			$this->matchGroup[$name] = $group;
			$this->groups[$group][]  = '(?&' . $name . ')';
		}

		foreach ($convertor->getRegexps() as $name => $regexp)
		{
			$regexp = $this->insertCaptureNames($name, $regexp);
			$regexp = str_replace(' ', '\\s*', $regexp);
			$regexp = '(?<' . $name . '>' . $regexp . ')';

			$this->callbacks[$name] = [$convertor, 'convert' . $name];
			$this->regexps[$name]   = $regexp;
		}
	}
protected function addConvertor(AbstractConvertor $convertor)
	{
		foreach ($convertor->getRegexpGroups() as $name => $group)
		{
			$this->matchGroup[$name] = $group;
			$this->groups[$group][]  = '(?&' . $name . ')';
		}

		foreach ($convertor->getRegexps() as $name => $regexp)
		{
			$regexp = $this->insertCaptureNames($name, $regexp);
			$regexp = str_replace(' ', '\\s*', $regexp);
			$regexp = '(?<' . $name . '>' . $regexp . ')';

			$this->callbacks[$name] = [$convertor, 'convert' . $name];
			$this->regexps[$name]   = $regexp;
		}
	}
protected function addConvertor ( AbstractConvertor $ convertor ) { foreach ( $ convertor -> getRegexpGroups ( ) as $ name => $ group ) { $ this -> matchGroup [ $ name ] = $ group ; $ this -> groups [ $ group ] [ ] = '(?&' . $ name . ')' ; } foreach ( $ convertor -> getRegexps ( ) as $ name => $ regexp ) { $ regexp = $ this -> insertCaptureNames ( $ name , $ regexp ) ; $ regexp = str_replace ( ' ' , '\\s*' , $ regexp ) ; $ regexp = '(?<' . $ name . '>' . $ regexp . ')' ; $ this -> callbacks [ $ name ] = [ $ convertor , 'convert' . $ name ] ; $ this -> regexps [ $ name ] = $ regexp ; } }
Add a convertor to the list used by this instance

@param  AbstractConvertor $convertor
@return void
Add a convertor to the list used by this instance