Levi LOL

Dependency Injection

How does dependency injection work? Is it magic? Does it hurt? The first two questions might be reasonable, and the third one might be something I would ask. Either way, I’ll cover these issues and …

PHP Type Hinting

PHP type hinting is something I’m a huge fan of and think everyone should use. It removes a lot of the guesswork from your PHP; you know that your method will only accept certain types. Being able to …

Factory Design Pattern

In this post, I’m going to talk about a design pattern; a design pattern is something you can use to solve common problems. I’m going to cover a simple example of the “factory design pattern” and an …

Intro to Object Oriented PHP

To learn how to write Object Oriented PHP, we will start with some basics and build upon those. I will use fictitious and realistic examples. We will also use a simple autoloader, so we don’t have to …

Inheritance in PHP

I hope my last post about interfaces didn’t make anyone cry. Even if you didn’t understand it; I hope you keep reading. You may have an “aha!” moment when you least expect it. The last post ran a …

Interfaces in PHP

If you’ve read my post about classes in PHP, then you should have a fair understanding of how those work. I didn’t go into too much detail because I would like to build upon what you read previously. …