mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-26 23:06:06 +03:00
39 lines
918 B
PHP
39 lines
918 B
PHP
<?php
|
|
|
|
namespace Guzzle\Service\Exception;
|
|
|
|
use Guzzle\Common\Exception\RuntimeException;
|
|
|
|
/**
|
|
* Command transfer exception when commands do not all use the same client
|
|
*/
|
|
class InconsistentClientTransferException extends RuntimeException
|
|
{
|
|
/**
|
|
* @var array Commands with an invalid client
|
|
*/
|
|
private $invalidCommands = array();
|
|
|
|
/**
|
|
* @param array $commands Invalid commands
|
|
*/
|
|
public function __construct(array $commands)
|
|
{
|
|
$this->invalidCommands = $commands;
|
|
parent::__construct(
|
|
'Encountered commands in a batch transfer that use inconsistent clients. The batching ' .
|
|
'strategy you use with a command transfer must divide command batches by client.'
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the invalid commands
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getCommands()
|
|
{
|
|
return $this->invalidCommands;
|
|
}
|
|
}
|