sikessem/organizer

Organizer 简化 PHP 模块的从根目录的导入/导出。

dev-main 2022-02-16 18:02 UTC

This package is auto-updated.

Last update: 2024-09-13 21:37:54 UTC


README

Organizer 简化 PHP 模块的从根目录的导入/导出。

安装

使用 Composer 安装库,请执行此命令: composer require organizer/organizer 或者 点击此处直接下载 ZIP 格式

用法

<?php
$root =  __DIR__;
$organizer_root = "$root/vendor/organizer/organizer";
$organizer = require_once "$organizer_root/bootstrap.php";

$organizer->organize($root);  // You can use the function organize() if it not exist in your project

// Search and require my.module or my.module.php or my/module or my/module.php from $root and $organizer_root
$organizer->import('my.module'); // You can use the function import() if it not exist in your project

要求

PHP 8 或更高版本(建议使用至少 8.0 以避免潜在的错误)

作者

网站 | 电子邮件 | LinkedIn | GitLab | GitHub | npm | Composer - Packagist | Twitter

安全报告

请将任何敏感问题发送到 report@sikessem.com。谢谢!

许可证

Organizer 在 Apache 2.0 许可证下发布 - 请参阅 LICENSE 文件以获取详细信息。

贡献

对于任何贡献,请按照以下步骤操作

  1. 使用 git clone https://github.com/SIKessEm/Organizergit remote add origin https://github.com/SIKessEm/Organizer 克隆存储库,然后 git branch -M main
  2. 创建一个新的分支。例如: git checkout -b my_contribution
  3. 完成更改后,使用 git push -u origin main 提交更改。您将获得其他通知。