浏览代码

Merge branch 'master' of github.com:schmittjoh/JMSSerializerBundle

Johannes Schmitt 14 年之前
父节点
当前提交
53511af34f
共有 2 个文件被更改,包括 11 次插入6 次删除
  1. 11 3
      Resources/doc/index.rst
  2. 0 3
      Serializer/GraphNavigator.php

+ 11 - 3
Resources/doc/index.rst

@@ -71,6 +71,8 @@ Usage
 De-/Serializing Objects
 ~~~~~~~~~~~~~~~~~~~~~~~
 
+::
+
     $serializer = $container->get('serializer');
     $serializer->serialize(new MyObject(), 'json');
     $serializer->serialize(new MyObject(), 'xml');
@@ -294,6 +296,8 @@ Examples::
 ~~~~~~~~
 This allows you to specify the name of the top-level element.
 
+::
+
     <?php
     
     use JMS\SerializerBundle\Annotation\XmlRoot;
@@ -304,7 +308,7 @@ This allows you to specify the name of the top-level element.
         private $name = 'Johannes';
     }
     
-Resulting XML:
+Resulting XML::
 
     <user>
         <name><![CDATA[Johannes]]></name>
@@ -315,6 +319,8 @@ Resulting XML:
 This allows you to mark properties which should be set as attributes,
 and not as child elements.
 
+::
+
     <?php
     
     use JMS\SerializerBundle\Annotation\XmlAttribute;
@@ -326,7 +332,7 @@ and not as child elements.
         private $name = 'Johannes';
     }
     
-Resulting XML:
+Resulting XML::
 
     <result id="1">
         <name><![CDATA[Johannes]]></name>
@@ -338,6 +344,8 @@ This allows you to define several properties of how arrays should be
 serialized. This is very similar to @XmlMap, and should be used if the
 keys of the array are not important.
 
+::
+
     <?php
     
     use JMS\SerializerBundle\Annotation\XmlList;
@@ -365,7 +373,7 @@ keys of the array are not important.
         }
     }
 
-Resulting XML:
+Resulting XML::
 
     <post>
         <comment>

+ 0 - 3
Serializer/GraphNavigator.php

@@ -78,9 +78,6 @@ final class GraphNavigator
             }
 
             $metadata = $this->metadataFactory->getMetadataForClass($type);
-            if (0 === strpos($type, 'ArrayCollection<')) {
-                die ('foo');
-            }
             if (null !== $this->exclusionStrategy && $this->exclusionStrategy->shouldSkipClass($metadata)) {
                 if ($isSerialization) {
                     $this->visiting->detach($data);