protected function doWriteStartElement(string $elementName)
    {
        $this->append(
                function(\DOMNode $parent) use ($elementName)
                {
                    $element = $this->doc->createElement($elementName);
                    $parent->appendChild($element);
                    array_push($this->openElements, $element);
                },
                'start element: "' . $elementName . '"'
        );
    }
protected function doWriteStartElement(string $elementName)
    {
        $this->append(
                function(\DOMNode $parent) use ($elementName)
                {
                    $element = $this->doc->createElement($elementName);
                    $parent->appendChild($element);
                    array_push($this->openElements, $element);
                },
                'start element: "' . $elementName . '"'
        );
    }
protected function doWriteStartElement ( string $ elementName ) { $ this -> append ( function ( \ DOMNode $ parent ) use ( $ elementName ) { $ element = $ this -> doc -> createElement ( $ elementName ) ; $ parent -> appendChild ( $ element ) ; array_push ( $ this -> openElements , $ element ) ; } , 'start element: "' . $ elementName . '"' ) ; }
really writes an opening tag

@param  string  $elementName
really writes an opening tag