public function QueryPath::writeHTML in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::writeHTML()
- 7.2 QueryPath/QueryPath.php \QueryPath::writeHTML()
File
- QueryPath/
QueryPath.php, line 1394
Class
Code
public function writeHTML($path = NULL) {
if ($path == NULL) {
print $this->document
->saveHTML();
}
else {
try {
set_error_handler(array(
'QueryPathParseException',
'initializeFromError',
));
$this->document
->saveHTMLFile($path);
} catch (Exception $e) {
restore_error_handler();
throw $e;
}
restore_error_handler();
}
return $this;
}