public function save($filepath = '')
    {
        $string = $this->innerHtml();
        if ($filepath !== '') {
            file_put_contents($filepath, $string, LOCK_EX);
        }

        return $string;
    }
public function save($filepath = '')
    {
        $string = $this->innerHtml();
        if ($filepath !== '') {
            file_put_contents($filepath, $string, LOCK_EX);
        }

        return $string;
    }
public function save ( $ filepath = '' ) { $ string = $ this -> innerHtml ( ) ; if ( $ filepath !== '' ) { file_put_contents ( $ filepath , $ string , LOCK_EX ) ; } return $ string ; }
Save dom as string

@param string $filepath

@return string
Save dom as string