Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CWD
CwdDataDoctrineORMBundle
Commits
eae95a2c
Commit
eae95a2c
authored
Dec 12, 2018
by
Bernhard Schussek
Browse files
Made it possible to enable associative array normalization in JsonbSerializedType
parent
6a3db839
Changes
1
Hide whitespace changes
Inline
Side-by-side
Type/JsonbSerializedType.php
View file @
eae95a2c
...
...
@@ -28,6 +28,11 @@ abstract class JsonbSerializedType extends JsonbType
*/
private
static
$serializer
;
/**
* @var bool
*/
private
static
$jsonDecodeAssociative
=
false
;
/**
* Sets the factory used to construct the used Serializer instance.
*
...
...
@@ -38,6 +43,11 @@ abstract class JsonbSerializedType extends JsonbType
self
::
$serializerFactory
=
$factory
;
}
public
static
function
setJsonDecodeAssociative
(
bool
$jsonDecodeAssociative
):
void
{
self
::
$jsonDecodeAssociative
=
$jsonDecodeAssociative
;
}
/**
* {@inheritdoc}
*/
...
...
@@ -69,7 +79,7 @@ abstract class JsonbSerializedType extends JsonbType
$value
,
$this
->
getDeserializationType
(),
'json'
,
[
'json_decode_associative'
=>
fals
e
]
[
'json_decode_associative'
=>
self
::
$jsonDecodeAssociativ
e
]
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment