ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Counter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
26 class 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 }
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
__construct(string $type, int $number)
Definition: Counter.php:34