| @@ 18-41 (lines=24) @@ | ||
| 15 | * @method string getConnectionString() |
|
| 16 | * @method AzureServiceBusDestination setConnectionString(string $connectionString = null) |
|
| 17 | */ |
|
| 18 | class AzureServiceBusDestination extends Destination |
|
| 19 | { |
|
| 20 | public function fieldDefinitions() |
|
| 21 | { |
|
| 22 | return [ |
|
| 23 | 'type' => [static::TYPE => 'string'], |
|
| 24 | 'connectionString' => [static::TYPE => 'string'], |
|
| 25 | ]; |
|
| 26 | } |
|
| 27 | ||
| 28 | /** |
|
| 29 | * @param $connectionString |
|
| 30 | * @param $accessKey |
|
| 31 | * @param $accessSecret |
|
| 32 | * @param Context|null $context |
|
| 33 | * @return AzureServiceBusDestination |
|
| 34 | */ |
|
| 35 | public static function ofQueueURLAccessKeyAndSecret($connectionString, Context $context = null) |
|
| 36 | { |
|
| 37 | return static::of($context) |
|
| 38 | ->setType('AzureServiceBus') |
|
| 39 | ->setConnectionString($connectionString); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 18-32 (lines=15) @@ | ||
| 15 | * @method string getUri() |
|
| 16 | * @method IronMQDestination setUri(string $uri = null) |
|
| 17 | */ |
|
| 18 | class IronMQDestination extends Destination |
|
| 19 | { |
|
| 20 | public function fieldDefinitions() |
|
| 21 | { |
|
| 22 | return [ |
|
| 23 | 'type' => [static::TYPE => 'string'], |
|
| 24 | 'uri' => [static::TYPE => 'string'] |
|
| 25 | ]; |
|
| 26 | } |
|
| 27 | ||
| 28 | public static function ofUri($uri, Context $context = null) |
|
| 29 | { |
|
| 30 | return static::of($context)->setType('IronMQ')->setUri($uri); |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||