ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SignalGenerator.php
Go to the documentation of this file.
1<?php
3
11{
12 const PREFIX = 'il_signal_';
13
17 public function create($class = '')
18 {
19 $id = $this->createId();
20 $instance = ($class) ? new $class($id) : new Signal($id);
21 return $instance;
22 }
23
27 protected function createId()
28 {
29 return str_replace(".", "_", uniqid(self::PREFIX, true));
30 }
31}
An exception for terminatinating execution or to throw for unit testing.
create($class='')
Create a signal, each created signal MUST have a unique ID.Signal
if(!array_key_exists('StateId', $_REQUEST)) $id