2017 © Pedro Peláez
 

library phpjsonlite

A simple, self-contained, serverless, zero-configuration, json document store for PHP

image

wallacesilva/phpjsonlite

A simple, self-contained, serverless, zero-configuration, json document store for PHP

  • Thursday, September 24, 2015
  • by wallacesilva
  • Repository
  • 1 Watchers
  • 3 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PHP JSONlite

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., (*1)

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., (*2)

Installation

composer require wallacesilva/phpjsonlite

Requirements

  1. php >= 5.3

Usage

You need declare the object to use the methods., (*3)

$jsonlite = new JSONlite\JSONlite();
// e.g.: $jsonlite->methodName();

set(<string> $object [, <string> $document_id=null])

Set object using OR not document_id, (*4)

$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, (*5)

$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., (*6)

$deleted = $jsonlite->delete($document_id)

drop()

Remove database folder. Default './jsonlite.data', (*7)

$jsonlite->drop()

setDataPath(<string> $dataPath)

Define new folder database. This is not required. Default is './jsonlite.data', (*8)

$jsonlite->setDataPath('/var/www/database/jsonlite.data/');

version

Return version from Package, (*9)

$jsonlite->version()
// return also like: 0.1.0

Changelog

https://github.com/wallacesilva/phpjsonlite/blob/master/CHANGELOG, (*10)

Support, Bugs, And Feature Requests

Create issues here in GitHub (https://github.com/wallacesilva/phpjsonlite/issues)., (*11)

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., (*12)

Releases will be numbered with the follow format:, (*13)

<major>.<minor>.<patch>, (*14)

And constructed with the following guidelines:, (*15)

  • 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/., (*16)

Copyright 2015 Wallace Silva, (*17)

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, (*18)

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., (*19)

The Versions

24/09 2015

dev-master

9999999-dev https://github.com/wallacesilva/phpjsonlite

A simple, self-contained, serverless, zero-configuration, json document store for PHP

  Sources   Download

Apache

The Requires

 

database nosql driver

24/09 2015

0.1.2

0.1.2.0 https://github.com/wallacesilva/phpjsonlite

A simple, self-contained, serverless, zero-configuration, json document store for PHP

  Sources   Download

Apache

The Requires

 

database nosql driver

24/09 2015

0.1.0

0.1.0.0 https://github.com/wallacesilva/phpjsonlite

A simple, self-contained, serverless, zero-configuration, json document store for PHP

  Sources   Download

Apache

The Requires

 

database nosql driver