wallacesilva/phpjsonlite
Composer 安装命令:
composer require wallacesilva/phpjsonlite
包简介
A simple, self-contained, serverless, zero-configuration, json document store for PHP
README 文档
README
A simple, self-contained, serverless, zero-configuration, json document store. Based on nodesocket/jsonlite.
JSONlite sandboxes the current working directory just like SQLite. The data directory is named jsonlite.data, and each json document is saved pretty printed as a uuid.
Proof of Concept
JSONlite is a proof of concept, and it may not make any sense to actually use it in development or production. Read more in nodesocket/jsonlite.
Installation
composer require wallacesilva/phpjsonlite
Requirements
- php >= 5.3
Usage
You need declare the object to use the methods.
$jsonlite = new JSONlite\JSONlite(); // e.g.: $jsonlite->methodName();
set(<string> $object [, <string> $document_id=null])
Set object using OR not document_id
$object = array( 'id' => 1, 'name' => 'John Doe', 'active' => true, 'permissions' => array( 'read' => true, 'write' => false, 'execute' => true ) ); $document_id = $jsonlite->set($object); // return also like: '666B81D6-3F8A-4D57-BA3F-11FA8FC47246'
get(<string> $document_id)
Get object using document_id. Document id is a UUID
$object = $jsonlite->get($document_id); // return also like: /** { "active": true, "name": "John Doe", "permissions": { "read": true, "write": false } } */
delete(<string> $document_id)
Delete object using document_id.
$deleted = $jsonlite->delete($document_id)
drop()
Remove database folder. Default './jsonlite.data'
$jsonlite->drop()
setDataPath(<string> $dataPath)
Define new folder database. This is not required. Default is './jsonlite.data'
$jsonlite->setDataPath('/var/www/database/jsonlite.data/');
version
Return version from Package
$jsonlite->version() // return also like: 0.1.0
Changelog
https://github.com/wallacesilva/phpjsonlite/blob/master/CHANGELOG
Support, Bugs, And Feature Requests
Create issues here in GitHub (https://github.com/wallacesilva/phpjsonlite/issues).
Versioning
For transparency and insight into the release cycle, and for striving to maintain backward compatibility, JSONlite will be maintained under the semantic versioning guidelines.
Releases will be numbered with the follow format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch
For more information on semantic versioning, visit http://semver.org/.
License & Legal
Copyright 2015 Wallace Silva
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
wallacesilva/phpjsonlite 适用场景与选型建议
wallacesilva/phpjsonlite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 09 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nosql」 「database」 「driver」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wallacesilva/phpjsonlite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wallacesilva/phpjsonlite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wallacesilva/phpjsonlite 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
The DreamFactory(tm) CouchDB Service.
Store your language lines in the database, yaml or other sources
The CodeIgniter Redis package
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Galera cluster driver for Doctrine
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: APACHE
- 更新时间: 2015-09-24