定制 gnugat/nomo-spaco 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gnugat/nomo-spaco

最新稳定版本:v0.4.3

Composer 安装命令:

composer create-project gnugat/nomo-spaco

包简介

Displays the declared fully qualified classnames of a project

README 文档

README

Finds available Fully Qualified ClassNames (fqcn) in a project.

Caution: this is a prototype, the work is still in progress.

Note: a Fully Qualified ClassName (fqcn) is a classname with its complete namespace (e.g. Symfony\Component\HttpFoundation\Request).

Installation

Use Composer to install this library in your projects:

composer require "gnugat/nomo-spaco:~0.4" 

Features

Find in path

In order to find all available fully qualified classnames of a PHP project, you need to provide the path to its root:

<?php require __DIR__.'/vendor/autoload.php'; $fqcnRepository = \test\Gnugat\NomoSpaco\make_fqcn_repository(); $allFqcns = $fqcnRepository->findIn(__DIR__);

Caution: the make_fqcn_repository function is only available for demonstration purpose. Please use a proper Dependency Injection Container.

Find in path for classname

In order to find all possible fully qualified classnames for a given class, you need to provide the path to the project's root and the classname:

<?php require __DIR__.'/vendor/autoload.php'; $fqcnRepository = \test\Gnugat\NomoSpaco\make_fqcn_repository(); $possibleFqcns = $fqcnRepository->findInFor(__DIR__, 'Classname');

How does this work?

Nowdays PHP projects are powered by Composer, a package manager that installs an autoloads them. This breaks native functions like get_declared_classes.

Nomo Spaco tries to fix this issue in an old fashion way:

  • find all PHP files in a project
  • for each file, find the namespace using PHP tokens
  • for each file, find class names using PHP tokens

Demonstration

You can display the list of all fully qualified classnames of a project using:

php ./test/findAll.php <projectRoot> 

You can display the list of all fully qualified classnames of a project's class using:

php ./test/findOne.php <projectRoot> <classname> 

统计信息

  • 总下载量: 166.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 25
  • 点击次数: 3
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 25
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固