is the $this variable affectation authorized
(clean enough)?
It's works in 4.1.x, but next php versions...

class X {
        function polymorph($class){
                // Backup vars here
                $this=new $class();
                // Restore vars here

What is the usage?
- A (MySQL) table
- A class to manage the table
- A class by record type

$x=new X();
switch($x->type){// Got by read_record
case 'X1':
case 'X2':
$x->specific_method();// From X1 or X2 class

Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en franšais !
Yahoo! Mail : http://fr.mail.yahoo.com

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to