[Solar-talk] Solar::server('REMOTE_ADDR')

Paul M Jones pmjones at solarphp.com
Sat Sep 23 06:59:59 PDT 2006


On Sep 23, 2006, at 5:22 AM, Antti Holvikari wrote:

> I don't exactly have an answer to your question but what I would do is
> to use that $this->_request->server('REMOTE_ADDR') in my controller
> and pass that as a param to the model object. That is, I try to
> prevent using superglobals in my models.

I have to agree with Antti here.  Even as recently as a few months  
ago, I was using Solar::server('REMOTE_ADDR') in model classes, but I  
realize now that it's not a great idea.  I now do as Antti mentions;  
i.e., pass the address in from the controller instead of using  
superglobals in models.


--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list