NodeService.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | EasyAdmin
  4. // +----------------------------------------------------------------------
  5. // | PHP交流群: 763822524
  6. // +----------------------------------------------------------------------
  7. // | 开源协议 https://mit-license.org
  8. // +----------------------------------------------------------------------
  9. // | github开源项目:https://github.com/zhongshaofa/EasyAdmin
  10. // +----------------------------------------------------------------------
  11. namespace app\admin\service;
  12. use EasyAdmin\auth\Node;
  13. class NodeService
  14. {
  15. /**
  16. * 获取节点服务
  17. * @return array
  18. * @throws \Doctrine\Common\Annotations\AnnotationException
  19. * @throws \ReflectionException
  20. */
  21. public function getNodelist()
  22. {
  23. $basePath = base_path() . 'admin' . DIRECTORY_SEPARATOR . 'controller';
  24. $baseNamespace = "app\admin\controller";
  25. $nodeList = (new Node($basePath, $baseNamespace))
  26. ->getNodelist();
  27. return $nodeList;
  28. }
  29. }