Completed
Pull Request — master (#99)
by Kevin
06:07
created

ApiConfiguration   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 92
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 8
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 92
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiHostname() 0 4 1
A setApiHostname() 0 4 1
A getEnabled() 0 4 1
A setEnabled() 0 4 1
A getKey() 0 4 1
A setKey() 0 4 1
A getSecret() 0 4 1
A setSecret() 0 4 1
1
<?php
2
3
namespace Magium\Util\Api;
4
5
use Magium\AbstractConfigurableElement;
6
7
class ApiConfiguration extends AbstractConfigurableElement
8
{
9
10
    /**
11
     * The key for the API
12
     */
13
    public $key;
14
15
    /**
16
     * The API secret
17
     */
18
    public $secret;
19
20
    /**
21
     * A flag for if the API is enabled.  By default it is not.
22
     */
23
24
    public $enabled = false;
25
26
    /**
27
     * The base hostname for API calls.
28
     */
29
30
    public $apiHostname = 'magiumlib.com';
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getApiHostname()
36
    {
37
        return $this->apiHostname;
38
    }
39
40
    /**
41
     * @param mixed $apiHostname
42
     */
43
    public function setApiHostname($apiHostname)
44
    {
45
        $this->apiHostname = $apiHostname;
46
    }
47
48
    /**
49
     * @return mixed
50
     */
51
    public function getEnabled()
52
    {
53
        return $this->enabled;
54
    }
55
56
    /**
57
     * @param mixed $enabled
58
     */
59
    public function setEnabled($enabled)
60
    {
61
        $this->enabled = $enabled;
62
    }
63
64
    /**
65
     * @return mixed
66
     */
67
    public function getKey()
68
    {
69
        return $this->key;
70
    }
71
72
    /**
73
     * @param mixed $key
74
     */
75
    public function setKey($key)
76
    {
77
        $this->key = $key;
78
    }
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getSecret()
84
    {
85
        return $this->secret;
86
    }
87
88
    /**
89
     * @param mixed $secret
90
     */
91
    public function setSecret($secret)
92
    {
93
        $this->secret = $secret;
94
    }
95
96
    
97
98
}