Yeah, that will work doc, but it is good practice to not have the property available for manipulation directly within a class, and to have it available only through the methods, otherwise it may as well not even have the method as he will be able to just set the var directly ie
That being said, if you are wanting to manipulate the data each time, you are best off using a method, setting the var to private, and having a get and set method for the value to guarantee the variable is properly stored each time, and not be altered accidentally outside of the class. therefore you would need something like this
Something I would like to know myself is is it better to set the var as an array directly, or in the __construct of the class itself, if it even makes any difference
Jay