public function setElementType($element_name, $type)
{
if ($type === static::ELEMENT_TYPE_BLOCK) {
$this->inline_elements = array_diff($this->inline_elements, array($element_name));
} else {
if ($type === static::ELEMENT_TYPE_INLINE) {
$this->inline_elements[] = $element_name;
} else {
throw new Exception\InvalidArgumentException('Unrecognized element type.');
}
}
$this->inline_elements = array_unique($this->inline_elements);
}