[PHP] Import symbol table into function' scope.

2011-06-15 Thread Дмитрий Степанов
Hello, everybody. Consider the following code: class DB { public function query( $sql) { // ... some magic of DB querying } } class DBReader { public $DB;// instance of DB public function __call( $methodName, $args) { return call_user_func_array( array( $this, $methodName), $args); } protected

Re: [PHP] Import symbol table into function' scope.

2011-06-15 Thread David Harkness
2011/6/15 Дмитрий Степанов dmit...@stepanov.lv So I wonder if there is any way to import scope (symbol table) into the method DBReader::readSomething()? Since you're using call_user_func_array() to call your internal methods already (just to expose protected methods publicly?), you could add