DiDom\Document::__toString PHP Method

__toString() public method

Convert the document to its string representation.
public __toString ( ) : string
return string
    public function __toString()
    {
        return $this->type === 'xml' ? $this->xml() : $this->html();
    }

Usage Example

Beispiel #1
0
 public function testToString()
 {
     $html = $this->loadFixture('posts.html');
     $document = new Document($html, false);
     $this->assertEquals($document->html(), $document->__toString());
 }
All Usage Examples Of DiDom\Document::__toString