PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / trunk
Booking for Appointments and Events Calendar – Amelia vtrunk
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / wordpress / php-mcp-schema / src / Client / Lifecycle / DTO / ClientCapabilitiesElicitation.php
ameliabooking / vendor / wordpress / php-mcp-schema / src / Client / Lifecycle / DTO Last commit date
ClientCapabilities.php 1 month ago ClientCapabilitiesElicitation.php 1 month ago ClientCapabilitiesRoots.php 1 month ago ClientCapabilitiesSampling.php 1 month ago ClientCapabilitiesTasks.php 1 month ago
ClientCapabilitiesElicitation.php
96 lines
1 <?php
2
3 declare(strict_types=1);
4
5 namespace WP\McpSchema\Client\Lifecycle\DTO;
6
7 use WP\McpSchema\Common\AbstractDataTransferObject;
8 use WP\McpSchema\Common\Traits\ValidatesRequiredFields;
9
10 /**
11 * Present if the client supports elicitation from the server.
12 *
13 * @mcp-domain Client
14 * @mcp-subdomain Lifecycle
15 * @mcp-version 2025-11-25
16 */
17 class ClientCapabilitiesElicitation extends AbstractDataTransferObject
18 {
19 use ValidatesRequiredFields;
20
21 /**
22 * @var object|null
23 */
24 protected ?object $form;
25
26 /**
27 * @var object|null
28 */
29 protected ?object $url;
30
31 /**
32 * @param object|null $form
33 * @param object|null $url
34 */
35 public function __construct(
36 ?object $form = null,
37 ?object $url = null
38 ) {
39 $this->form = $form;
40 $this->url = $url;
41 }
42
43 /**
44 * Creates an instance from an array.
45 *
46 * @param array{
47 * form?: object|null,
48 * url?: object|null
49 * } $data
50 * @phpstan-param array<string, mixed> $data
51 * @return self
52 */
53 public static function fromArray(array $data): self
54 {
55 return new self(
56 self::asObjectOrNull($data['form'] ?? null),
57 self::asObjectOrNull($data['url'] ?? null)
58 );
59 }
60
61 /**
62 * Converts the instance to an array.
63 *
64 * @return array<string, mixed>
65 */
66 public function toArray(): array
67 {
68 $result = [];
69
70 if ($this->form !== null) {
71 $result['form'] = $this->form;
72 }
73 if ($this->url !== null) {
74 $result['url'] = $this->url;
75 }
76
77 return $result;
78 }
79
80 /**
81 * @return object|null
82 */
83 public function getForm(): ?object
84 {
85 return $this->form;
86 }
87
88 /**
89 * @return object|null
90 */
91 public function getUrl(): ?object
92 {
93 return $this->url;
94 }
95 }
96