Re: [PHP] Class/function scope general question

2006-05-16 Thread Edward Vermillion
On May 15, 2006, at 7:53 PM, Richard Lynch wrote: You can't do that. Yeah I can, sorta. Well not really as I'm having to pass a reference to the class object around. But that works. The whold class has to be in a single contiguous file. Last I checked. To be able to use $this- in

Re: [PHP] Class/function scope general question

2006-05-15 Thread Richard Lynch
You can't do that. The whold class has to be in a single contiguous file. Last I checked. On the plus side, it's incredibly unlikely that having the functions in separate files was a Good Idea... On Fri, May 12, 2006 12:34 pm, Edward Vermillion wrote: I'm doing some re-writing of a huge class

[PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion
I'm doing some re-writing of a huge class I've got (don't think OOP cause it's really not, just the usual class full of functions). What I'm doing is moving the functions out of the class and into separate files so the (I'm hoping) memory footprint will be smaller. The basic setup I

Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio
2006/5/12, Edward Vermillion [EMAIL PROTECTED]: I'm doing some re-writing of a huge class I've got (don't think OOP cause it's really not, just the usual class full of functions). What I'm doing is moving the functions out of the class and into separate files so the (I'm hoping) memory

Re: [PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion
On May 12, 2006, at 1:09 PM, Martin Alterisio wrote: [snip] When you call a function in the global scope from inside a member function you're leaving the object scope, that's why this is null in the global function But my thought is that since the include was from inside the member

Re: [PHP] Class/function scope general question

2006-05-12 Thread Stut
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()

Re: [PHP] Class/function scope general question

2006-05-12 Thread Martin Alterisio
2006/5/12, Edward Vermillion [EMAIL PROTECTED]: On May 12, 2006, at 1:09 PM, Martin Alterisio wrote: class foo { function bar() { function baz(){} } } baz() will be a global function there. There are other ways to add member functions at runtime but

Re: [PHP] Class/function scope general question

2006-05-12 Thread Edward Vermillion
On May 12, 2006, at 1:55 PM, Stut wrote: 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() {