Update rsf.format.php

This commit is contained in:
Namhyeon Go 2019-05-26 02:16:24 +09:00 committed by GitHub
parent ca1e9e18cb
commit 871203fdbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,10 @@
<?php
// rsf.format.php
/**
* @file rsf.format.php
* @date 2019-05-28
* @author Go Namhyeon <gnh1201@gmail.com>
* @brief the another data format for ReasonableFramework
*/
if(!check_function_exists("get_rsf_encoded")) {
function get_rsf_encoded($data) {
@ -9,6 +14,6 @@ if(!check_function_exists("get_rsf_encoded")) {
$_ks[] = $k;
$_vs[] = make_safe_argument($v);
}
return sprint("(%s)=>('%s')", implode(",", $_ks), implode("','", $_vs));
return sprintf("(%s)=>('%s')", implode(",", $_ks), implode("','", $_vs));
}
}