PHP: prevent invocation of method X from from context != Y

Posted by sunwukung on Stack Overflow See other posts from Stack Overflow or by sunwukung
Published on 2010-04-08T15:00:57Z Indexed on 2010/04/08 15:03 UTC
Read the original article Hit count: 307

Filed under:
|
|
|

This is a tricky one.

I am "emulating" ZF Bootstrapping (surface appearance). Don't ask me why, call it academic interest. So I have a Bootstrap Abstract with a method "run" that iterates over itself to locate any methods prefixed with "init".

The application looks for a user defined class which extends this class, in which the user can define any number of methods in this way. However, I want to prevent the user from being able to execute the "run" command of it's parent class, while still exposing the same command for the client code.

Anyone got any thoughts/advice/guidance? regards

SWK

© Stack Overflow or respective owner

Related posts about bootstrap

Related posts about scope