pear auth loginfunction problem

From: Date: Thu, 24 Jul 2003 13:09:15 +0000
Subject: pear auth loginfunction problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6789@lists.php.net to get a copy of this message
Hello, I am trying to integrate PEAR AUTH module into my application. I have a login method inside a class that is used to generate the login html. If I try to pass the method name as the login function parameter like this: $auth = new Auth("DB",$options, $this->view->display($error ="")); But it doesn't work because my loginfunction $this->view->display($error ="") is a method of a class, not an independent function and thus the Auth.php following if statement of Auth constructor will never be true: if ($loginFunction != "" && function_exists($loginFunction)) { ........ If the if clause contained a method_exists statement, there would be some chances that it worked. Is there a way to work around this, like "fool" the application that my method is a function or something else? Any examples that I could look at? I do not want to change my class-based code back into procedural code. Regards, Maarit _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

« previous php.pear.general (#6789) next »