mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-26 14:40:29 +01:00
31 lines
561 B
PHP
31 lines
561 B
PHP
<?php
|
|
|
|
namespace Xentral\Modules\TaxdooApi\Exception;
|
|
|
|
class TooManyReuestsException extends TaxdooFatalExcepion
|
|
{
|
|
/** @var int $remaining */
|
|
private $remaining;
|
|
|
|
/**
|
|
* @param int $timeout
|
|
*
|
|
* @return TooManyReuestsException
|
|
*/
|
|
public static function fromTimeout($timeout)
|
|
{
|
|
$e = new self("Too many requests ($timeout secs timeout)");
|
|
$e->remaining = $timeout;
|
|
|
|
return $e;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getRemaining()
|
|
{
|
|
return $this->remaining;
|
|
}
|
|
}
|