2008年12月11日星期四

[fw-mvc] Is it right to pass the Request object to the Model?

Hi there,

I'm thinking about passing the request object to the Model so that it
aggregates the request object.

class UsersModel
{
protected $_request = null;
protected $_tableLocator = null;

public function __construct(Zend_Controller_Request_Http $request,
DP_Table_Locator $tableLocator)
{
$this->_request =$request;
$this->_tableLocator =$tableLocator;
}

public function save(){}

public function delete(){}

public function getForm(){}

public function getDataGrid(){}
}

Anyone see anything wrong with this?
Thank you in advance for your replies and interest.

regards,

-----

R. Villar David
Lead Developer, DevProducts Pty Ltd
p: +61 2 9648 3777 f: +61 2 9648 6988
w: http://www.devproducts.com
--
View this message in context: http://www.nabble.com/Is-it-right-to-pass-the-Request-object-to-the-Model--tp20964991p20964991.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: