Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

Copyright 2010-2017 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Copyright: 2010-2017 Horde LLC
License: http://www.horde.org/licenses/lgpl21 LGPL 2.1
File Size: 341 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Domhtml:: (12 methods):
  __construct()
  getHead()
  getBody()
  returnHtml()
  returnBody()
  getCharset()
  _loadHTML()
  current()
  key()
  next()
  rewind()
  valid()


Class: Horde_Domhtml  - X-Ref

Parse DOM data from HTML strings.

__construct($text, $charset = null)   X-Ref
Constructor.

param: string $text     The text of the HTML document.
param: string $charset  The charset of the HTML document.

getHead()   X-Ref
Returns the HEAD element, or creates one if it doesn't exist.

return: DOMElement  HEAD element.

getBody()   X-Ref
Returns the BODY element, or creates one if it doesn't exist.

return: DOMElement  BODY element.

returnHtml(array $opts = array()   X-Ref
Returns the full HTML text in the original charset.

param: array $opts  Additional options: (since 2.1.0)
return: string  HTML text.

returnBody()   X-Ref
Returns the body text in the original charset.

return: string  HTML text.

getCharset()   X-Ref
Get the charset of the DOM data.

return: string  Charset of DOM data.

_loadHTML($html)   X-Ref
Loads the HTML data.

param: string $html  HTML data.

current()   X-Ref
No description

key()   X-Ref
No description

next()   X-Ref
No description

rewind()   X-Ref
No description

valid()   X-Ref
No description