-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathUserProperty.php
50 lines (43 loc) · 1.03 KB
/
UserProperty.php
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
47
48
49
50
<?php
namespace AlexWestergaard\PhpGa4;
use AlexWestergaard\PhpGa4\Helper;
/**
* UserProperty allows you to add session/client properties that is not related to individual events
* such as if they are a premium member or from a certain country perhaps.
*/
class UserProperty extends Helper\UserPropertyHelper
{
protected null|string $name;
protected null|int|float|string $value;
/**
* Set the name of the UserProperty
*
* @param string $name
*
* @return static
*/
public function setName(string $name): static
{
return parent::setName($name);
}
/**
* Set the value of the UserProperty
*
* @param int|float|string $value
*
* @return static
*/
public function setValue(int|float|string $value): static
{
$this->value = $value;
return $this;
}
public function getParams(): array
{
return ['name', 'value'];
}
public function getRequiredParams(): array
{
return ['name', 'value'];
}
}