BASE . LOG, 'log_file_id' => $LOG_FILE_ID, 'log_per_date' => true, ]); // define a list of from to color sets for conversion test $PAGE_NAME = 'TEST CLASS: HTML BUILD'; print ""; print "
" . htmlentities($el->buildHtml()) . ""; $el_o = new Element('div', 'u-id', '', ['base', 'cool']); $el_o_1 = new Element('span', 's-id-1', 'Span A', ['bold']); $el_o_2 = new Element('span', 's-id-2', 'Span B'); $el_o_3 = new Element('a', 'link-a', 'Title', ['l-highlight'], ['OnClick' => 'Foo();']); $el_o_2->addSub($el_o_3); $el_o->addSub($el_o_1, $el_o_2); $el_o_1->addCss('italic', 'green', 'italic', 'font-large') ->removeCss('green'); $el_o_2->addCss('wrong-css') ->removeCss('wrong-css', 'correct-css'); $el_o_2->addCss('a', 'b')->removeCss('correct-css'); $el_o_1->addSub($el_o_2); // var_dump($el2); $el_o_list = []; $el_o_list[] = new Element('foo', 'foo-A'); $el_o_list[] = new Element('bar', 'foo-B'); $el_o_list[] = new Element('baz', 'foo-C'); $el_o_list[] = new Element('br'); $el_o_list[] = new Element('input', 'tag', '', [], ['name' => 'foo', 'value' => 'ABC']); // $el2->resetSub(); // var_dump($el2); echo "
" . print_r($el_o, true) . ""; echo "
" . htmlentities($el_o->buildHtml()) . ""; /* echo "
" . htmlentities($el_o::printHtmlFromObject($el_o, true)) . ""; */ echo "
" . htmlentities($el_o::buildHtmlFromList($el_o_list, true)) . ""; echo "
" . htmlentities($el_s->buildHtml()) . ""; $el_s_2 = new Element('div', 'id-s', 'Self', []); $el_s_2->addSub( new Element('span', 's-1', 's 1'), new Element('span', 's-2', 's 2'), ); $el_s_3 = new Element('div', 'id-3', 'ID 3'); try { $el_s_3->addSub($el_s_2); $el_s_2->addSub($el_s_2); } catch (HtmlBuilderExcpetion $e) { print "E: " . $e->getMessage() . " | " . $e->getTraceAsString() . "
" . var_export($el_s_3, true) . ""; print "el_s_3, buildHtml():
" . htmlentities($el_s_3->buildHtml()) . ""; echo "
" . print_r(Error::getMessages(), true) . ""; print "Warning: " . Support::printToString(Error::hasWarning()) . "
" . print_r(Error::getMessages(), true) . ""; print "Warning: " . Support::printToString(Error::hasWarning()) . "