Welcome Guest, Not a member yet? Register   Sign In
Change controller class property
#1

[eluser]yabune[/eluser]
Hi,

I define a property inside a controller class:
Code:
class Xpto extends Controller {
  private $abc;

And I can set the value inside the constructer:
Code:
function Xpto()
{
  parent::Controller();
  $this->abc = 'some value';
}

But If I change the value inside another function, the variable doesn't change...

I think it's because when I call a function, the object class is recreated... Is there any way to store the variable value? How can I keep its value?

Any help on this?

Thanks!


Messages In This Thread
Change controller class property - by El Forum - 11-22-2009, 08:27 AM
Change controller class property - by El Forum - 11-22-2009, 09:22 AM
Change controller class property - by El Forum - 11-22-2009, 09:25 AM
Change controller class property - by El Forum - 11-22-2009, 09:33 AM
Change controller class property - by El Forum - 11-22-2009, 10:50 AM
Change controller class property - by El Forum - 11-22-2009, 11:10 AM
Change controller class property - by El Forum - 11-22-2009, 11:18 AM
Change controller class property - by El Forum - 11-22-2009, 11:33 AM
Change controller class property - by El Forum - 11-22-2009, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB