Using Namespaces In WordPress Development

Namespacing and class autoloaders are two important tools provided by PHP that WordPress developers should take advantage of more frequently. I wrote about why, and provided a brief introduction to both of these tools in my last article for Torque. This article offers an in-depth introduction to namespaces in PHP. Namespaces are the better, more flexible version of using unique preferences in your class names. In addition they help structure your directories and allow you to take full advantage of autoloaders that follow the latest standards, including Composer’s autoloader. This article assumes that you’re already familiar with the basics of object-oriented PHP. If … Continue reading Using Namespaces In WordPress Development