Answer the question
In order to leave comments, you need to log in
Has anyone used DTO+DAO in php?
Actually, they asked me to work with Mysql according to this scheme, I am familiar with DAO, but I haven’t touched DTO yet, what should be there in general?
UPD: phpdao framework
Answer the question
In order to leave comments, you need to log in
DTO - data transfer object, you could even take the info from the wiki.
DTO does not contain behavior, but contains state, so it can be safely passed both within application modules and between separate application instances.
A very simple example is a class object without methods.
More complex contains __contstruct, __toString, or toJson or toXML, these methods are required in a distributed application
class User {
public $username;
public $login;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question