-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathQueryAXTreeResponse.php
More file actions
46 lines (40 loc) · 956 Bytes
/
QueryAXTreeResponse.php
File metadata and controls
46 lines (40 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace ChromeDevtoolsProtocol\Model\Accessibility;
/**
* Response to Accessibility.queryAXTree command.
*
* @generated This file has been auto-generated, do not edit.
*
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
*/
final class QueryAXTreeResponse implements \JsonSerializable
{
/**
* A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility.
*
* @var AXNode[]
*/
public $nodes;
public static function fromJson($data)
{
$instance = new static();
if (isset($data->nodes)) {
$instance->nodes = [];
foreach ($data->nodes as $item) {
$instance->nodes[] = AXNode::fromJson($item);
}
}
return $instance;
}
public function jsonSerialize(): mixed
{
$data = new \stdClass();
if ($this->nodes !== null) {
$data->nodes = [];
foreach ($this->nodes as $item) {
$data->nodes[] = $item->jsonSerialize();
}
}
return $data;
}
}