Welcome Guest, Not a member yet? Register   Sign In
Time::now() in every controller
#4

Hi Maxxd,

Was thinking that but worried any time I use $this->time in controllers it would be using the same instance of the class - not good for date comparisons etc.

Thinking about it I suppose I could just do:

$var1 = $this->time;
$var2 = $this->time;

This would then create 2 versions of the class I'm guessing...

Would I be correct in also saying that as new Time(); would have been called without defaults I would then have to use $var2::parse() to set times etc?

Thanks for you advice on this.
Reply


Messages In This Thread
Time::now() in every controller - by beng - 03-28-2020, 09:05 AM
RE: Time::now() in every controller - by maxxd - 03-29-2020, 07:28 AM
RE: Time::now() in every controller - by beng - 03-29-2020, 07:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB