Documentation/Index/EventEmitterWhenProcessCloseAndresumption: ProcessBeforeAfterClose.inc

Plik ProcessBeforeAfterClose.inc, 819 bytes (dodany przez TS, 3 years temu)
xx
Line 
1<?php
2
3/**
4 * ProcessBeforeAfterClose
5 *
6 * @author Tomasz Świenty
7 * @version 0.1
8 * @copyright Copyright (c) eDokumenty
9 */
10final class ProcessBeforeAfterClose {
11
12
13    public static function handle($args) {
14
15        if (isset($args['action']) AND isset($args['container']) AND is_object($args['container']) AND (is_a($args['container'], 'Process'))) {
16            if ($args['action'] == 'beforeClose') {
17                self::beforeClose($args);
18            }
19
20            if ($args['action'] == 'afterClose') {
21                self::afterClose($args);
22            }
23        }
24
25    }
26
27
28    private static function beforeClose($args) {
29
30
31
32    }
33
34
35    private static function afterClose($args) {
36
37
38
39    }
40
41}
42
43if (isset($args)) {
44    ProcessBeforeAfterClose::handle($args);
45}