承接 samlitowitz/php-collection-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

samlitowitz/php-collection-generator

最新稳定版本:2.0.0

Composer 安装命令:

composer create-project samlitowitz/php-collection-generator

包简介

A tool to generate PHP collection implementations

README 文档

README

Generate type-safe PHP collections!

Table of Contents

  1. Installation
  2. Usage
    1. Configuration
  3. Collection Interfaces and Additional Methods
    1. Interfaces
  4. Future Features

Installation

composer require --dev samlitowitz/php-collection-generator

Usage

  1. Create a configuration targeting the type(s) you wish to generate a collection for.

  2. Generate the desired collection(s) by running the following command

    ./vendor/bin/php-collection-generator --config /path/to/php-collection-generator.json generate /path/to/output/dir

Configuration

A JSON schema for the configuration is available here. The TypeCollection is generated using the example configuration.

Collection Interfaces and Additional Methods

Interfaces

The generated collection will implement the following interfaces

  1. \Countable
  2. \Iterator
  3. \JsonSerializable

Additional Methods

The generated collection includes the following methods in addition to those needed to fulfil the above interfaces

  1. public function toArray(): array
  2. public function add(\Fully\Qualified\Namespace\Type ...$entities): void

Future Features

  1. Output File Formatting
    1. Configuration options
      1. type-hint member variables
        1. inline
        2. as comment

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固