ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilICalItem.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
25 abstract class ilICalItem
26 {
27  protected string $name = '';
28  protected string $value = '';
29  protected array $items = [];
30 
31  public function __construct(string $a_name, string $a_value = '')
32  {
33  $this->name = $a_name;
34  $this->value = $a_value;
35  }
36 
37  public function setValue(string $a_value): void
38  {
39  $this->value = $a_value;
40  }
41 
42  public function getValue(): string
43  {
44  return trim($this->value);
45  }
46 
47  public function getItems(): array
48  {
49  return $this->items;
50  }
51 
52  public function getName(): string
53  {
54  return $this->name;
55  }
56 
57  public function getItemsByName(string $a_name, bool $a_recursive = true): array
58  {
59  return [];
60  }
61 
62  public function addItem(ilICalItem $a_item): void
63  {
64  $this->items[] = $a_item;
65  }
66 }
setValue(string $a_value)
addItem(ilICalItem $a_item)
getItemsByName(string $a_name, bool $a_recursive=true)
__construct(string $a_name, string $a_value='')
Abstract base class for all ical items (Component, Parameter and Value)