1: <?php
2:
3: namespace Guzzle\Service\Exception;
4:
5: use Guzzle\Common\Exception\RuntimeException;
6:
7: /**
8: * Command transfer exception when commands do not all use the same client
9: */
10: class InconsistentClientTransferException extends RuntimeException
11: {
12: /**
13: * @var array Commands with an invalid client
14: */
15: private $invalidCommands = array();
16:
17: /**
18: * @param array $commands Invalid commands
19: */
20: public function __construct(array $commands)
21: {
22: $this->invalidCommands = $commands;
23: parent::__construct(
24: 'Encountered commands in a batch transfer that use inconsistent clients. The batching ' .
25: 'strategy you use with a command transfer must divide command batches by client.'
26: );
27: }
28:
29: /**
30: * Get the invalid commands
31: *
32: * @return array
33: */
34: public function getCommands()
35: {
36: return $this->invalidCommands;
37: }
38: }
39: