Since $counter is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $counter to at least protected.
Loading history...
23
}
24
25
134
return $this->id;
26
}
27
28
/**
29
* Set the Id of the widget.
30
*
31
* @param string $value
32
*
33
* @return $this
34
*/
35
1
public function withId(string $value): self
36
{
37
1
$new = clone $this;
38
1
$new->id = $value;
39
40
1
return $new;
41
}
42
43
/**
44
* Counter used to generate {@see id} for widgets.
45
*
46
* @param int $value
47
*/
48
127
public static function counter(int $value): void
49
{
50
127
self::$counter = $value;
51
127
}
52
53
/**
54
* The prefix to the automatically generated widget IDs.
55
*
56
* @param string $value
57
*
58
* @return $this
59
*
60
* {@see getId()}
61
*/
62
1
public function withAutoIdPrefix(string $value): self