assets::settings()   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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * ASSETS ENDPOINT CLASS
5
 *
6
 */
7
namespace responsible\service\endpoints;
8
9
use responsible\core\headers;
10
use responsible\service\interfaces;
11
12
class assets implements interfaces\endpointsInterface
13
{
14
    /**
15
     * [$settings]
16
     * @var array
17
     */
18
    private $settings = [];
19
    
20
    /**
21
     * [settings Inherited settings]
22
     * @return void
23
     */
24
    public function settings(array $settings)
25
    {
26
        $this->settings = $settings;
27
    }
28
29
    /**
30
     * [headerMethods]
31
     * @return void
32
     */
33
    public function headerMethods()
34
    {
35
        $headers = new headers\header;
36
        $headers->setAllowedMethods(
37
            ['GET', 'POST']
38
        );
39
    }
40
41
    /**
42
     * [register]
43
     * @return array
44
     */
45
    public function register()
46
    {
47
        return array(
48
            '/assets/all',
49
            '/assets/asset/{assetId}',
50
            '/assets/{contentsId}/asset/{assetId}',
51
            '/assets/download/{assetId}',
52
        );
53
    }
54
55
    /**
56
     * [scope Routing scope access]
57
     * @return string
58
     */
59
    public function scope()
60
    {
61
        return 'private';
62
    }
63
64
    /**
65
     * [run Run the method request]
66
     * @return void
67
     */
68
    public function run()
69
    {
70
        print_r($this);
71
    }
72
}
73