bitandblack/composer-helper

一些额外的Composer函数

2.0.0 2024-09-26 21:39 UTC

This package is auto-updated.

Last update: 2024-09-26 21:39:59 UTC


README

PHP from Packagist Latest Stable Version Total Downloads License

Bit&Black Composer Helper

此库为Composer提供了一些有用的函数。

安装

此库是为与Composer一起使用而制作的。通过运行 $ composer require bitandblack/composer-helper 将其添加到您的项目中。

用法

vendor 文件夹的路径

通过调用以下方式获取您的 vendor 文件夹的路径

<?php

use BitAndBlack\Composer\VendorPath;

$vendorFolder = (string) new VendorPath();

当您的 vendor 文件夹具有不同的名称时,这也适用。

类存在性检查

通过调用 Composer::classExists() 检查类是否存在。这是对可能不适用于Composer的 class_exists() 的替代。

帮助

如果您有任何问题,请随时通过 hello@bitandblack.com 联系我们。

有关Bit&Black的更多信息,请访问 www.bitandblack.com