The two things I write most about for Torque are object-oriented PHP and the WordPress REST API. In this article, I will bring them together to show you how to build out a collection of custom REST API routes while applying the principles of object-oriented PHP. One of the great things about inheritance in object-oriented PHP is that it lets us share code between classes. There are a lot of ways to avoid repeating ourselves in our code. Inheritance is one of them and should only be used when two or more classes have similar purposes. If you have a […]
2 Comments
Join the conversation