VirtualModule::afterCompress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: kotenko
5
 * Date: 16.01.2016
6
 * Time: 15:27
7
 */
8
namespace samson\core;
9
10
use samsonframework\core\CompressInterface;
11
use samsonframework\core\ResourcesInterface;
12
use samsonframework\core\SystemInterface;
13
14
/**
15
 * Virtual SamsonPHP module needed to imitate 3rd party packages
16
 * as they are SamsonPHP modules for internal seamless usage.
17
 *
18
 * @package samson\core
19
 */
20
class VirtualModule extends ExternalModule implements CompressInterface
21
{
22
    /**
23
     * VirtualModule constructor.
24
     *
25
     * @param string             $path
26
     * @param ResourcesInterface $resources
27
     * @param SystemInterface    $system
28
     * @param null               $moduleId
29
     */
30
    public function __construct($path, ResourcesInterface $resources, SystemInterface $system, $moduleId = null)
31
    {
32
        $this->id = $moduleId;
33
34
        parent::__construct($path, $resources, $system);
35
    }
36
37
    /**
38
     * This method should be used to override generic compression logic.
39
     *
40
     * @param mixed $obj Pointer to compressor instance
41
     * @param array|null $code Collection of already compressed code
42
     *
43
     * @return bool False if generic compression needs to be avoided
44
     */
45
    public function beforeCompress(&$obj = null, array &$code = null)
46
    {
47
        // TODO: Implement beforeCompress() method.
48
    }
49
50
    /**
51
     * This method is called after generic compression logic has finished.
52
     *
53
     * @param mixed $obj Pointer to compressor instance
54
     * @param array|null $code Collection of already compressed code
55
     *
56
     * @return bool False if generic compression needs to be avoided
57
     */
58
    public function afterCompress(&$obj = null, array &$code = null)
59
    {
60
        // TODO: Implement afterCompress() method.
61
    }
62
}