コード例 #1
0
 /**
  * Gets the 'jms_serializer' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \JMS\Serializer\Serializer A JMS\Serializer\Serializer instance.
  */
 protected function getJmsSerializerService()
 {
     $a = new \Metadata\MetadataFactory(new \Metadata\Driver\LazyLoadingDriver($this, 'jms_serializer.metadata_driver'), 'Metadata\\ClassHierarchyMetadata', true);
     $a->setCache(new \Metadata\Cache\FileCache(__DIR__ . '/jms_serializer'));
     $b = new \JMS\Serializer\EventDispatcher\LazyEventDispatcher($this);
     $b->setListeners(array('serializer.pre_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.stopwatch_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL), 1 => array(0 => array(0 => 'jms_serializer.doctrine_proxy_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL)), 'serializer.post_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.stopwatch_subscriber', 1 => 'onPostSerialize'), 1 => NULL, 2 => NULL))));
     return $this->services['jms_serializer'] = new \JMS\Serializer\Serializer($a, $this->get('jms_serializer.handler_registry'), $this->get('jms_serializer.unserialize_object_constructor'), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_serialization_visitor'), 'xml' => $this->get('jms_serializer.xml_serialization_visitor'), 'yml' => $this->get('jms_serializer.yaml_serialization_visitor'))), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_deserialization_visitor'), 'xml' => $this->get('jms_serializer.xml_deserialization_visitor'))), $b);
 }
コード例 #2
0
 protected function getJmsSerializerService()
 {
     $a = new \JMS\Serializer\EventDispatcher\LazyEventDispatcher($this);
     $a->setListeners(array('serializer.pre_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.doctrine_proxy_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL))));
     return $this->services['jms_serializer'] = new \JMS\Serializer\Serializer($this->get('jms_serializer.metadata_factory'), $this->get('jms_serializer.handler_registry'), $this->get('jms_serializer.unserialize_object_constructor'), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_serialization_visitor'), 'xml' => $this->get('jms_serializer.xml_serialization_visitor'), 'yml' => $this->get('jms_serializer.yaml_serialization_visitor'))), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_deserialization_visitor'), 'xml' => $this->get('jms_serializer.xml_deserialization_visitor'))), $a);
 }
コード例 #3
0
 protected function getFosRest_SerializerService()
 {
     $a = new \JMS\Serializer\EventDispatcher\LazyEventDispatcher($this);
     $a->setListeners(array('serializer.pre_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.doctrine_proxy_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL))));
     return $this->services['fos_rest.serializer'] = new \JMS\Serializer\Serializer(new \Metadata\MetadataFactory(new \Metadata\Driver\LazyLoadingDriver($this, 'jms_serializer.metadata_driver'), 'Metadata\\ClassHierarchyMetadata', false), $this->get('jms_serializer.handler_registry'), $this->get('jms_serializer.unserialize_object_constructor'), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_serialization_visitor'), 'xml' => $this->get('jms_serializer.xml_serialization_visitor'), 'yml' => $this->get('jms_serializer.yaml_serialization_visitor'))), new \PhpCollection\Map(array('json' => $this->get('jms_serializer.json_deserialization_visitor'), 'xml' => $this->get('jms_serializer.xml_deserialization_visitor'))), $a);
 }
コード例 #4
0
 /**
  * Gets the 'fos_rest.serializer' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return JMS\Serializer\Serializer A JMS\Serializer\Serializer instance.
  */
 protected function getFosRest_SerializerService()
 {
     $a = new \Metadata\MetadataFactory(new \Metadata\Driver\LazyLoadingDriver($this, 'jms_serializer.metadata_driver'), 'Metadata\\ClassHierarchyMetadata', true);
     $a->setCache(new \Metadata\Cache\FileCache('/home/markus/development/php.labs/symfony/app/cache/dev/jms_serializer'));
     $b = new \JMS\Serializer\EventDispatcher\LazyEventDispatcher($this);
     $b->setListeners(array('serializer.pre_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.doctrine_proxy_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL))));
     return $this->services['fos_rest.serializer'] = new \JMS\Serializer\Serializer($a, $this->get('jms_serializer.handler_registry'), $this->get('jms_serializer.unserialize_object_constructor'), new \JMS\DiExtraBundle\DependencyInjection\Collection\LazyServiceMap($this, array('json' => 'jms_serializer.json_serialization_visitor', 'xml' => 'jms_serializer.xml_serialization_visitor', 'yml' => 'jms_serializer.yaml_serialization_visitor')), new \JMS\DiExtraBundle\DependencyInjection\Collection\LazyServiceMap($this, array('json' => 'jms_serializer.json_deserialization_visitor', 'xml' => 'jms_serializer.xml_deserialization_visitor')), $b);
 }
コード例 #5
0
 /**
  * Gets the 'jms_serializer' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \JMS\Serializer\Serializer A JMS\Serializer\Serializer instance.
  */
 protected function getJmsSerializerService()
 {
     $a = new \JMS\Serializer\EventDispatcher\LazyEventDispatcher($this);
     $a->setListeners(array('serializer.pre_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.stopwatch_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL), 1 => array(0 => array(0 => 'jms_serializer.doctrine_proxy_subscriber', 1 => 'onPreSerialize'), 1 => NULL, 2 => NULL), 2 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeMealPhoto'), 1 => 'nordcode\\corebundle\\entity\\mealphoto', 2 => NULL), 3 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeWorkoutPhoto'), 1 => 'nordcode\\corebundle\\entity\\workoutphoto', 2 => NULL), 4 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeDiary'), 1 => 'nordcode\\corebundle\\entity\\diary', 2 => NULL), 5 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeDiaryEntry'), 1 => 'nordcode\\corebundle\\entity\\diaryentry', 2 => NULL), 6 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeUser'), 1 => 'nordcode\\userbundle\\entity\\user', 2 => NULL), 7 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeLifeHeader'), 1 => 'nordcode\\corebundle\\entity\\sflifeheader', 2 => NULL), 8 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeCity'), 1 => 'nordcode\\geobundle\\entity\\city', 2 => NULL), 9 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeLifeVideo'), 1 => 'nordcode\\corebundle\\entity\\sflifevideo', 2 => NULL), 10 => array(0 => array(0 => 'nordcode_uploader.listener.serialization_listener', 1 => 'onPreSerializeQuestPhoto'), 1 => 'nordcode\\questbundle\\entity\\questphoto', 2 => NULL)), 'serializer.post_serialize' => array(0 => array(0 => array(0 => 'jms_serializer.stopwatch_subscriber', 1 => 'onPostSerialize'), 1 => NULL, 2 => NULL))));
     return $this->services['jms_serializer'] = new \JMS\Serializer\Serializer($this->get('jms_serializer.metadata_factory'), $this->get('jms_serializer.handler_registry'), $this->get('jms_serializer.unserialize_object_constructor'), new \JMS\DiExtraBundle\DependencyInjection\Collection\LazyServiceMap($this, array('json' => 'jms_serializer.json_serialization_visitor', 'xml' => 'jms_serializer.xml_serialization_visitor', 'yml' => 'jms_serializer.yaml_serialization_visitor')), new \JMS\DiExtraBundle\DependencyInjection\Collection\LazyServiceMap($this, array('json' => 'jms_serializer.json_deserialization_visitor', 'xml' => 'jms_serializer.xml_deserialization_visitor')), $a);
 }