There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: hasProperty, p, properties, property
Loading history...
19
{
20
/**
21
* @var string|null
22
*/
23
private $link;
24
25
/**
26
* @var DateTimeInterface|null
27
*/
28
private $ts;
29
30
/**
31
* @var string|null
32
*/
33
private $ip;
34
35
/**
36
* @param string|null $linkId The link id.
37
* @return self
38
*/
39
public function setLink(?string $linkId)
40
{
41
$this->link = $linkId;
42
return $this;
43
}
44
45
/**
46
* @return string
47
*/
48
public function link(): ?string
49
{
50
return $this->link;
51
}
52
53
/**
54
* @param null|string|DateTimeInterface $ts The "timestamp" datetime value.
55
* @throws InvalidArgumentException If the timestamp is not a valid datetime value.
56
* @return self
57
*/
58
public function setTs($ts)
59
{
60
if ($ts === null) {
61
$this->ts = null;
62
return $this;
63
}
64
65
if (is_string($ts)) {
66
try {
67
$ts = new DateTime($ts);
68
} catch (Exception $e) {
69
throw new InvalidArgumentException($e->getMessage());
70
}
71
}
72
73
if (!($ts instanceof DateTimeInterface)) {
74
throw new InvalidArgumentException(
75
'Invalid "Send Date" value. Must be a date/time string or a DateTime object.'