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

GoogleMapsPlugin::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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