public function setConvertors(array $convertors)
	{
		$this->callbacks  = [];
		$this->matchGroup = [];
		$this->groups     = [];
		$this->regexps    = [];
		foreach ($convertors as $convertor)
		{
			$this->addConvertor($convertor);
		}

		// Sort regexps by length to keep their order consistent
		$this->sortRegexps();

		// Add regexp groups
		foreach ($this->groups as $group => $captures)
		{
			sort($captures);
			$this->regexps[$group] = '(?<' . $group . '>' . implode('|', $captures) . ')';
		}

		$this->regexp = '(^(?:' . implode('|', $this->regexps) . ')$)';
	}
public function setConvertors(array $convertors)
	{
		$this->callbacks  = [];
		$this->matchGroup = [];
		$this->groups     = [];
		$this->regexps    = [];
		foreach ($convertors as $convertor)
		{
			$this->addConvertor($convertor);
		}

		// Sort regexps by length to keep their order consistent
		$this->sortRegexps();

		// Add regexp groups
		foreach ($this->groups as $group => $captures)
		{
			sort($captures);
			$this->regexps[$group] = '(?<' . $group . '>' . implode('|', $captures) . ')';
		}

		$this->regexp = '(^(?:' . implode('|', $this->regexps) . ')$)';
	}
public function setConvertors ( array $ convertors ) { $ this -> callbacks = [ ] ; $ this -> matchGroup = [ ] ; $ this -> groups = [ ] ; $ this -> regexps = [ ] ; foreach ( $ convertors as $ convertor ) { $ this -> addConvertor ( $ convertor ) ; } // Sort regexps by length to keep their order consistent $ this -> sortRegexps ( ) ; // Add regexp groups foreach ( $ this -> groups as $ group => $ captures ) { sort ( $ captures ) ; $ this -> regexps [ $ group ] = '(?<' . $ group . '>' . implode ( '|' , $ captures ) . ')' ; } $ this -> regexp = '(^(?:' . implode ( '|' , $ this -> regexps ) . ')$)' ; }
Set the list of convertors used by this instance

@param  AbstractConvertor[] $convertors
@return void
Set the list of convertors used by this instance