There are businesses and people. People could be liked and businesses could be commented on: class Like class Comment class Person implements iLikeTarget class Business implements iCommentTarget ...
If I chain some setters together and one of them does not return $this, then I will get a fatal error. But maybe that is a good thing. $object = new object(); ...
The question is about typehinting of the role interfaces. The code example has two DataMappers which typehint the interface they need in the constructor, FooDataMapper type hints the Preparable ...
I have seen many frameworks and modules and their standard they follow is like this UserInterface which have some predefined methods AbstractUserClass which implements userInterface Then ...
What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
The design of a generic data synchronizer, or, an [object] that does [actions] with the aid of [helpers]
I'd like to create a generic data-source "synchronizer," where data-source "types" may include MySQL databases, Google Spreadsheets documents, CSV files, among others. I've been trying to figure out ...
First of all, my ubiquitous language is PHP, and I'm thinking about learning Java. So let me split my question on two closely related parts. Here goes the first part. Say I have a domain-model ...
I noticed that as of PHP5, interfaces have been added to the language. However, since PHP is so loosely typed, it seems that most of the benefits of using interfaces is lost. Why is this included in ...