Thread:Extension talk:PhpTags/Designing APIs in PhpTags extensions: limitations and best practices/reply (3)


 * The one exception seems to be constants defined through a callback...
 * I agree, so will look even better


 * I'm guessing that objects using it would also be described in the JSON file...
 * Yes of course


 * One comment on the PhpTagsHooks API, now that you're changing it: it may make sense to call the public "set..." methods "add..." or "register..." instead, since they do not replace anything, but instead add/register things.
 * I'm sorry, but I can not understand what you mean. Can you describe this in more detail or with examples?


 * Finally, I had another series of ideas...
 * I plan to make such checks at runtime. I thought a lot about it and came to the conclusion that the best solution would be to create a separate class that will be responsible for it. Every time before calling a function or method the runtime will ask permission. In the basic version, the class will check the namespace only. But you can define your own class that can make decisions based on what you need. For example, you can use a random number generator, and throw an exception "this function can not be called because you are out of luck :-)". It should be a really fun :-D


 * Hope you have a good time as well!
 * Yes, with you it is better. Thanks :-)

Good Luck!