CustomButton::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
// Copyright 1999-2021. Plesk International GmbH.
3
4
namespace PleskX\Api\Struct\Ui;
5
6
class CustomButton extends \PleskX\Api\Struct
7
{
8
    /** @var string */
9
    public $id;
10
11
    /** @var int */
12
    public $sortKey;
13
14
    /** @var bool */
15
    public $public;
16
17
    /** @var bool */
18
    public $internal;
19
20
    /** @var bool */
21
    public $noFrame;
22
23
    /** @var string */
24
    public $place;
25
26
    /** @var string */
27
    public $url;
28
29
    /** @var string */
30
    public $text;
31
32
    public function __construct($apiResponse)
33
    {
34
        $this->_initScalarProperties($apiResponse, ['id']);
35
        $this->_initScalarProperties($apiResponse->properties, [
36
            'sort_key',
37
            'public',
38
            'internal',
39
            ['noframe' => 'noFrame'],
40
            'place',
41
            'url',
42
            'text',
43
        ]);
44
    }
45
}
46