Edward Vermillion wrote:
But my thought is that since the include was from inside the member
function that the included function would be in the scope of the member
function, and not global. (?)
So if I have:
class foo {
function bar()
{
function baz(){}
}
}
Would baz() be out of class scope here? Or are includes automatically
global no matter where they are called? Or is it the convoluted manner
in which I'm getting to baz() that's causing this?
Scope is your issue here. Functions and classes defined in included
files are registered at the global level. Therefore within your include
file you do not have a $this because your function is actually defined
outside the class.
The example you give above I'm not so sure about. I believe baz()
wouldn't have a $this variable, but stick some code in it to check.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php