PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.71
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.71
9.1.3 9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 All 222 releases
wpvr / vendor / linno / telemetry / src / Drivers / NullDriver.php

NullDriver.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.71, at vendor/linno/telemetry/src/Drivers/NullDriver.php

62 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * NullDriver — safe no-op telemetry driver
4 *
5 * Used when no telemetry driver is configured. All send operations silently
6 * succeed without transmitting data, allowing the client to remain operational.
7 *
8 * @package LinnoSDK\Telemetry\Drivers
9 * @since 1.0.0
10 */
11
12 namespace LinnoSDK\Telemetry\Drivers;
13
14 /**
15 * Class NullDriver
16 *
17 * A do-nothing driver that satisfies the DriverInterface contract without
18 * transmitting any data. The warning about a missing driver is logged by the
19 * Client before it creates a NullDriver instance.
20 *
21 * @since 1.0.0
22 */
23 class NullDriver implements DriverInterface {
24
25 /**
26 * API key placeholder — not used by this driver.
27 *
28 * @var string
29 */
30 private string $apiKey = '';
31
32 /**
33 * Always returns true (no-op send).
34 *
35 * @param string $event Event name.
36 * @param array $properties Event properties.
37 * @return bool Always true.
38 */
39 public function send( string $event, array $properties ): bool {
40 return true;
41 }
42
43 /**
44 * Accept an API key — stored but never used.
45 *
46 * @param string $apiKey The API key.
47 * @return void
48 */
49 public function setApiKey( string $apiKey ): void {
50 $this->apiKey = $apiKey;
51 }
52
53 /**
54 * Always returns null — no errors can occur in a no-op driver.
55 *
56 * @return string|null
57 */
58 public function getLastError(): ?string {
59 return null;
60 }
61 }
62