Dodo
DOm DOcument implementation
Loading...
Searching...
No Matches
Wikimedia\Dodo\Internal\Zest Class Reference

Our own customized Zest instance. More...

Static Public Member Functions

static array< Elementfind (string $sel, $context)
 Find elements matching a CSS selector underneath $context.
 
static bool matches ( $el, string $sel)
 Determine whether an element matches the given selector.
 
static array< ElementgetElementsById ( $context, string $id)
 Get descendants by ID.
 
static array< ElementgetElementsByTagName ( $context, string $tagName)
 Get descendants by tag name.
 

Detailed Description

Our own customized Zest instance.

Member Function Documentation

◆ find()

static array< Element > Wikimedia\Dodo\Internal\Zest::find ( string $sel,
$context )
static

Find elements matching a CSS selector underneath $context.

Parameters
string$selThe CSS selector string
ParentNode$contextThe scoping root for the search
Returns
array<Element> Elements matching the CSS selector

◆ getElementsById()

static array< Element > Wikimedia\Dodo\Internal\Zest::getElementsById ( $context,
string $id )
static

Get descendants by ID.

The PHP DOM doesn't provide this method for DOMElement, and the implementation in DOMDocument is broken.

Parameters
ParentNode$contextThe scoping root for the search
string$id
Returns
array<Element> A list of the elements with the given ID.

◆ getElementsByTagName()

static array< Element > Wikimedia\Dodo\Internal\Zest::getElementsByTagName ( $context,
string $tagName )
static

Get descendants by tag name.

Parameters
ParentNode$context
string$tagName
Returns
array<Element>

◆ matches()

static bool Wikimedia\Dodo\Internal\Zest::matches ( $el,
string $sel )
static

Determine whether an element matches the given selector.

Parameters
Element$elThe element to be tested
string$selThe CSS selector string
Returns
bool True iff the element matches the selector

The documentation for this class was generated from the following file: