($e->innertext)Read or write the inner HTML text of element. may be this gonna work.. :)
foreach($html->find("div.class1") as $element) {
$element->innertext = '<div class="extra"></div>' . $element->innertext;
$element->class = "class1 another_class";
}