File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace OldSound \RabbitMqBundle \DependencyInjection ;
4
4
5
+ use OldSound \RabbitMqBundle \RabbitMq \Producer ;
5
6
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
6
7
use Symfony \Component \Config \Definition \ConfigurationInterface ;
7
8
use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
@@ -125,7 +126,7 @@ protected function addProducers(ArrayNodeDefinition $node)
125
126
->scalarNode ('enable_logger ' )->defaultFalse ()->end ()
126
127
->scalarNode ('service_alias ' )->defaultValue (null )->end ()
127
128
->scalarNode ('default_routing_key ' )->defaultValue ('' )->end ()
128
- ->scalarNode ('default_content_type ' )->defaultValue (' text/plain ' )->end ()
129
+ ->scalarNode ('default_content_type ' )->defaultValue (Producer:: DEFAULT_CONTENT_TYPE )->end ()
129
130
->integerNode ('default_delivery_mode ' )->min (1 )->max (2 )->defaultValue (2 )->end ()
130
131
->end ()
131
132
->end ()
Original file line number Diff line number Diff line change 10
10
*/
11
11
class Producer extends BaseAmqp implements ProducerInterface
12
12
{
13
- protected $ contentType = 'text/plain ' ;
13
+ const DEFAULT_CONTENT_TYPE = 'text/plain ' ;
14
+ protected $ contentType = Producer::DEFAULT_CONTENT_TYPE ;
14
15
protected $ deliveryMode = 2 ;
15
16
protected $ defaultRoutingKey = '' ;
16
17
You can’t perform that action at this time.
0 commit comments