Completed
Pull Request — master (#1537)
by José
29:27
created

GoogleMapsPlugin::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
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
            'enable_api' => 'boolean',
17
            'api_key' => 'text'
18
        );
19
20
        parent::__construct('1.0', 'José Loguercio Silva', $parameters);
21
    }
22
23
    /**
24
     * Get the plugin Name
25
     *
26
     * @return string
27
     */
28
    public function get_name()
29
    {
30
        return "google_maps";
31
    }
32
33
    /**
34
     * Instance the plugin
35
     * @staticvar null $result
36
     * @return GoogleMapsPlugin
37
     */
38
    static function create()
39
    {
40
        static $result = null;
41
42
        return $result ? $result : $result = new self();
43
    }
44
45
    /**
46
     * Install the plugin
47
     * @return void
48
     */
49
    public function install()
50
    {
51
        return true;
52
    }
53
54
    /**
55
     * Uninstall the plugin
56
     * @return void
57
     */
58
    public function uninstall()
59
    {
60
        return true;
61
    }
62
}
63