Completed
Push — master ( 905fa2...fad403 )
by Iurii
01:51
created

Skeleton   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 64
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A info() 0 10 1
A hookRouteList() 0 9 1
A hookJobHandlers() 0 8 1
A hookValidatorHandlers() 0 8 1
1
<?php
2
3
/**
4
 * @package Skeleton module
5
 * @author Iurii Makukh <[email protected]>
6
 * @copyright Copyright (c) 2015, Iurii Makukh
7
 * @license https://www.gnu.org/licenses/gpl.html GNU/GPLv3
8
 */
9
10
namespace gplcart\modules\skeleton;
11
12
use gplcart\core\Module;
13
14
/**
15
 * Main class for Skeleton module
16
 */
17
class Skeleton extends Module
18
{
19
    
20
    public function __construct()
21
    {
22
        parent::__construct();
23
    }
24
25
    /**
26
     * Module info
27
     * @return array
28
     */
29
    public function info()
30
    {
31
        return array(
32
            'name' => 'Skeleton',
33
            'version' => '1.0.0-alfa.2',
34
            'description' => 'A tool that allows developers to generate blank modules for different purposes',
35
            'author' => 'Iurii Makukh',
36
            'core' => '1.x'
37
        );
38
    }
39
40
    /**
41
     * Implements hook "route.list"
42
     * @param array $routes
43
     */
44
    public function hookRouteList(array &$routes)
45
    {
46
        $routes['admin/tool/skeleton'] = array(
47
            'menu' => array('admin' => 'Skeleton'),
48
            'handlers' => array(
49
                'controller' => array('gplcart\\modules\\skeleton\\controllers\\Skeleton', 'editSkeleton')
50
            )
51
        );
52
    }
53
54
    /**
55
     * Implements hook "job.handlers"
56
     * @param array $handlers
57
     */
58
    public function hookJobHandlers(array &$handlers)
59
    {
60
        $handlers['skeleton'] = array(
61
            'handlers' => array(
62
                'process' => array('gplcart\\modules\\skeleton\\handlers\\Extract', 'process')
63
            ),
64
        );
65
    }
66
67
    /**
68
     * Implements hook "validator.handlers"
69
     * @param array $handlers
70
     */
71
    public function hookValidatorHandlers(array &$handlers)
72
    {
73
        $handlers['skeleton'] = array(
74
            'handlers' => array(
75
                'validate' => array('gplcart\\modules\\skeleton\\handlers\\Validator', 'skeleton')
76
            ),
77
        );
78
    }
79
80
}
81