Completed
Pull Request — master (#363)
by Anton
06:05
created

RedirectException::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * Bluz Framework Component
4
 *
5
 * @copyright Bluz PHP Team
6
 * @link https://github.com/bluzphp/framework
7
 */
8
9
/**
10
 * @namespace
11
 */
12
namespace Bluz\Application\Exception;
13
14
/**
15
 * Redirect Exception
16
 *
17
 * @package  Bluz\Application\Exception
18
 * @author   Anton Shevchuk
19
 */
20
class RedirectException extends ApplicationException
21
{
22
    /**
23
     * @var string exception message consist Location data
24
     */
25
    protected $message = "Application Redirect";
26
27
    /**
28
     * Redirect HTTP code
29
     *
30
     * - 301 Moved Permanently
31
     * - 302 Moved Temporarily
32
     * - 307 Temporary Redirect
33
     *
34
     * @var integer
35
     */
36
    protected $code = 302;
37
38
    /**
39
     * @var string
40
     */
41
    protected $url;
42
43
    /**
44
     * Set Url to Redirect
45
     *
46
     * @param string $url
47
     */
48 3
    public function setUrl($url)
49
    {
50 3
        $this->url = $url;
51 3
    }
52
53
    /**
54
     * getUrl
55
     *
56
     * @return string
57
     */
58
    public function getUrl()
59
    {
60
        return $this->url;
61
    }
62
}
63