承接 rexlabs/smokescreen 相关项目开发

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

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

rexlabs/smokescreen

Composer 安装命令:

composer require rexlabs/smokescreen

包简介

Smokescreen is a PHP library for transforming and serializing data such as API responses.

README 文档

README

License: MIT Packagist Build Status Code Coverage StyleCI

Overview

Smokescreen is a PHP library for transforming data. This is ideal for transforming and serializing API responses but can be applied to many scenarios.

See also Smokescreen Laravel Library

Features

  • Simple intuitive interface
  • Transform any type of data (arrays, models, etc.)
  • Embedding of related resources (aka. includes)
  • Declarative includes
  • Includes auto-wiring
  • Declarative fields (including sparse field sets)
  • Eager loading
  • Flexible transformation and serialization
  • Support for lazy loading
  • No other dependencies

Usage

To use Smokescreen, you define transformer for each resource, and then call either the Smokescreen item() or collection() method to transform the data.

Full documentation is available from: https://smokescreen-docs.netlify.com/

Requirements and dependencies

  • PHP >= 7.0

So vanilla.

Installation

Install package via composer:

composer require rexlabs/smokescreen

Laravel package

We provide a Laravel wrapper package which provides some nice conveniences for working within the Laravel framework: rexlabs/laravel-smokescreen

See the Github repository for more information:

Tests

To run phpunit tests:

composer run tests

Feel free to add more tests.

FAQ

Why call it "Smokescreen"

Great question, thanks for asking. Our team racked our brain for several hours to come up with the perfect name for this package. In the end we went with Smokescreen because there is a transformer named smokescreen and it sounds cool.

Why wouldn't I just use Fractal

We took all the good ideas from Fractal, and made it more extensible and safer for children.

Contributing

Pull-requests are welcome. Please ensure code is PSR compliant. Smokescreen on Github

Who do I talk to?

Talk to team #phoenix, or one of these people:

About

  • Author: Jodie Dunlop
  • License: MIT
  • Copyright (c) 2018 Rex Software Pty Ltd

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 18
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固