12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2013-present http://www.thinkcmf.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Released under the MIT License.
- // +----------------------------------------------------------------------
- // | Author: Dean <zxxjjforever@163.com>
- // +----------------------------------------------------------------------
- $apps = cmf_scan_dir(CMF_ROOT . 'api/*', GLOB_ONLYDIR);
- foreach ($apps as $app) {
- $routeFile = CMF_ROOT . 'api/' . $app . '/route.php';
- if (file_exists($routeFile)) {
- include_once $routeFile;
- }
- }
- $coreApps = cmf_scan_dir(CMF_ROOT . 'vendor/thinkcmf/cmf-api/src/*', GLOB_ONLYDIR);
- foreach ($coreApps as $app) {
- $routeFile = CMF_ROOT . 'vendor/thinkcmf/cmf-api/src/' . $app . '/route.php';
- if (file_exists($routeFile)) {
- include_once $routeFile;
- }
- }
- if (file_exists(CMF_DATA . "conf/route.php")) {
- $runtimeRoutes = include CMF_DATA . "conf/route.php";
- } else {
- $runtimeRoutes = [];
- }
- return $runtimeRoutes;
|