Re: [PHP] include file in a class with global/parent scope?

2009-06-16 Thread Daniel Kolbo
Martin Scotta wrote: Where is $vars? there is no $vars in your code... You can extract all the global space in the CScope method, it's quite simple, but less performant. class CScope { public $vars = 'class scope\n'; function cinclude($filename) {

Re: [PHP] include file in a class with global/parent scope?

2009-06-16 Thread Daniel Kolbo
Hello, I've cleaned up my question a bit. I want the included file which is called within a method of a class to have the same scope as the instantiation of the class's object. That is, i want a class to include a file in the calling object's scope. How would one do this? 'test.php' ?php

Re: [PHP] include file in a class with global/parent scope?

2009-06-16 Thread Shawn McKenzie
Daniel Kolbo wrote: Hello, I've cleaned up my question a bit. I want the included file which is called within a method of a class to have the same scope as the instantiation of the class's object. That is, i want a class to include a file in the calling object's scope. How would one do

Re: [PHP] include file in a class with global/parent scope?

2009-06-16 Thread Shawn McKenzie
Shawn McKenzie wrote: Daniel Kolbo wrote: Hello, I've cleaned up my question a bit. I want the included file which is called within a method of a class to have the same scope as the instantiation of the class's object. That is, i want a class to include a file in the calling object's