7 Star 8 Fork 2

呵大官人 / protox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.php 721 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
呵大官人 提交于 2015-10-15 13:04 . add private struct supported
<?php
define('ROOT', dirname(__FILE__));
require('protox.php');
protox::init(array(
'path' => ROOT . '/protocol/',
));
echo "<pre>";
echo "===============signle object================\n";
$input = array(
'name' => 'test',
'age' => '123a',
'qq' => 123456,
'phone' => 111,
'family' => array(
array(
'type' => 'father',
'name' => "test's Dad",
),
array(
'type' => 'mother',
'name' => "test's Mam"
)
)
);
$output = protox::make('person', $input);
var_dump($output);
echo "===============list object================\n";
$input = array(
array(
'name' => 'abc',
'age' => 111,
),
array(
'name' => 'fuck',
'age' => 999
)
);
$output = protox::make('person_list', $input);
var_dump($output);
PHP
1
https://gitee.com/scgywx/protox.git
git@gitee.com:scgywx/protox.git
scgywx
protox
protox
master

搜索帮助

14c37bed 8189591 565d56ea 8189591