Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

dynamic collection issue #23

Merged
merged 1 commit into from Jan 8, 2012
Jump to file or symbol
Failed to load files and symbols.
+4 −2
Split
View
@@ -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;
}