title: Doctrine 2 get real class name of proxy class
body: <p>The following:</p>
  
  <p>I have approximantely 20 models. These classes extend a base class. This base class contains a method which should be able to determine the classname of the child element. Normally you could this with:</p>
  
  <pre><code>get_called_class();
  </code></pre>
  
  <p>But in many cases doctrine 2 uses ProxyClasses and in that case the get_called_class() function returns something like:</p>
  
  <pre><code>Proxies\BasePageElementProxy
  </code></pre>
  
  <p>While the original name is \Base\PageElement. Can anybody tell me how I can find out what the name of this class is (without generating the name out of the string Proxies\BaseSectionProxy cause that is dirty and in many cases unreliable).</p>