Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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).

thanks.

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.