Completed
Push — master ( 331c73...e56d9f )
by Derek
03:38 queued 01:38
created

Path::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
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
12
    protected static $compositions = array(
13
        "unreserved_characters",
14
        "sub_delims_characters",
15
        "pchar_characters",
16
    );
17
18
    protected static $part_pattern;
19
20
    /**
21
     * Host constructor. Accepts a string representing a URI host component. Construction will throw an exception if
22
     * the host is not a string.
23
     *
24
     * path-abempty  = *( "/" segment )
25
     * path-absolute = "/" [ segment-nz *( "/" segment ) ]
26
     * path-noscheme = segment-nz-nc *( "/" segment )
27
     * path-rootless = segment-nz *( "/" segment )
28
     * path-empty    = 0<pchar>
29
     *
30
     * segment       = *pchar
31
     * segment-nz    = 1*pchar
32
     * segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
33
     * ; non-zero-length segment without any colon ":"
34
     *
35
     * pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
36
     *
37
     * @param string $path
38
     */
39 9
    public function __construct($path)
40
    {
41 9
        parent::__construct($path, "Path");
42 3
    }
43
}
44