helionogueir/typeboxing

针对类型匹配的特定数据类型和工具

v1.1.0 2016-12-09 18:20 UTC

This package is not auto-updated.

Last update: 2024-09-23 13:52:27 UTC


README

针对类型匹配的特定数据类型和工具。

安装

Composer (https://getcomposer.org.cn/) 和 (https://packagist.org.cn/)

composer require helionogueir/typeboxing

使用

helionogueir\typeBoxing\parse\ObjectToArray

将对象解析为数组

use stdClass;
use helionogueir\typeBoxing\parse\ObjectToArray;
$Object = new stdClass();
$Object->d1 = new stdClass();
$Object->d1->d2 = null;
$array = (new ObjectToArray())->parse($Object);

TDD(测试驱动开发)

PHPUnit (https://phpunit.de/)

phpunit -c ./typeboxing/tests/unit.xml