Restler icon indicating copy to clipboard operation
Restler copied to clipboard

Switching from Resources to Explorer class.

Open yeehahboogie opened this issue 11 years ago • 1 comments

I'm trying to migrate up to the v3 branch on git from rc5 and can't seem to get the switch from Resources to Explorer right. Do I still need to reference the Resources class? The Explorer class never executes anything to do with $excludedPaths.

// Libraries.
use Luracast\Restler\Restler;
use Luracast\Restler\Defaults;
use Luracast\Restler\Explorer;

Explorer::$excludedPaths = array('authorize', 'login', 'grant', 'setPaginationLinkPreviousPage', 'setPaginationLinks', 'server');
Explorer::$hideProtected = false;

$r->addAPIClass('Dafwa\\SoilWater\\SoilWater');
$r->addAPIClass('Explorer');

yeehahboogie avatar May 13 '15 07:05 yeehahboogie

excluded paths should be urls relative to the api root. Looking at your example I guess authorize login etc are the methods in SoilWater class

So the exclude paths should be

Explorer::$excludePaths = array('soilwater/authorize', 'soilwater/login'); // do add the rest of the urls in a similar way

Arul- avatar May 25 '15 05:05 Arul-