title: How to use Zend Framework's Partial Loop with Objects
body: <p>I am quite confused how to use <code>partialLoop</code></p>
  
  <p>Currently I use</p>
  
  <pre><code>foreach ($childrenTodos as $childTodo) {
    echo $this-&gt;partial('todos/_row.phtml', array('todo' =&gt; $childTodo));
  } 
  </code></pre>
  
  <p><code>$childrenTodos</code> is a <code>Doctrine\ORM\PersistantCollection</code>, <code>$childTodo</code> is a <code>Application\Models\Todo</code></p>
  
  <p>I tried doing </p>
  
  <pre><code>echo $this-&gt;partialLoop('todos/_row.phtml', $childrenTodos)
            -&gt;setObjectKey('Application\Models\Todo');
  </code></pre>
  
  <p>But in the partial when I try to access properties/functions of my Todo class, I cant seem to get them always ending up with either call to undefined method <code>Zend_View::myFunction()</code> when I use <code>$this-&gt;myFunction()</code> in the partial or if I try <code>$this-&gt;todo-&gt;getName()</code> I get "Call to a member function getName() on a non-object". How do I use partialLoops?</p>