PHP get the calling object on a method
<p>Is there a way to get the actual calling object from a method?</p>

<p>For example, I have a scenario where I do something like this:</p>

<pre><code>$user = new User;
$user-&gt;setName('name');
$user-&gt;save($user);
</code></pre>

<p>Instead of passing the $user to the save method, it would be nice to just have it get the calling object information.</p>

<p>I know I can do <code>get_called_class()</code> but that doesn't return the actual object's data.  I was also looking at PHP's Reflection classes but didn't see anything exactly right.</p>

<p>Any ideas?</p>

<p>Thanks!</p>
