Im having a hard time trying to find whats best for assigning a value of type collection to the model, to be more explicit here is an example of the issue.
lets say that you have a map entity that have a property named routes that accept a collection holds objects of type route, what will be the best way to assign the routes to the map.
A :
public function setRoutes(\route $routes)
{
// routes of type collection
$this->routes->push($route);
}
B :
public function setRoutes(\routesCollection $routes)
{
$this->routes = routes;
}
what will be the best way, and why in a ddd enviroment?
Aucun commentaire:
Enregistrer un commentaire