inital commit
[pharext/pharext.org] / app / Github / Exception / TokenExpired.php
1 <?php
2
3 namespace app\Github\Exception;
4
5 use app\Github\Exception\TokenException;
6
7 class TokenExpired extends \Exception implements TokenException
8 {
9 private $seconds;
10
11 function __construct($seconds, $previous = null) {
12 $this->seconds = abs($seconds);
13 parent::__construct("Token expired $this->seconds seconds ago", 0, $previous);
14 }
15
16 function getSeconds() {
17 return $this->seconds;
18 }
19 }