Completed
Push — master ( 80f2e4...c476e2 )
by Derek
17:28
created

Path::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.037

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 3
cp 0.6667
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1.037
1
<?php
2
namespace Subreality\Dilmun\Anshar\Http\UriParts;
3
4
/**
5
 * Class Path
6
 * @package Subreality\Dilmun\Anshar\Http\UriParts
7
 */
8
class Path extends AbstractUriPart
9
{
10
    protected static $unencoded_characters = array();
11
    protected static $compositions         = array();
12
13
    protected static $part_pattern;
14
15
    /**
16
     * Host constructor. Accepts a string representing a URI host component. Construction will throw an exception if
17
     * the host is not a string.
18
     *
19
     * path-abempty  = *( "/" segment )
20
     * path-absolute = "/" [ segment-nz *( "/" segment ) ]
21
     * path-noscheme = segment-nz-nc *( "/" segment )
22
     * path-rootless = segment-nz *( "/" segment )
23
     * path-empty    = 0<pchar>
24
     *
25
     * segment       = *pchar
26
     * segment-nz    = 1*pchar
27
     * segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
28
     * ; non-zero-length segment without any colon ":"
29
     *
30
     * pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
31
     *
32
     * @param string $path
33
     */
34 6
    public function __construct($path)
35
    {
36 6
        parent::__construct($path, "Path");
37
    }
38
}
39