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

RedirectException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 43
ccs 3
cts 3
cp 1
rs 10
c 2
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUrl() 0 4 1
A getUrl() 0 4 1
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