public function setContent($content)
    {
        if (!is_null($content)) {
            if ($content instanceof HtmlElementInterface) {
                $htmlElementObject = $content;
            } else {
                $htmlElementObject = new HtmlElementContent($content);
            }
            $this->getChildElementCollection()->clear();
            $this->getChildElementCollection()->add($htmlElementObject);
        }
        return $this;
    }
public function setContent($content)
    {
        if (!is_null($content)) {
            if ($content instanceof HtmlElementInterface) {
                $htmlElementObject = $content;
            } else {
                $htmlElementObject = new HtmlElementContent($content);
            }
            $this->getChildElementCollection()->clear();
            $this->getChildElementCollection()->add($htmlElementObject);
        }
        return $this;
    }
public function setContent ( $ content ) { if ( ! is_null ( $ content ) ) { if ( $ content instanceof HtmlElementInterface ) { $ htmlElementObject = $ content ; } else { $ htmlElementObject = new HtmlElementContent ( $ content ) ; } $ this -> getChildElementCollection ( ) -> clear ( ) ; $ this -> getChildElementCollection ( ) -> add ( $ htmlElementObject ) ; } return $ this ; }
set html element content, replace all child elements

@param       string      $content        html element content
@return      HtmlElementAbstract
set html element content replace all child elements