承接 geeklab/arraytranslation 相关项目开发

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

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

geeklab/arraytranslation

Composer 安装命令:

composer require geeklab/arraytranslation

包简介

Convert array to another data format or convert a data format to an array.

README 文档

README

Build Status

GeekLab-ArrayTranslation

Convert an array to another data format or convert a data format to an array.

Supports:

  • JSON
  • XML
  • PHP internal session serialized data
  • PHP internal binary serialized data
  • PHP Serialized() data
  • YAML

Todo:

  • WDDX support
  • igbinary support

Installation:

composer require geeklab/arraytranslation

Usage:

<?php
require_once('../vendor/autoload.php');

$at  =  \GeekLab\ArrayTranslation::create('yaml');
$out = $at->encode(array('a' => 'x', 'b' => y', 'c' => 'z');

API:

\GeekLab\ArrayTranslation::create(string $type, string $handler): object

Description:

This is the factory to return the class for array<->data type translation.

$type can be set to xml, json, yaml, php, php_binary or php_binary for now.

$handler is for pointing to a customer handler. Must implement GeekLab\ArrayTranslation\TranslationInterface

Usage:

$at = \GeekLab\ArrayTranslation::create('json');

\GeekLab\ArrayTranslation::encode(array $arr): string

Description:

This method will convert an array to the type the object was created with.

Usage:

$x = $at->encode(array('a', 'b', 'c'));

\GeekLab\ArrayTranslation::encode(string $str): array

Description:

This method will convert a string (data type) to an array.

Usage:

$y = $at->decode('["a","b","c"]');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2018-10-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固