Request::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace UAPAY\Sessions\Create;
4
5
use UAPAY\Log as Log;
6
7
class Request extends \UAPAY\Request
8
{
9
    /**
10
     *      @var String
11
     */
12
    protected $clientId;
13
14
    /**
15
     *      @var String
16
     */
17
    protected $api_path = '/api/sessions/create';
18
19
    /**
20
     *      @var String
21
     */
22
    protected $response_class = '\UAPAY\Sessions\Create\Response';
23
24
    /**
25
     *      Constructor
26
     *
27
     *      @param array $options array of options
28
     */
29
    public function __construct($options)
30
    {
31
        parent::__construct($options);
32
33
        if (isset($options['clientId']))
34
        {
35
            $this->clientId($options['clientId']);
36
        }
37
    }
38
39
    /**
40
     *      get/set clientId
41
     *
42
     *      @param string $value
43
     *      @return string
44
     */
45
    public function clientId($value=null)
46
    {
47
        if ($value !== null)
48
        {
49
            $this->clientId = $this->as_string($value);
50
        }
51
52
        return $this->clientId;
53
    }
54
55
    /**
56
     *      Returns params set
57
     *
58
     *      @return array
59
     */
60
    public function get_params()
61
    {
62
        return array(
63
            'clientId' => $this->clientId,
64
        );
65
    }
66
}
67