keboola/codebuilder
最新稳定版本:1.0.2
Composer 安装命令:
composer require keboola/codebuilder
包简介
Execute JSON defined user scripts
关键字:
README 文档
README
Description
Execute user scripts defined in a JSON
Allowed functions
md5: Generate a md5 key from its argument valuesha1: Generate a sha1 key from its argument valuetime: Return time from the beginning of the unix epoch in seconds (1.1.1970)date: Return date in a specified formatstrtotime: Convert a date string to number of seconds from the beginning of the unix epochbase64_encodehash_hmac: See PHP documentationsprintf: See PHP documentationconcat: Concatenate its arguments into a single stringifempty: Return first argument if is not empty, otherwise return second argumentimplode: Concatenate an array from the second argument, using glue string from the first arghash: See PHP documentation
Syntax
The function must be specified in a JSON format, which may contain one of the following 4 objects:
- String:
{ "something" } - Function: One of the allowed functions above
-
Example (this will return current date in this format:
2014-12-08+09:38:{ "function": "date", "args": [ "Y-m-d+H:i" ] } -
Example with a nested function (will return a date in the same format from 3 days ago):
{ "function": "date", "args": [ "Y-m-d+H:i", { "function": "strtotime", "args": ["3 days ago"] } ] }
-
- A key from the parameters array:
{ "attr": "attributeName" }for $params['attr']['attributeName']- or
{ "param": "nested.attribute.name" }for $params['param']['nested']['attribute']['name'] - The first level is always used as the key to determine the "type"
License
MIT licensed, see LICENSE file.
统计信息
- 总下载量: 5.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-09