It has become common to treat models in ZF as pure data objects, i.e. a class instance with a bunch of attributes and getters/setters.
class Model_User {
public $id;
public $name;
...
}
What I'm wondering is whether or not it makes sense to, for example, instantiate such an object in a controller and pass it to a service layer, or whether or not the service layer should itself be responsible for instantiating these objects... You would not instantiate a Zend_DbTable
class directly in the controller, so does it make much sense to instantiate a Model_User
in a controller to pass it to a service?