AAPanelLogs::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace DevOpsSantana\AAPanel;
4
5
/**
6
 * Class AAPanelLogs
7
 * @package DevOpsSantana\AAPanel
8
 * @author Rogério Santana <https://github.com/devopssantana>
9
 * @since : 2022
10
 */
11
class AAPanelLogs extends AAPanelConnect
12
{
13
    /**
14
     * Class Construct
15
     */
16
    public function __construct()
17
    {
18
        parent::__construct();
19
    }
20
21
    /**
22
     * @param int $limit
23
     * @return mixed
24
     */
25
    public function GetLogs($limit = 10): mixed
26
    {
27
        $url = $this->serverUrl . '/data?action=getData';
28
29
        $this->data['table'] = 'logs';
30
        $this->data['limit'] = $limit;
31
        $this->data['tojs'] = 'test';
32
        return parent::Execute($url, $this->data);
33
    }
34
35
36
    public function ClearPainelLogs()
37
    {
38
        $url = $this->serverUrl . '/ajasx?action=delClose';
39
40
       
41
42
        return parent::Execute($url, $this->data);
43
    }
44
45
    public function DelLogs()
46
    {
47
        $url = $this->serverUrl . '/config?action=SetControl';
48
49
        $this->data['type'] = 'del';
50
51
        return parent::Execute($url, $this->data);
52
    }
53
}
54