dnaber/requisite
Composer 安装命令:
composer require dnaber/requisite
包简介
A modular, extensible PHP autoloader.
README 文档
README
Inspired by Tom Buttler and Fuxia Scholz.
This library requires PHP version 5.5.0. If you're looking for older support, use the 1.0 release branch,
that still supports PHP 5.3.0.
Concept
The main idea behind this autoloader is the separation of the file locating (Requisite\Rule) and file loading
(Requisite\Loader) process.
One can register several rules on a main autoloader instance of Requisite\SplAutoloader. The included rule
Rule\NamespaceDiretoryMapper matches namespaces to directory names (which actually implements Psr-4).
Rules
Psr4
Maps namespaces to filesystem directories relative to a base directory and base namespace as described in Psr-4.
ClassMap
Provides a static map of full qualified class names to file names.
Usage examples
/** * Load the Requisite library. Alternatively you can use composer's * autoloader via include vendor/autoload.php */ require_once 'src/Requisite/Requisite.php'; Requisite\Requisite::init(); $autoloader = new Requisite\SplAutoLoader; //load the Monolog lib from the vendor/Monolog directory $autoloader->addRule( new Requisite\Rule\Psr4( __DIR__ . '/vendor/Monolog', // base directory 'Monolog' // base namespace ) ); // configure a ClassMap $autoloader->addRule( new Requisite\Rule\ClassMap( [ 'Foo\Bar' => '/vendor/package/src/Foo/Bar.php', 'Foo\Bazz' => '/vendor/package/src/Foo/Bazz.php' ] ) );
Roadmap
dnaber/requisite 适用场景与选型建议
dnaber/requisite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.62k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 04 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「spl」 「autoload」 「PSR-4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dnaber/requisite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dnaber/requisite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dnaber/requisite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Non-standard PHP library (NSPL) - functional primitives toolbox and more
Environment processor and contexts autoloader
Collection of exception class and utilities
Parse your BBCode easy with this library.
This package contains interfaces for notifications management and capabilities.
This package contains useful classes for notification contracts implementation.
统计信息
- 总下载量: 1.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-21