protected function serializeCharacterClass(array $values)
	{
		$expr = '[';
		foreach ($this->getRanges($values) as list($start, $end))
		{
			$expr .= $this->serializeCharacterClassUnit($start);
			if ($end > $start)
			{
				if ($end > $start + 1)
				{
					$expr .= '-';
				}
				$expr .= $this->serializeCharacterClassUnit($end);
			}
		}
		$expr .= ']';

		return $expr;
	}
protected function serializeCharacterClass(array $values)
	{
		$expr = '[';
		foreach ($this->getRanges($values) as list($start, $end))
		{
			$expr .= $this->serializeCharacterClassUnit($start);
			if ($end > $start)
			{
				if ($end > $start + 1)
				{
					$expr .= '-';
				}
				$expr .= $this->serializeCharacterClassUnit($end);
			}
		}
		$expr .= ']';

		return $expr;
	}
protected function serializeCharacterClass ( array $ values ) { $ expr = '[' ; foreach ( $ this -> getRanges ( $ values ) as list ( $ start , $ end ) ) { $ expr .= $ this -> serializeCharacterClassUnit ( $ start ) ; if ( $ end > $ start ) { if ( $ end > $ start + 1 ) { $ expr .= '-' ; } $ expr .= $ this -> serializeCharacterClassUnit ( $ end ) ; } } $ expr .= ']' ; return $ expr ; }
Serialize a given list of values into a character class

@param  integer[] $values
@return string
Serialize a given list of values into a character class