Passed
Push — master ( 79ca65...aa6b0d )
by 世昌
03:39
created

RouteMatcher::setUri()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
namespace nebula\route;
3
4
/**
5
 * 可执行命令表达式
6
 *
7
 */
8
class RouteMatcher   {
9
    /**
10
     * 匹配的URI
11
     *
12
     * @var string
13
     */
14
    protected $uri;
15
    /**
16
     * 匹配的方法
17
     *
18
     * @var string
19
     */
20
    protected $methods;
21
    /**
22
     * 属性
23
     *
24
     * @var array
25
     */
26
    protected $attribute;
27
    
28
29
    /**
30
     * Get 属性
31
     *
32
     * @return  array
33
     */ 
34
    public function getAttribute()
35
    {
36
        return $this->attribute;
37
    }
38
39
    /**
40
     * Set 属性
41
     *
42
     * @param  array  $attribute  属性
43
     *
44
     * @return  self
45
     */ 
46
    public function setAttribute(array $attribute)
47
    {
48
        $this->attribute = $attribute;
49
50
        return $this;
51
    }
52
53
    /**
54
     * Get 匹配的方法
55
     *
56
     * @return  string
57
     */ 
58
    public function getMethods()
59
    {
60
        return $this->methods;
61
    }
62
63
    /**
64
     * Set 匹配的方法
65
     *
66
     * @param  string  $methods  匹配的方法
67
     *
68
     * @return  self
69
     */ 
70
    public function setMethods(string $methods)
71
    {
72
        $this->methods = $methods;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Get 匹配的URI
79
     *
80
     * @return  string
81
     */ 
82
    public function getUri()
83
    {
84
        return $this->uri;
85
    }
86
87
    /**
88
     * Set 匹配的URI
89
     *
90
     * @param  string  $uri  匹配的URI
91
     *
92
     * @return  self
93
     */ 
94
    public function setUri(string $uri)
95
    {
96
        $this->uri = $uri;
97
98
        return $this;
99
    }
100
}