php - Is there a way to initialize a JSM Serializer manually? -


I am writing a PHP wrapper project for an API. Within my feedback object, I want to deerize an object to the JSON block. This is not a symphony standard structure project, just a PHP project with symphonic components.

Within a symphony project, I simply call

  $ serializer = $ the-> ('serializer'),   < P> And be done with it. But of course, my class is neither containerware nor there is no access to any container or services in general. I need to use the JMS serializer as an API, I am writing a cover for JM serializer (with configuration).  

Is there any way to initialize JMS serializer ( JMS \ Serializer) \ Serializer ) manually?

The services of the JMS Serializer. The following definition within Xml is:

  & lt; Service id = "jms_serializer.serializer" class = "% jms_serializer.serializer class%" public = "wrong" & gt; & Lt; Logic type = "service" id = "jms_serializer.metadata_factory" /> & Lt; Logic type = "service" id = "jms_serializer.handler_registry" /> & Lt; Logic type = "service" id = "jms_serializer.object_constructor" /> & Lt; Logic type = "archive" /> & Lt ;! - Serialization Visitor - & gt; & Lt; Logic type = "archive" /> & Lt ;! - Deserialization visitor - & gt; & Lt; Logic type = "service" id = "jms_serializer.event_dispatcher" /> & Lt; / Services & gt; ... & lt; Service id = "jms_serializer.metadata_factory" class = "% jms_serializer.metadata.metadata_factory.class%" public = "false" & gt; & Lt; Logic type = "service" id = "jms_serializer.metadata.lazy_loading_driver" /> & Lt; Logic & gt; Metadata \ ClassHierarchyMetadata & lt; / Logic & gt; & Lt; Logic / & gt; & Lt; Call method = "setchatch" & gt; & Lt; Logic type = "service" id = "jms_serializer.metadata.cache" on-invalid = "ignore" /> & Lt; / Call & gt; & Lt; / Services & gt; ... & lt; Service id = "jms_serializer.metadata.lazy_loading_driver" class = "% jms_serializer.metadata.lazy_loading_driver.class%" public = "wrong" & gt; & Lt; Type of argument = "service" id = "service_container" /> & Lt; Logic & gt; Jms_serializer.metadata_driver & lt; / Logic & gt; & Lt; / Services & gt; ...   

I can initialize one object after another, but I will still be stuck at that point where the service container ( & lt; argument type = "service "Id ="

Is there a way to manually start the JMS serializer?

The file you are viewing comes from the Symphony 2 framework specific JmsArilizer bundle.

The bundle is the only normal JMS serial package E is a thin cover.

The package documentation will you:

Construction part can be found here:

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -