Can namespaces be used with restler?

I am using the restler library from Luracast and I would like to use namespaces for my API classes. As an example, you can do:

$r = new Restler();
$r->addAPIClass('\fully\qualified\path\Foo');
$r->handle();

Currently, it throws an error on line 340 in the restler.php file:

Fatal error: Class 'Foo' not found in /work/projects/xxxx/lib/Restler/restler/restler.php on line 341

Now I have conflicting class names, and I would like to use namespaces, rather than crack the problem.

+3
source share
1 answer

Restler has not supported namespaces so far!

We just added support for Restler 2.1.7 namespaces and released it now

$r = new Restler();
$r->addAPIClass('fully\qualified\path\Foo');
$r->handle();

should work fine now :)

0
source

All Articles