我正在使用Luracast的restler库,我想在我的API类中使用命名空间。例如,我可以这样做吗:
我正在使用 Luracast 的 restler 库,我希望在我的 API 类中使用命名空间。例如,我可以这样做:
$r = new Restler();
$r->addAPIClass('\fully\qualified\path\Foo');
$r->handle();
目前它在 restler.php 的第340行上抛出一个错误:
Fatal error: Class 'Foo' not found in /work/projects/xxxx/lib/Restler/restler/restler.php on line 341
我现在有冲突的类名,想要使用命名空间来避免问题而不是进行hack。