Skip to content
Browse files

dynamic collection issue

  • Loading branch information...
1 parent 5c36d63 commit 6a14ed17b0edd3e2b810c3f5c741e72824350ec8 @kkamkou kkamkou committed Jan 7, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/morph/Iterator.php
View
6 src/morph/Iterator.php
@@ -3,9 +3,10 @@
* @package Morph
* @author Jonathan Moss <xirisr@gmail.com>
* @copyright 2009 Jonathan Moss
- * @version SVN: $Id$
*/
+
namespace morph;
+
/**
* An iterator to hold results of a query
*
@@ -86,7 +87,8 @@ private function createObject(array $item)
{
$class = \get_class($this->type);
$object = new $class;
- $object->__setData($item, Enum::STATE_CLEAN);
+ $object->__setData($item, Enum::STATE_CLEAN)
+ ->collection($this->type->collection());
return $object;
}

0 comments on commit 6a14ed1

Please sign in to comment.
Something went wrong with that request. Please try again.