Home "New class extends" with a name from variable
Reply: 0

"New class extends" with a name from variable

user427 Published in July 22, 2018, 10:28 am

Is it possible to create a class using a variable instead of its name?

Instead of:

class weirdclassname extends WP_widget { .... }

I would like to:

class $nameVariable extends WP_widget { .... }

I need it because I create multiple classes and have to invent many different unique names to prevent conflicts. My imagination is already crying =|

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315968 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO