Tiqr_Message_Exception_SendFailure::__construct()   A
last analyzed

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
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 3
crap 2
1
<?php
2
/**
3
 * This file is part of the tiqr project.
4
 * 
5
 * The tiqr project aims to provide an open implementation for 
6
 * authentication using mobile devices. It was initiated by 
7
 * SURFnet and developed by Egeniq.
8
 *
9
 * More information: http://www.tiqr.org
10
 *
11
 * @author Peter Verhage <[email protected]>
12
 * 
13
 * @package tiqr
14
 *
15
 * @license New BSD License - See LICENSE file for details.
16
 *
17
 * @copyright (C) 2010-2011 SURFnet BV
18
 */
19
20
21
/**
22
 * Exception in case of a message that cannot be sent.
23
 */
24
class Tiqr_Message_Exception_SendFailure extends Tiqr_Message_Exception
25
{
26
    private $_temporary;
27
    
28
    /**
29
     * Constructor
30
     *
31
     * @param string    $message    exception message
32
     * @param boolean   $temporary  temporary failure?
33
     * @param Exception $parent     parent exception
34
     */
35
    public function __construct($message, $temporary=false, Exception $parent=null)
36
    {
37
        parent::__construct($message, $parent);
38
        $this->_temporary = $temporary;
39
    }
40
    
41
    /**
42
     * Is temporary failure? E.g. it's possible to try again later on?
43
     *
44
     * @return boolean is temporary failure?
45
     */
46
    public function isTemporary()
47
    {
48
        return $this->_temporary;
49
    }
50
}
51