Completed
Pull Request — 1.11.x (#1536)
by José
26:43
created

GoogleMapsPlugin   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 54
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 1

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A get_name() 0 4 1
A create() 0 6 2
A install() 0 4 1
A uninstall() 0 4 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
/**
4
 * The google maps class allows to use
5
 * @author José Loguercio Silva <[email protected]>
6
 * @package chamilo.plugin.google_maps
7
 */
8
class GoogleMapsPlugin extends Plugin
9
{
10
    /**
11
     * Class constructor
12
     */
13
    protected function __construct()
14
    {
15
        $parameters = array(
16
            'api_key' => 'text'
17
        );
18
19
        parent::__construct('1.0', 'José Loguercio Silva', $parameters);
20
    }
21
22
    /**
23
     * Get the plugin Name
24
     *
25
     * @return string
26
     */
27
    public function get_name()
28
    {
29
        return "google_maps";
30
    }
31
32
    /**
33
     * Instance the plugin
34
     * @staticvar null $result
35
     * @return GoogleMapsPlugin
36
     */
37
    static function create()
38
    {
39
        static $result = null;
40
41
        return $result ? $result : $result = new self();
42
    }
43
44
    /**
45
     * Install the plugin
46
     * @return void
47
     */
48
    public function install()
49
    {
50
        return true;
51
    }
52
53
    /**
54
     * Uninstall the plugin
55
     * @return void
56
     */
57
    public function uninstall()
58
    {
59
        return true;
60
    }
61
}
62