ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Counter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\UI\Implementation\Component\ComponentHelper;
25
26class Counter implements Spec
27{
28 use ComponentHelper;
29
30 private static array $types = array( self::NOVELTY, self::STATUS);
31 private string $type;
32 private int $number;
33
34 public function __construct(string $type, int $number)
35 {
36 $this->checkArgIsElement("type", $type, self::$types, "counter type");
37 $this->type = $type;
38 $this->number = $number;
39 }
40
44 public function getType(): string
45 {
46 return $this->type;
47 }
48
52 public function getNumber(): int
53 {
54 return $this->number;
55 }
56}
__construct(string $type, int $number)
Definition: Counter.php:34
getNumber()
Get the number on the counter.
Definition: Counter.php:52
getType()
Get the type of the counter.string One of the counter types.
Definition: Counter.php:44
This tags a counter object.
Definition: Counter.php:29