Pop\Dom\Dom::getDoctype PHP 메소드

getDoctype() 공개 메소드

Method to return the document type.
public getDoctype ( ) : string
리턴 string
    public function getDoctype()
    {
        return str_replace('[{charset}]', $this->charset, Dom::$doctypes[$this->doctype]);
    }

Usage Example

예제 #1
0
 public function testSetAndGetDoctype()
 {
     $d = new Dom(Dom::XHTML11);
     $d->setDoctype(Dom::ATOM);
     $this->assertContains('<?xml version="1.0"', $d->getDoctype());
     $d->setDoctype(Dom::RSS);
     $this->assertContains('<?xml version="1.0"', $d->getDoctype());
     $d->setDoctype(Dom::XML);
     $this->assertContains('<?xml version="1.0"', $d->getDoctype());
 }