/** * Enter description here... * @TODO force html result * * @param null $callback1 * @param null $callback2 * @param null $callback3 * @return String */ public function htmlOuter($callback1 = null, $callback2 = null, $callback3 = null) { $markup = $this->documentWrapper->markup($this->elements); // pass thou callbacks $args = func_get_args(); foreach ($args as $callback) { $markup = PhpQuery::callbackRun($callback, array($markup)); } return $markup; }
} require_once __DIR__ . '/../../Dom/DOMDocumentWrapper.php'; PhpQuery::$debug = 2; /* ENCODINGS */ //print '<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-2">'; print '<meta http-equiv="Content-Type" content="text/html;charset=utf-8">'; /* HTML */ //$htmlIso = new DOMDocumentWrapper( // file_get_contents('document-types/document-iso88592.html') //); //$htmlIsoNoCharset = new DOMDocumentWrapper( // file_get_contents('document-types/document-iso88592-nocharset.html'), // 'text/html;charset=iso-8859-2' //); $htmlUtf = new DOMDocumentWrapper(file_get_contents('document-types/document-utf8.html')); var_dump($htmlUtf->markup()); //$htmlUtfNoCharset = new DOMDocumentWrapper( // file_get_contents('document-types/document-utf8-nocharset.html'), // 'text/html;charset=utf-8' //); //print htmlspecialchars($htmlIso->markup( // $htmlIso->document->getElementsByTagName('span')) //); //print htmlspecialchars($htmlIsoNoCharset->markup( // $htmlIsoNoCharset->document->getElementsByTagName('p')) //); //print htmlspecialchars($htmlUtf->markup()); //print htmlspecialchars($htmlUtfNoCharset->markup()); /* XML */ //$xmlIso = new DOMDocumentWrapper( // file_get_contents('document-types/document-iso88592.xml')