Overview

Namespaces

  • None
  • WPGMZA
    • Integration
    • Selector

Classes

  • AutoLoader
  • Crud
  • DOMDocument
  • DOMElement
  • Factory
  • GDPRCompliance
  • GoogleGeocoder
  • GoogleMap
  • GoogleMapsAPILoader
  • GoogleMapsLoader
  • LatLng
  • Map
  • MapsEngineDialog
  • Marker
  • ModalDialog
  • NominatimGeocodeCache
  • OLLoader
  • Plugin
  • RestAPI
  • ScriptLoader
  • Strings

Functions

  • create_marker_instance_delegate
  • create_plugin_instance
  • query_nominatim_cache
  • store_nominatim_cache
  • Overview
  • Namespace
  • Class

Class DOMDocument

Extension of PHP's native \DOMDocument, providing helpful utility functions to carry out common tasks such as read HTML with inline PHP, populate named elements, import extenral content

DOMNode
Extended by DOMDocument
Extended by WPGMZA\DOMDocument

Direct known subclasses

WPGMZA\ModalDialog
Namespace: WPGMZA
Located at class.dom-document.php
Methods summary
public
# __construct( $version = '1.0', $encoding = 'UTF-8' )

Constructor

Constructor

See

http://php.net/manual/en/class.domdocument.php

Overrides

DOMDocument::__construct()
public static
# convertUTF8ToHTMLEntities( $html )
protected
# onReady( )

Fired after construction when the Document is initialized

Fired after construction when the Document is initialized

protected
# onLoaded( )

Fired after content has been loaded

Fired after content has been loaded

public boolean
# load( string $src, integer $options = null )

Loads the specified file and evaulates nodes

Loads the specified file and evaulates nodes

Parameters

$src
The file you want to load
$options
See http://php.net/manual/en/domdocument.load.php

Returns

boolean
TRUE on success, FALSE otherwise

See

http://php.net/manual/en/domdocument.load.php

Overrides

DOMDocument::load()
public boolean
# loadPHPFile( string $src, integer $options = 0 )

Loads the specified file and parses any PHP

Loads the specified file and parses any PHP

Parameters

$src
The file you want to load
$options
See http://php.net/manual/en/domdocument.load.php

Returns

boolean
TRUE on success, FALSE otherwise
protected
# handleImport( string $subject, WPGMZA\DOMElement $node, boolean $forcePHP = false )

Handles importing the specified filename to the given node. Files with the extension .html or .html.php will be processed and imported. Files with the extension .php will be scanned for a class extending DOMDocument and imported if one is found.

Handles importing the specified filename to the given node. Files with the extension .html or .html.php will be processed and imported. Files with the extension .php will be scanned for a class extending DOMDocument and imported if one is found.

Parameters

$subject
The filename to import
$node
The target node
$forcePHP
Forces inline PHP to be processed

Throws

Exception
When the subject is a PHP file, but no classes are found
Exception
When the subject is a PHP file, but the last class found in the file is not an instance of DOMDocument
public mixed
# querySelector( string $query )

Runs a CSS selector on the element. This is equivilant to Javascripts querySelector

Runs a CSS selector on the element. This is equivilant to Javascripts querySelector

Parameters

$query
a CSS selector

Returns

mixed
The first descendant \Smart\Element that matches the selector, or NULL if there is no match
public mixed
# querySelectorAll( $query )

Runs a CSS selector on the element. This is equivilant to Javascripts querySelectorAll

Runs a CSS selector on the element. This is equivilant to Javascripts querySelectorAll

Returns

mixed
Any descendant \Smart\Element's that match the selector, or NULL if there is no match
public
# populate( mixed $src, $formatters = null )

Takes an associative array or object, and populates this element with it

Takes an associative array or object, and populates this element with it

Parameters

$src
Object or associative array
$formatters
public Smart\Element
# createErrorElement( string $message )

Utility function to create an error element

Utility function to create an error element

Parameters

$message
The error message

Returns

Smart\Element
public string
# saveInnerBody( )

This function saves only the inside of the element of this document. This is useful when you want to import a HTML document into another, but you don't want to end up with nested elements

This function saves only the inside of the element of this document. This is useful when you want to import a HTML document into another, but you don't want to end up with nested elements

Returns

string
The HTML string
Methods inherited from DOMDocument
adoptNode(), createAttribute(), createAttributeNS(), createCDATASection(), createComment(), createDocumentFragment(), createElement(), createElementNS(), createEntityReference(), createProcessingInstruction(), createTextNode(), getElementById(), getElementsByTagName(), getElementsByTagNameNS(), importNode(), loadHTML(), loadHTMLFile(), loadXML(), normalizeDocument(), registerNodeClass(), relaxNGValidate(), relaxNGValidateSource(), renameNode(), save(), saveHTML(), saveHTMLFile(), saveXML(), schemaValidate(), schemaValidateSource(), validate(), xinclude()
Methods inherited from DOMNode
C14N(), C14NFile(), appendChild(), cloneNode(), compareDocumentPosition(), getFeature(), getLineNo(), getNodePath(), getUserData(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode(), isSameNode(), isSupported(), lookupNamespaceUri(), lookupPrefix(), normalize(), removeChild(), replaceChild(), setUserData()
API documentation generated by ApiGen