Im am setting some class attributes as empty array’s with a Class constructor. Later in a Method i insert a value into one of these attributes i.e. $this->attribute1 = array(‘item_01’). Then in the Method i check if this attribute has a value and if it does the Method returns true, else it returns false.
If i check the attribute before i run this Method and after i have run this Method it is empty. Is this a Method scope thing that the attribute only has the value assigned to it when referenced from inside the method that has set it i.e. $this->attribute1. My questions really boils down to why the Class attribute is still empty if i reference it separately even though a Method has been called that assignes it a value.
Thanks!