PluginProbe
DecaLog / 4.4.0
DecaLog v4.4.0
3.0.2 3.1.0 3.10.0 3.2.0 3.3.0 3.4.0 3.4.1 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.6.3 3.7.0 3.7.1 3.8.0 3.9.0 3.9.1 4.0.0 4.1.0 4.2.0 4.3.0 4.3.1 4.4.0 4.5.0 All 75 releases
decalog / includes / libraries / lock / exception / TimeoutException.php

TimeoutException.php in DecaLog 4.4.0, at includes/libraries/lock/exception/TimeoutException.php

30 lines 740 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace malkusch\lock\exception;
6
7 /**
8 * Timeout exception.
9 *
10 * A timeout has been exceeded exception. Should only be used in contexts where
11 * the lock is being acquired.
12 *
13 * @author Markus Malkusch <markus@malkusch.de>
14 * @link bitcoin:1P5FAZ4QhXCuwYPnLZdk3PJsqePbu1UDDA Donations
15 * @license WTFPL
16 */
17 class TimeoutException extends LockAcquireException
18 {
19 /**
20 * Creates a new instance of the TimeoutException class.
21 *
22 * @param int $timeout The timeout in seconds.
23 * @return self A timeout has been exceeded exception.
24 */
25 public static function create(int $timeout): self
26 {
27 return new self(\sprintf('Timeout of %d seconds exceeded.', $timeout));
28 }
29 }
30