phpQuery

# Class: DOMDocumentWrapper Source Location: /DOMDocumentWrapper.php
### Class Overview
DOMDocumentWrapper class simplifies work with DOMDocument. #### Author(s): Tobiasz Cudnik <tobiasz.cudnik/gmail.com> | ### Variables $charset $contentType $document $events $eventsGlobal $eventsNodes $frames $id $isDocumentFragment $isHTML $isXHTML $isXML $root $xpath | ### Methods __construct afterMarkupLoad charsetAppendToHTML charsetAppendToXML charsetFromHTML charsetFromXML contentTypeFromHTML contentTypeToArray debug documentCreate documentFragmentCreate documentFragmentToMarkup expandEmptyTag import importAttr isDocumentFragmentHTML isDocumentFragmentXHTML isDocumentFragmentXML isXHTML isXML load loadMarkup loadMarkupHTML loadMarkupReset loadMarkupXML markup markupFixXHTML
### Class Details [line 12] DOMDocumentWrapper class simplifies work with DOMDocument. Know bug: in XHTML fragments, changes to #### Tags:
author: | Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
todo: | check XML catalogs compatibility
[ Top ] ### Class Variables #### $charset = [line 43] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $contentType = '' [line 22] #### Tags:
todo: | Rewrite as method and quess if null.
access: | public
Type: | unknown_type
[ Top ] #### $document = [line 16] #### Tags:
access: | public
Type: | DOMDocument
[ Top ] #### $events = array() [line 24] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $eventsGlobal = array() [line 26] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $eventsNodes = array() [line 25] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $frames = array() [line 31] TODO #### Tags:
access: | public
Type: | unknown_type
[ Top ] #### $id = [line 17] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $isDocumentFragment = null [line 39] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $isHTML = false [line 42] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $isXHTML = false [line 41] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $isXML = false [line 40] #### Tags:
access: | public
Type: | mixed
[ Top ] #### $root = [line 38] Document root, by default equals to document itself. Used by documentFragments. #### Tags:
access: | public
Type: | DOMNode
[ Top ] #### $xpath = [line 23] #### Tags:
access: | public
Type: | mixed
[ Top ] ### Class Methods ### static method debug [line 556]
`static void debug( $text)`
#### Tags:
access: | public
#### Parameters:
| $text |
[ Top ] ### static method expandEmptyTag [line 568]
`static unknown_type expandEmptyTag( $tag $tag, $xml $xml)`
expandEmptyTag #### Tags:
author: | mjaque at ilkebenson dot com
link: | http://pl2.php.net/manual/en/domdocument.savehtml.php#81256
access: | public
#### Parameters:
$tag | $tag |
$xml | $xml |
[ Top ] ### static method isDocumentFragmentHTML [line 344]
`static void isDocumentFragmentHTML( $markup)`
#### Tags:
access: | public
#### Parameters:
| $markup |
[ Top ] ### static method isDocumentFragmentXHTML [line 350]
`static void isDocumentFragmentXHTML( $markup)`
#### Tags:
access: | public
#### Parameters:
| $markup |
[ Top ] ### static method isDocumentFragmentXML [line 347]
`static void isDocumentFragmentXML( $markup)`
#### Tags:
access: | public
#### Parameters:
| $markup |
[ Top ] ### static method markupFixXHTML [line 550]
`static void markupFixXHTML( $markup)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### constructor __construct [line 44]
`DOMDocumentWrapper __construct( [ $markup = null], [ $contentType = null], [ $newDocumentID = null])`
#### Tags:
access: | public
#### Parameters:
| $markup |
| $contentType |
| $newDocumentID |
[ Top ] ### method afterMarkupLoad [line 64]
`void afterMarkupLoad( )`
#### Tags:
access: | protected
[ Top ] ### method charsetAppendToHTML [line 317]
`void charsetAppendToHTML( $html, $charset, [ $xhtml = false])`
#### Tags:
access: | protected
#### Parameters:
| $html |
| $charset |
| $xhtml |
[ Top ] ### method charsetAppendToXML [line 340]
`void charsetAppendToXML( $markup, $charset)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
| $charset |
[ Top ] ### method charsetFromHTML [line 303]
`void charsetFromHTML( $markup)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### method charsetFromXML [line 307]
`void charsetFromXML( $markup)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### method contentTypeFromHTML [line 289]
`array contentTypeFromHTML( $markup $markup)`
#### Tags:
return: | contentType, charset
access: | protected
#### Parameters:
$markup | $markup |
[ Top ] ### method contentTypeToArray [line 272]
`void contentTypeToArray( $contentType)`
#### Tags:
access: | protected
#### Parameters:
| $contentType |
[ Top ] ### method documentCreate [line 107]
`void documentCreate( $charset, [ $version = '1.0'])`
#### Tags:
access: | protected
#### Parameters:
| $charset |
| $version |
[ Top ] ### method documentFragmentCreate [line 389]
`DOMDocumentWrapper documentFragmentCreate( $source $source, [ $charset = null])`
Creates new document fragment. #### Tags:
access: | protected
#### Parameters:
$source | $source |
| $charset |
[ Top ] ### method documentFragmentToMarkup [line 459]
`void documentFragmentToMarkup( $fragment)`
#### Tags:
access: | protected
#### Parameters:
| $fragment |
[ Top ] ### method import [line 363]
`array import( $source $source, [$target $sourceCharset = null], $sourceCharset 2)`
#### Tags:
return: | Array of imported nodes.
access: | public
#### Parameters:
$sourceCharset | 2 |
$source | $source |
$target | $sourceCharset |
[ Top ] ### method importAttr [line 353]
`void importAttr( $value)`
#### Tags:
access: | public
#### Parameters:
| $value |
[ Top ] ### method isXHTML [line 257]
`void isXHTML( [ $markup = null])`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### method isXML [line 268]
`void isXML( $markup)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### method load [line 48]
`void load( $markup, [ $contentType = null], [ $newDocumentID = null])`
#### Tags:
access: | public
#### Parameters:
| $markup |
| $contentType |
| $newDocumentID |
[ Top ] ### method loadMarkup [line 69]
`void loadMarkup( $markup)`
#### Tags:
access: | protected
#### Parameters:
| $markup |
[ Top ] ### method loadMarkupHTML [line 119]
`void loadMarkupHTML( $markup, [ $requestedCharset = null])`
#### Tags:
access: | protected
#### Parameters:
| $markup |
| $requestedCharset |
[ Top ] ### method loadMarkupReset [line 104]
`void loadMarkupReset( )`
#### Tags:
access: | protected
[ Top ] ### method loadMarkupXML [line 165]
`void loadMarkupXML( $markup, [ $requestedCharset = null])`
#### Tags:
access: | protected
#### Parameters:
| $markup |
| $requestedCharset |
[ Top ] ### method markup [line 486]
`string markup( [$node $nodes = null], [ $innerMarkup = false])`
Return document markup, starting with optional $node as root. #### Tags:
access: | public
#### Parameters:
$node | $nodes | DOMNode|DOMNodeList
| $innerMarkup |
[ Top ] Documentation generated on Tue, 18 Nov 2008 19:39:24 +0100 by phpDocumentor 1.4.2