Documentation

AHQ
in package

AHQ: ArrayHtml Query

These are helper functions for searching/digesting a form presented in in ArrayHtml format (shallow or deep).

Table of Contents

Methods

getProps()  : array<string|int, mixed>
Returns all the real properties of a collection, filtering out any array keys that start with a hashtag
getTags()  : array<string|int, mixed>
Returns all tags with a certain tag name, e.g. 'af-entity'
makeRoot()  : array<string|int, mixed>
Given a list of would-be child nodes, combine them under a common root.

Methods

getProps()

Returns all the real properties of a collection, filtering out any array keys that start with a hashtag

public static getProps(array<string|int, mixed>|string $element) : array<string|int, mixed>
Parameters
$element : array<string|int, mixed>|string

The ArrayHtml representation of a document/fragment.

Return values
array<string|int, mixed>

getTags()

Returns all tags with a certain tag name, e.g. 'af-entity'

public static getTags(array<string|int, mixed>|string $element, string $tagName) : array<string|int, mixed>
Parameters
$element : array<string|int, mixed>|string

The ArrayHtml representation of a document/fragment.

$tagName : string
Return values
array<string|int, mixed>

makeRoot()

Given a list of would-be child nodes, combine them under a common root.

public static makeRoot(array<string|int, mixed> $children[, string $tag = 'placeholder' ]) : array<string|int, mixed>
Parameters
$children : array<string|int, mixed>
$tag : string = 'placeholder'
Return values
array<string|int, mixed>

        
On this page

Search results