>Are there any rules as to how information from outside a class can be >moved into it. >What Ive been doing so far is >1. Through the constructor >2. defining a constant >3. Create a method whose sole purpose is to move data from the outside >into the class. > i.e. ><?php >class foo () >{ >......
You could also do: > function outside_data($bar) > { global $foo; But that kinda defeats the whole purpose of having Class objects in the first place... But there are probably times when an experienced programmer will do that, if the variable in question should have been a constant in the first place, or... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php