Controller/JsonRpcController.php
protected function getSerializationContext(array $functionConfig)
    {
        if (isset($functionConfig['jms_serialization_context'])) {
            $serializationContext = \JMS\Serializer\SerializationContext::create();

            if (isset($functionConfig['jms_serialization_context']['groups'])) {
                $serializationContext->setGroups($functionConfig['jms_serialization_context']['groups']);
            }

            if (isset($functionConfig['jms_serialization_context']['version'])) {
                $serializationContext->setVersion($functionConfig['jms_serialization_context']['version']);
            }

            if (isset($functionConfig['jms_serialization_context']['max_depth_checks'])) {
                $serializationContext->enableMaxDepthChecks($functionConfig['jms_serialization_context']['max_depth_checks']);
            }
        } else {
            $serializationContext = $this->serializationContext;
        }

        return $serializationContext;
    }
protected function getSerializationContext(array $functionConfig)
    {
        if (isset($functionConfig['jms_serialization_context'])) {
            $serializationContext = \JMS\Serializer\SerializationContext::create();

            if (isset($functionConfig['jms_serialization_context']['groups'])) {
                $serializationContext->setGroups($functionConfig['jms_serialization_context']['groups']);
            }

            if (isset($functionConfig['jms_serialization_context']['version'])) {
                $serializationContext->setVersion($functionConfig['jms_serialization_context']['version']);
            }

            if (isset($functionConfig['jms_serialization_context']['max_depth_checks'])) {
                $serializationContext->enableMaxDepthChecks($functionConfig['jms_serialization_context']['max_depth_checks']);
            }
        } else {
            $serializationContext = $this->serializationContext;
        }

        return $serializationContext;
    }
protected function getSerializationContext ( array $ functionConfig ) { if ( isset ( $ functionConfig [ 'jms_serialization_context' ] ) ) { $ serializationContext = \ JMS \ Serializer \ SerializationContext :: create ( ) ; if ( isset ( $ functionConfig [ 'jms_serialization_context' ] [ 'groups' ] ) ) { $ serializationContext -> setGroups ( $ functionConfig [ 'jms_serialization_context' ] [ 'groups' ] ) ; } if ( isset ( $ functionConfig [ 'jms_serialization_context' ] [ 'version' ] ) ) { $ serializationContext -> setVersion ( $ functionConfig [ 'jms_serialization_context' ] [ 'version' ] ) ; } if ( isset ( $ functionConfig [ 'jms_serialization_context' ] [ 'max_depth_checks' ] ) ) { $ serializationContext -> enableMaxDepthChecks ( $ functionConfig [ 'jms_serialization_context' ] [ 'max_depth_checks' ] ) ; } } else { $ serializationContext = $ this -> serializationContext ; } return $ serializationContext ; }
Get SerializationContext or creates one if jms_serialization_context option is set

@param array $functionConfig
@return \JMS\Serializer\SerializationContext
Get SerializationContext or creates one if jms_serialization_context option is set