Search code examples
phprestler

How to execute Restler::handle() with custom $request object?


I have have a resource GET /say/hello/:name. How can I get response from this resource with custom context? I am expecting this code:

<?php
$request = Request('GET', '/say/hello/World');
$app = new Luracast\Restler\Restler();
$output = $app->handle($request);

Thanks


Solution

  • Reslter 3 (current stable version) does not support request object yet. We will consider adding this as a feature in future release!

    https://github.com/Luracast/Restler/issues/340