public function setTitle($title)
    {
        $t = $this->dom->getElementsByTagName('title')->item(0);
        if ($t == null) {
            $t = $this->dom->createElement('title');
            $this->getHeadNode()->appendChild($t);
        }
        $t->nodeValue = htmlspecialchars($title);
    }
public function setTitle($title)
    {
        $t = $this->dom->getElementsByTagName('title')->item(0);
        if ($t == null) {
            $t = $this->dom->createElement('title');
            $this->getHeadNode()->appendChild($t);
        }
        $t->nodeValue = htmlspecialchars($title);
    }
public function setTitle ( $ title ) { $ t = $ this -> dom -> getElementsByTagName ( 'title' ) -> item ( 0 ) ; if ( $ t == null ) { $ t = $ this -> dom -> createElement ( 'title' ) ; $ this -> getHeadNode ( ) -> appendChild ( $ t ) ; } $ t -> nodeValue = htmlspecialchars ( $ title ) ; }
Sets the page title of the HTML document

@param string $title
Sets the page title of the HTML document