Documentation/Index/EventEmitterWhenProcessCloseAndresumption: ProcessBeforeAfterResumption.inc

Plik ProcessBeforeAfterResumption.inc, 864 bytes (dodany przez TS, 3 years temu)
xx
Line 
1<?php
2
3/**
4 * ProcessBeforeAfterResumption
5 *
6 * @author Tomasz Świenty
7 * @version 0.1
8 * @copyright Copyright (c) eDokumenty
9 */
10final class ProcessBeforeAfterResumption {
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'] == 'beforeResumption') {
17                self::beforeResumption($args);
18            }
19
20            if ($args['action'] == 'afterResumption') {
21                self::afterResumption($args);
22            }
23        }
24
25    }
26
27
28    private static function beforeResumption($args) {
29
30
31
32    }
33
34
35    private static function afterResumption($args) {
36
37
38
39    }
40
41}
42
43if (isset($args)) {
44    ProcessBeforeAfterResumption::handle($args);
45}