Interface problem...

From: Date: Mon, 18 Sep 2000 09:28:51 +0000
Subject: Interface problem...
Groups: php.general 
Request: Send a blank email to php-general+get-17153@lists.php.net to get a copy of this message
Hello gurus... I am going to create a system (in php) of loadable modules similar to Win32/COM. I am working on interface system and I want to use a "Variable functions" feature for it. Unfortunately it doesn't work for class methods. Here is a code: <?php class Test { var $varFunc = "func1"; function func1() { echo "exec: func1"; } } $t = new Test; $t->varFunc(); ?> it causes: Fatal error: Call to unsupported or undefined function varfunc() in /storage/home/trybak/public_html/index.php on line 13 Is it a bug or what? Do You know any good way to separate class methods and limit range of visible methods? for example: <?php class TestImp { function func1() { } function func2() { } function func3() { } } class TestImpInterface { var $___testImp = new TestImp; var $availableFunc1 = "$this->___testImp->func1"; } $test = new TestImpInterface; $test->availableFunc1(); // it doesn't work of course and causes the same error ?> Thank You very much for Your future help! Tristan Rybak

« previous php.general (#17153) next »