<?php
class test
{
    function __construct($m, $s)
    {
    }
    function foo()
    {
	echo '<hr>we r here!<br><hr>';
    }
};

function test_class_factory($product, $arg, $s)
{
    if ($product == 'test') return new test($arg, $s);
    else throw new Exception('Unable to build such product `'.$product.'`');
}

?>
