Skip to content

Commit

Permalink
Merge pull request #345 from mvrhov/cdataDateTime
Browse files Browse the repository at this point in the history
Add support for cdata parameter on DateTimeHandler
  • Loading branch information
schmittjoh committed Dec 5, 2013
2 parents 9cdfef0 + ceeba5e commit bb15db3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private function addHandlersSection(NodeBuilder $builder)
->children()
->scalarNode('default_format')->defaultValue(\DateTime::ISO8601)->end()
->scalarNode('default_timezone')->defaultValue(date_default_timezone_get())->end()
->scalarNode('cdata')->defaultTrue()->end()
->end()
->end()
->end()
Expand Down
4 changes: 3 additions & 1 deletion DependencyInjection/JMSSerializerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public function loadInternal(array $config, ContainerBuilder $container)
// Built-in handlers.
$container->getDefinition('jms_serializer.datetime_handler')
->addArgument($config['handlers']['datetime']['default_format'])
->addArgument($config['handlers']['datetime']['default_timezone']);
->addArgument($config['handlers']['datetime']['default_timezone'])
->addArgument($config['handlers']['datetime']['cdata'])
;

// property naming
$container
Expand Down

0 comments on commit bb15db3

Please sign in to comment.