tsantos/serializer 问题修复 & 功能扩展

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

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

tsantos/serializer

Composer 安装命令:

composer require tsantos/serializer

包简介

Object (de)serializer component for PHP

README 文档

README

Build Status Quality Gate Status Coverage Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available

TSantos Serializer is a library to encode/decode PHP objects to some string representation. Because of its exclusive serialization strategy, this library is the faster serialization component to PHP.

Instalation

You can install this library through composer:

composer require tsantos/serializer

or just add tsantos/serializer to your composer file and then

composer update

Usage

The best way to get start with TSantos Serializer is by using the builder. With a few configurations you are ready to serialize your data:

use TSantos\Serializer\SerializerBuilder;

class Post {
    public $title;
    public $summary;
}

$serializer = (new SerializerBuilder())
    ->setHydratorDir('/path/to/generated/hydrators')
    ->build();

$person = new Post('Post title', 'Post summary');

echo $serializer->serialize($person); // {"title":"Post title", "summary":"Post summary"}

This is the simplest example to get you started with TSantos Serializer. There are a lot of capabilities which you should know in order to master your serializer instance and take advantage of all library's power.

Features

Main features currently supported by TSantos Serializer:

  • No need to mapping classes for simple use cases ...
  • ... but supports YAML, XML and Annotations mapping formats for advanced mapping
  • Supports JSON encoders
  • (De-)serializes objects of any depth
  • Virtual properties
  • Properties grouping
  • Event listeners to hook into serialization operations
  • (De-)serializes interfaces and abstract classes

Documentation

Please refer to the documentation page to see all allowed configurations.

Licence

MIT

Tests

vendor/bin/phpunit -c phpunit.xml.dist

统计信息

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

GitHub 信息

  • Stars: 28
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固