瀏覽代碼

Merge pull request #143 from hacfi/phpcr

Add Doctrine\ODM\PHPCR\ChildrenCollection to ArrayCollectionHandler
Johannes 11 年之前
父節點
當前提交
02d9b280b1
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/JMS/Serializer/Handler/ArrayCollectionHandler.php

+ 7 - 1
src/JMS/Serializer/Handler/ArrayCollectionHandler.php

@@ -31,7 +31,13 @@ class ArrayCollectionHandler implements SubscribingHandlerInterface
     {
         $methods = array();
         $formats = array('json', 'xml', 'yml');
-        $collectionTypes = array('ArrayCollection', 'Doctrine\Common\Collections\ArrayCollection', 'Doctrine\ORM\PersistentCollection', 'Doctrine\ODM\MongoDB\PersistentCollection');
+        $collectionTypes = array(
+            'ArrayCollection',
+            'Doctrine\Common\Collections\ArrayCollection',
+            'Doctrine\ORM\PersistentCollection',
+            'Doctrine\ODM\MongoDB\PersistentCollection',
+            'Doctrine\ODM\PHPCR\ChildrenCollection'
+        );
 
         foreach ($collectionTypes as $type) {
             foreach ($formats as $format) {