Ok so I'm sure there's a nice way to do this. But I'm stuck.
Basically, I have a folder of 'custom handler's that run functions on sets of products. Folder (and namespace) structure looks like this
HANDLERS
-MAIN
--Generate.php
--List.php
-THREAD
--Generate.php
--List.php
-TEST
--Generate.php
--List.php
Inside the 'generate.php' and 'list.php' are static functions, which they all share. In my controller, I want to call one of these handlers based on an atrribute of the model. Something like:
\Handlers\$product->handler\Generate::go();
If the product used 'Thread' it would call
\Handlers\Thread\Generate::go();
Is there an easy way to do this?
Cheers!