The [real] reason for using properties in an interface is to indicate that the DTO class has a certain aspect, for example. IOrderable {OrderDate, OrderStatus}, IDeliverable {DeliveryAddress, Route, ...} etc. Aspect can be used in a number of DTOs, for example. Sales Order, Work Order, Invoices, etc. A DTO class can support several aspects, that is, multiple inheritance, which is desirable in data classes (but not in class classes). After that, the DTO client is sure that he can view the DTO through this aspect (interface contract). This template complies with all 5 SOLID principles.
In PHP, the closest to interface properties are the features of http://php.net/manual/en/language.oop5.traits.php . Like interfaces, features cannot be created, but they can be used directly in classes without their implementation.
Michael 03 Oct '17 at 11:39 on 2017-10-03 11:39
source share