Hi, This is not a Symfony / Doctrine specific question but well.. I'm sure you can help me with this.
I have to instantiate a doctrine table dynamically: *$table = 'MyDoctrineTable'; $instance = $table::getInstance();* In my dev server (PHP v5.3.2) it works fine. In my production server (PHP v5.2.10) it doesn't. So.. I changed the previous statement for: *$instance = Doctrine_Core::getTable( $table )*; And it works fine. The question is.. is this a PHP v5.3 specific feature? if that's so, which would be the better way to instantiate dynamic classes with dynamic parameters? a custom factory comes to mind but I would like to know which would be the most portable way because I need to work with both versions of PHP. The problem here is the use of the "::" operator with a class being in a variable? ( $table::getInstance() ) Thanks in advance. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en