WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am creating a wrapper class for wordpress settings API to generate theme options page. i used singleton design pattern to avoid multiple instance. is it the right place to use the pattern ? because wrapper class acts like a helper here so i dont think multiple instances are required.

And when i am extending the wrapper class can i inherit the singleton in child class as well?

child class is basically for custom fields(text,checkbox,etc).


share|improve this question

closed as not constructive by Rarst Oct 11 '12 at 18:12

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

WP is still mostly coded in functional style so there are almost none class-based conventions for API access and such. Simply put - if it makes sense for you and from general PHP programming perspective then it's fine. – Rarst Oct 11 '12 at 18:12

Browse other questions tagged or ask your own question.