PHP Class DOMDocumentWrapper, microweber

Afficher le fichier Open project: microweber/microweber Class Usage Examples

Méthodes publiques

Свойство Type Description
$charset
$contentType unknown_type
$data
$dataNodes
$document DOMDocument
$events
$eventsGlobal
$eventsNodes
$frames unknown_type
$id
$isDocumentFragment
$isHTML
$isXHTML
$isXML
$root DOMNode Used by documentFragments.
$uuid
$xpath

Méthodes publiques

Méthode Description
__construct ( $markup = null, $contentType = null, $newDocumentID = null )
debug ( $text )
expandEmptyTag ( $tag, $xml ) : unknown_type expandEmptyTag.
import ( $source, $sourceCharset = null ) : array
importAttr ( $value )
isDocumentFragmentHTML ( $markup )
isDocumentFragmentXHTML ( $markup )
isDocumentFragmentXML ( $markup )
load ( $markup, $contentType = null, $newDocumentID = null )
markup ( $nodes = null, $innerMarkup = false ) : string Return document markup, starting with optional $nodes as root.

Méthodes protégées

Méthode Description
afterMarkupLoad ( )
charsetAppendToHTML ( $html, $charset, $xhtml = false )
charsetAppendToXML ( $markup, $charset )
charsetFixHTML ( $markup ) Repositions meta[type=charset] at the start of head. Bypasses DOMDocument bug.
charsetFromHTML ( $markup )
charsetFromXML ( $markup )
contentTypeFromHTML ( $markup ) : array
contentTypeToArray ( $contentType )
documentCreate ( $charset, $version = '1.0' )
documentFragmentCreate ( $source, $charset = null ) : DOMDocumentWrapper Creates new document fragment.
documentFragmentToMarkup ( $fragment )
isXHTML ( $markup = null )
isXML ( $markup )
loadMarkup ( $markup )
loadMarkupHTML ( $markup, $requestedCharset = null )
loadMarkupReset ( )
loadMarkupXML ( $markup, $requestedCharset = null )
markupFixXHTML ( $markup )

Private Methods

Méthode Description
documentFragmentLoadMarkup ( $fragment, $charset, $markup = null )

Method Details

__construct() public méthode

public __construct ( $markup = null, $contentType = null, $newDocumentID = null )

afterMarkupLoad() protected méthode

protected afterMarkupLoad ( )

charsetAppendToHTML() protected méthode

protected charsetAppendToHTML ( $html, $charset, $xhtml = false )

charsetAppendToXML() protected méthode

protected charsetAppendToXML ( $markup, $charset )

charsetFixHTML() protected méthode

Repositions meta[type=charset] at the start of head. Bypasses DOMDocument bug.
protected charsetFixHTML ( $markup )

charsetFromHTML() protected méthode

protected charsetFromHTML ( $markup )

charsetFromXML() protected méthode

protected charsetFromXML ( $markup )

contentTypeFromHTML() protected méthode

protected contentTypeFromHTML ( $markup ) : array
$markup
Résultat array contentType, charset

contentTypeToArray() protected méthode

protected contentTypeToArray ( $contentType )

debug() public static méthode

public static debug ( $text )

documentCreate() protected méthode

protected documentCreate ( $charset, $version = '1.0' )

documentFragmentCreate() protected méthode

Creates new document fragment.
protected documentFragmentCreate ( $source, $charset = null ) : DOMDocumentWrapper
$source
Résultat DOMDocumentWrapper

documentFragmentToMarkup() protected méthode

protected documentFragmentToMarkup ( $fragment )

expandEmptyTag() public static méthode

expandEmptyTag.
Author: mjaque at ilkebenson dot com
public static expandEmptyTag ( $tag, $xml ) : unknown_type
$tag
$xml
Résultat unknown_type

import() public méthode

public import ( $source, $sourceCharset = null ) : array
$source
$sourceCharset
Résultat array Array of imported nodes.

importAttr() public méthode

public importAttr ( $value )

isDocumentFragmentHTML() public static méthode

public static isDocumentFragmentHTML ( $markup )

isDocumentFragmentXHTML() public static méthode

public static isDocumentFragmentXHTML ( $markup )

isDocumentFragmentXML() public static méthode

public static isDocumentFragmentXML ( $markup )

isXHTML() protected méthode

protected isXHTML ( $markup = null )

isXML() protected méthode

protected isXML ( $markup )

load() public méthode

public load ( $markup, $contentType = null, $newDocumentID = null )

loadMarkup() protected méthode

protected loadMarkup ( $markup )

loadMarkupHTML() protected méthode

protected loadMarkupHTML ( $markup, $requestedCharset = null )

loadMarkupReset() protected méthode

protected loadMarkupReset ( )

loadMarkupXML() protected méthode

protected loadMarkupXML ( $markup, $requestedCharset = null )

markup() public méthode

Return document markup, starting with optional $nodes as root.
public markup ( $nodes = null, $innerMarkup = false ) : string
$nodes DOMNode|DOMNodeList
Résultat string

markupFixXHTML() protected static méthode

protected static markupFixXHTML ( $markup )

Property Details

$charset public_oe property

public $charset

$contentType public_oe property

public unknown_type $contentType
Résultat unknown_type

$data public_oe property

public $data

$dataNodes public_oe property

public $dataNodes

$document public_oe property

public DOMDocument $document
Résultat DOMDocument

$events public_oe property

public $events

$eventsGlobal public_oe property

public $eventsGlobal

$eventsNodes public_oe property

public $eventsNodes

$frames public_oe property

public unknown_type $frames
Résultat unknown_type

$id public_oe property

public $id

$isDocumentFragment public_oe property

public $isDocumentFragment

$isHTML public_oe property

public $isHTML

$isXHTML public_oe property

public $isXHTML

$isXML public_oe property

public $isXML

$root public_oe property

Used by documentFragments.
public DOMNode $root
Résultat DOMNode

$uuid public_oe property

public $uuid

$xpath public_oe property

public $xpath