From: TransientSeeker on


I'm having a very simple problem that I can't seem to find the solution to.
I try and access a method in this class I made called
MyPropertyManagement... the method is named get_complexes(). I try and
strip down the entire class to just focus on this problem with the hopes of
it making things simple enough that the error will become apparent, but
unfortunately it has not. I am able to make a new instances of this class,
add in some other methods and run/use them just fine. For some reason this
method keeps erroring out saying it is undefined. I don't understand why?
Can someone please shed some light on this subject please?

The error is: "Fatal error: Call to undefined method
PropertyMgmt::get_complexes() in /usr/www/test/test2.php on line 6"

The files are as follows:

/*********** /usr/www/test/inc/class/PropertyManagement.class.php


class PropertyMgmt
function PropertyMgmt() {
global $complexes; /* yes I know using globals is dangerous, I
will fix this soon! :-) */

public function PropertyMgmt::get_complexes() {
/* null */

} // end class

/*********** /usr/www/test/test2.php *******************/

$PM = new PropertyMgmt();


/********* end test2.php ************/

Thank you in advance...

PHP 5.3.3
Apache 1.3.37
MySQL 5.0.24a
View this message in context:
Sent from the PHP - General mailing list archive at