mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 14:11:35 +00:00
add hook to add additional routes
This commit is contained in:
parent
ebf7fb7591
commit
25c2d03190
|
@ -2611,9 +2611,6 @@ class TestController { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
//$app = new Slim(array('mode'=>'development', '_session.handler'=>null));
|
|
||||||
$app = new \Slim\App();
|
|
||||||
|
|
||||||
/* Middleware for authentication */
|
/* Middleware for authentication */
|
||||||
class Auth { /* {{{ */
|
class Auth { /* {{{ */
|
||||||
|
|
||||||
|
@ -2706,6 +2703,8 @@ class Auth { /* {{{ */
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
$app = new \Slim\App();
|
||||||
|
|
||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
$container['dms'] = $dms;
|
$container['dms'] = $dms;
|
||||||
$container['config'] = $settings;
|
$container['config'] = $settings;
|
||||||
|
@ -2798,6 +2797,14 @@ $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefin
|
||||||
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
||||||
$app->get('/echo/{data}', \TestController::class.':echoData');
|
$app->get('/echo/{data}', \TestController::class.':echoData');
|
||||||
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
|
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
|
||||||
|
|
||||||
|
if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) {
|
||||||
|
foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
|
||||||
|
if (method_exists($hookObj, 'addRoute')) {
|
||||||
|
$hookObj->addRoute($app);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user