ability/composer-reader 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-04