承接 lyzframework/directory-class-reader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lyzframework/directory-class-reader

最新稳定版本:1.0.0

Composer 安装命令:

composer require lyzframework/directory-class-reader

包简介

README 文档

README

This is a project to facilitate the reading of PHP classes from a directory.

composer require lyzframework/directory-class-reader

It contains two classes for this purpose:

  • ReaderFilesPHPDirectory: reads all PHP files from a directory recursively. Instantiate the class by passing the mandatory $directory parameter, and then call the getListFiles() method to retrieve the list of files.

  • ReaderClassDirectory: reads all files from a directory and retrieves the namespace so that you can instantiate the classes. Instantiate the class by passing the mandatory $readerFilesPHPDirectory parameter of type ReaderFilesPHPDirectory. After that, call the getListNamespace() method to retrieve an array with all the namespaces found.

A common use case is when you have a directory with several controllers that have routes mappings, and you want to retrieve all these controllers and perform a reflection treatment to extract the meta-information.

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-05