title: Get image path from file reference in Extbase PHP based view (TYPO3)
body: <p>I use a PHP based view to return XML in an Extbase extension (TYPO3 6.2). All works great except for the path of images that needs to be included in the XML.</p>
  
  <p>I use the following to get the file reference:</p>
  
  <pre><code>$user-&gt;addChild('event_image', $event-&gt;getPerformance()-&gt;getEventImage());
  </code></pre>
  
  <p>The output in XML is:</p>
  
  <pre><code>&lt;event_image&gt;TYPO3\CMS\Extbase\Domain\Model\FileReference:124&lt;/event_image&gt;
  </code></pre>
  
  <p>When I try to get the URL path to the image with this code</p>
  
  <pre><code>$user-&gt;addChild('event_image', $event-&gt;getPerformance()-&gt;getEventImage()-&gt;getImage()-&gt;getOriginalResource()-&gt;getPublicUrl());
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined method
    TYPO3\CMS\Extbase\Domain\Model\FileReference::getImage()</p>
  </blockquote>
  
  <p>My question: How can I get the URL path from the file reference?</p>