VirtualModule   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A beforeCompress() 0 4 1
A afterCompress() 0 4 1
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
}