|
-
Apr 13th, 2010, 01:25 AM
#6
Re: How to Restrict Object Instantiation to Other Classes?
I looked at this a few years ago. The debug_backtrace function was the only method I came up with back then also. Another method could be to share a token which is known only to the Machine and Widget classes but that requires some degree of physical separation between them and any "foreign" classes which oughtn't to be able to instantiate a Widget.
Is this for a plugin system?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|