So, please, don't do that. It hurts.
Slightly unfair - since we don't know why it's needed. I can think of sensible reasons for doing this sort of thing.
For example, I've done something similar when I have had a Template Toolkit based system with "user" and "admin" views of the same structures.
To prevent "user" templates being able to do "admin" things by accident I created separate Admin and User classes that delegated a suitable subset of methods to the underlying object.
By only supplying the appropriate plugins to the appropriate templates I get a far safer system and can let the designers go play with the templates without a care in the world.
In reply to Re^2: Filtering access to an Objects functions
by adrianh
in thread Filtering access to an Objects functions
by CTSMan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |