formapro / Fumocker

A php function mocker.
MIT License
7 stars 1 forks source link

[generator] remove dependency to CallbackRegistry #7

Open makasim opened 12 years ago

makasim commented 12 years ago

It is now hard coupled to CallbackRegistry because the generated function code contains:

<?php
    \$callable = \\Fumocker\\CallbackRegistry::getInstance()->get('{$namespace}', '{$functionName}');

    return \\call_user_func_array(\$callable, \\func_get_args());

we can replace it with an extra parameter functionCode and a method in CallbackRegistry which generates a a code for function.