Create a class variable in extension?
| From: | phpdev at techmeridian dot com | Date: | Fri, 08 Nov 2002 21:17:37 +0000 |
| Subject: | Create a class variable in extension? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-90667@lists.php.net to get a copy of this message | ||
Hello,
1. I have been able to create a class within my extension, but am unable
to create a class variable that can be used throughout the class
methods. This class variable needs to be an array. Below is how I would
write the class in php.
class foo {
var $foo = array();
functions...
}
2. How can you create a constructor for your class in an extension that
loads when somebody calls $var = new foo();? Below is what I mean in php
classes:
class foo {
function foo() {
...
}
}
Thanks for any help,
Daniel Simser
phpdev@techmeridian.com