PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.26
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.26
1.10.27 1.10.26 1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 All 171 releases
woocommerce-pos / vendor_prefixed / sentry / sentry / src / Context / RuntimeContext.php

RuntimeContext.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.26, at vendor_prefixed/sentry/sentry/src/Context/RuntimeContext.php

93 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare (strict_types=1);
4 namespace WCPOS\Vendor\Sentry\Context;
5
6 /**
7 * This class stores information about the current runtime.
8 *
9 * @author Stefano Arlandini <[email protected]>
10 */
11 final class RuntimeContext
12 {
13 /**
14 * @var string The name of the runtime
15 */
16 private $name;
17 /**
18 * @var string|null The version of the runtime
19 */
20 private $version;
21 /**
22 * @var string|null The SAPI (Server API) name
23 */
24 private $sapi;
25 /**
26 * Constructor.
27 *
28 * @param string $name The name of the runtime
29 * @param string|null $version The version of the runtime
30 * @param string|null $sapi The SAPI name of the runtime
31 */
32 public function __construct(string $name, ?string $version = null, ?string $sapi = null)
33 {
34 if (\trim($name) === '') {
35 throw new \InvalidArgumentException('The $name argument cannot be an empty string.');
36 }
37 $this->name = $name;
38 $this->version = $version;
39 $this->sapi = $sapi;
40 }
41 /**
42 * Gets the name of the runtime.
43 */
44 public function getName() : string
45 {
46 return $this->name;
47 }
48 /**
49 * Sets the name of the runtime.
50 *
51 * @param string $name The name
52 */
53 public function setName(string $name) : void
54 {
55 if (\trim($name) === '') {
56 throw new \InvalidArgumentException('The $name argument cannot be an empty string.');
57 }
58 $this->name = $name;
59 }
60 /**
61 * Gets the version of the runtime.
62 */
63 public function getVersion() : ?string
64 {
65 return $this->version;
66 }
67 /**
68 * Sets the version of the runtime.
69 *
70 * @param string|null $version The version
71 */
72 public function setVersion(?string $version) : void
73 {
74 $this->version = $version;
75 }
76 /**
77 * Gets the SAPI of the runtime.
78 */
79 public function getSAPI() : ?string
80 {
81 return $this->sapi;
82 }
83 /**
84 * Sets the SAPI of the runtime.
85 *
86 * @param string|null $sapi The SAPI name
87 */
88 public function setSAPI(?string $sapi) : void
89 {
90 $this->sapi = $sapi;
91 }
92 }
93