2011/6/15 Дмитрий Степанов
> 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 $DB as a
paramete
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
2 matches
Mail list logo