How to allow only authorised clients to access object properties
<p>Some of my PHP domain objects have properties which should be set from outside the object, but only by certain client objects. How can I go about enforcing this?</p>

<p>I am using setters within the class, and provided I can find a way to discriminate between different callers, I'm sure I could do some checking in the setter.  This seems a bit convoluted though.  I get the feeling that I'd be violating an OO design principle (perhaps "tell, don't ask"?).</p>

<p>I imagine this is a reasonably common scenario.  What am I missing?</p>
