Restful Feature,

- made some improvements to read & generate config file
- now the rest-gen bin can be generate rest api for a plugin from a <plugin-name>/config/rest-config.ini
conf file.
- plugins should have a directory services/rest containing all rest classes, like PM structure at CORE_PATH.
This commit is contained in:
Erik Amaru Ortiz
2012-08-27 10:48:32 -04:00
parent 4c39d775b5
commit 6e5c72d00d
5 changed files with 212 additions and 170 deletions

View File

@@ -1244,7 +1244,11 @@ class PMPluginRegistry {
$restService->classname = $classname;
if (empty($path)) {
$path = PATH_PLUGINS . $restService->sNamespace . "/classes/rest/$classname.php";
$path = PATH_PLUGINS . $restService->sNamespace . "/services/rest/$classname.php";
if (! file_exists($path)) {
$path = PATH_PLUGINS . $restService->sNamespace . "/services/rest/crud/$classname.php";
}
}
if (! file_exists($path)) {