grommunio /
grommunio-web
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * AddressBookNotifier |
||
| 5 | * |
||
| 6 | * Generates notifications update AddressBook contents. |
||
| 7 | */ |
||
| 8 | class AddressBookNotifier extends Notifier |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @return Number the event which this module handles. |
||
| 12 | */ |
||
| 13 | public function getEvents() |
||
| 14 | { |
||
| 15 | return OBJECT_SAVE; |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * If an event elsewhere has occurred, it enters in this method. This method |
||
| 20 | * executes one ore more actions, depends on the event. |
||
| 21 | * @param int $event Event. |
||
| 22 | * @param string $entryid Entryid. |
||
| 23 | * @param array $data array of data. |
||
| 24 | */ |
||
| 25 | public function update($event, $entryid, $props) |
||
| 26 | { |
||
| 27 | switch ($event) { |
||
| 28 | case OBJECT_SAVE: |
||
| 29 | $this->addNotificationActionData("addressbook", true); |
||
| 30 | $GLOBALS["bus"]->addData($this->createNotificationResponseData()); |
||
| 31 | break; |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | ?> |
||
|
0 ignored issues
–
show
|
|||
| 37 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.