Moving features folders, enabling the ActionsByEmail rest api endpoints
This commit is contained in:
@@ -328,24 +328,24 @@ class WebApplication
|
||||
//if (! class_exists($namespace)) {
|
||||
require_once $classFile;
|
||||
//}
|
||||
|
||||
//echo "****".$namespace."<br>";
|
||||
$this->rest->addAPIClass($namespace);
|
||||
}
|
||||
}
|
||||
|
||||
// adding features extension api classes
|
||||
$featuresPath = $this->workflowDir .'engine' . DS . 'classes' . DS . 'features';
|
||||
$featuresPath = $this->workflowDir .'engine' . DS . 'features';
|
||||
// $apiDir - contains directory to scan classes and add them to Restler
|
||||
$featureDirList = glob($featuresPath . "/*", GLOB_ONLYDIR);
|
||||
foreach ($featureDirList as $directory) {
|
||||
if ($directory == 'ViewContainers') {
|
||||
continue;
|
||||
}
|
||||
$featureApiClassList = Util\Common::rglob($directory . DS . 'api' . "/*");
|
||||
$featureApiClassList = Util\Common::rglob($directory . DS . 'Services' . DS . 'Api' . "/*");
|
||||
foreach ($featureApiClassList as $classFile) {
|
||||
if (pathinfo($classFile, PATHINFO_EXTENSION) === 'php') {
|
||||
$relClassPath = str_replace('.php', '', str_replace($servicesDir, '', $classFile));
|
||||
$namespace = 'Features\\'.basename($classFile, '.php');
|
||||
$namespace = '\\ProcessMaker\\Services\\Api\\'.basename($classFile, '.php');
|
||||
$namespace = strpos($namespace, "//") === false? $namespace: str_replace("//", '', $namespace);
|
||||
require_once $classFile;
|
||||
$this->rest->addAPIClass($namespace);
|
||||
@@ -430,6 +430,7 @@ class WebApplication
|
||||
define("PATH_XMLFORM", PATH_CORE . "xmlform" . PATH_SEP);
|
||||
define("PATH_CONFIG", PATH_CORE . "config" . PATH_SEP);
|
||||
define("PATH_PLUGINS", PATH_CORE . "plugins" . PATH_SEP);
|
||||
define("PATH_FEATURES", PATH_CORE . "features" . PATH_SEP);
|
||||
define("PATH_HTMLMAIL", PATH_CORE . "html_templates" . PATH_SEP);
|
||||
define("PATH_TPL", PATH_CORE . "templates" . PATH_SEP);
|
||||
define("PATH_TEST", PATH_CORE . "test" . PATH_SEP);
|
||||
|
||||
Reference in New Issue
Block a user