What version of PHP are you using? I cannot currently find it but previous versions of PHP had trouble with dynamic initializations of objects. If all else fails there is reflection. http://us.php.net/manual/en/book.reflection.php
5.2 is the version that began allowing dynamic class/method referencing, IIRC… It’s certainly been in since then.
Edit: I was thinking of 5.3, and that was for Static methods. Not sure when variable class instantiation was added. Still, if you’re not running 5.3+, might be wise to upgrade.
Actually I think cups asked you to hardcode the class name precisely because he suspected the file was not being included. So I would check the path to the class file.
Firstly as others are suggesting, only troubleshooting for you is; either just try once including the class file temporarily hardcoded or to echo/print the values of each element of the array $value[‘folder’], $value[‘class’], $value[‘method’] including ROOT:
Does this really shows the correct value? If yes there should (must) not be the problem if you are in the PHP version of having Dynamic use of Class Names. Otherwise there is nothing to explore in your code and don’t have to pull out your hair. As per my knowledge, you are on the right track. Better you let us know the PHP version that you are in and at least try to test what the guys have suggested here.
Furthermore, I would recommend you to use require() instead of include() since require() produce FATAL error and halts the script while include will continue with an E_WARNING and maybe you have set error_reporting something to hide warnings. So try once this as well: