Tag: Development
Total 3 Posts
PHP's array is a powerful datatype. You can add and remove values of any type at any time. This comes at a cost though: You have no control over what is allowed and what not. This can become a problem in your domain code where you need to define very
Your might have heard of phrases like Dependency Injection, Constructor Injection and Setter Injection. These sound a bit confusing at first, but at the end, the concepts are very simple, but also very powerful. Dependency Injection First, let me explain the phrase Dependency Injection, because it's maybe the simplest one
We write conditionals all the time. Often, we check for very simple things, not worth any extra effort of encapsulation. But in many cases, this makes perfect sense even for very basic things. Let me give you an example: $date = new \DateTime('2016-05-15'); if ($date->format('N') == 6 || $date-&