invoke dynamically a class method in PHP
<?php
// http://www.yourhowto.net/how-to-invoke-dynamically-a-class-method-in-php/
$objClass = new myClass();
$methodName = 'setSomeField';
call_user_func( array( $objClass, $methodName ), 'params' );
?>
<?php
call_user_func( array( 'ClassName', 'methodName' ) );
//As of PHP 5.2.3 you can use also this format
call_user_func( 'ClassName::methodName' );
?>