ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
AbstractBaseNotification.php
Go to the documentation of this file.
2 
7 
13 abstract class AbstractBaseNotification implements isStandardItem
14 {
15 
20 
26  protected $handle_opened;
27 
33  protected $handle_closed;
34 
40  public function __construct(IdentificationInterface $identification)
41  {
42  $this->handle_opened = function () {
43  };
44 
45  $this->provider_identification = $identification;
46  }
47 
48 
53  {
55  }
56 
57 
62  {
63  return new StandardNotificationRenderer($factory);
64  }
65 
69  public function withOpenedCallable(callable $handle_opened) : isItem
70  {
71  $clone = clone $this;
72  $clone->handle_opened = $handle_opened;
73  return $clone;
74  }
75 
79  public function getOpenedCallable() : callable
80  {
81  return $this->handle_opened;
82  }
83 
87  public function withClosedCallable(callable $handle_closed) : isItem
88  {
89  $clone = clone $this;
90  $clone->handle_closed = $handle_closed;
91  return $clone;
92  }
93 
97  public function getClosedCallable()
98  {
99  return $this->handle_closed;
100  }
101 
105  public function hasClosedCallable()
106  {
107  return is_callable($this->handle_closed);
108  }
109 }
__construct(IdentificationInterface $identification)
StandardNotification constructor.
$factory
Definition: metadata.php:58