ability/composer-reader
最新稳定版本:1.0.1
Composer 安装命令:
composer require ability/composer-reader
包简介
A simple composer.json file reader
关键字:
README 文档
README
# Composer Reader A simple `composer.json` file reader. ## Installation You can install the package via Composer: ```bash composer require ability/composer-reader
Usage
Basic Usage
To read and parse a composer.json file, you can use the Reader class:
use Ability\ComposerReader\Reader; $context = Reader::create('/path/to/composer.json');
Accessing Data
The Context class provides methods to access the data:
use Ability\ComposerReader\Context; // Get a value by key $value = $context->get('name'); // Check if a key exists $exists = $context->has('require.php');
Array Access
The Context class implements ArrayAccess, so you can use it like an array:
// Get a value by key $value = $context['name']; // Check if a key exists $exists = isset($context['require.php']);
JSON Serialization
The Context class implements JsonSerializable, so you can easily convert it to JSON:
$json = json_encode($context);
Requirements
- PHP >= 8.0
Development
To contribute to this project, you can install the development dependencies:
composer install
License
The MIT License (MIT). Please see License File for more information.
Authors
- Roman Zhakhov roman.zhakhov@thomsonreuters.com
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-04