Encapsulation without classes
| From: | Richard Heyes | Date: | Sun, 10 Sep 2000 21:06:11 +0000 |
| Subject: | Encapsulation without classes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16076@lists.php.net to get a copy of this message | ||
Looking for methods of having encapsulation without using classes. Eg,
with classes you can have variables that are shared between methods and
are specific to that class, but not using classes means using plain
functions and global variables. Plain functions are fine, but not so
keen on global vars. One method I thought of was to use an associative
array with the keys of the array being the "variables".
Any ideas?
TIA
--
Richard Heyes
http://www.heyes-computing.net/scripts/