Skip to content

PenateDB/Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Client for PenateDB

Simple client for working with PenadeDB using Guzzle

Installation

$ composer require penate/client

Usage

use Penate\Client\PenateClient;

$penate = new PenateClient('http://localhost:8000');

// Write and read
$penate->setItem('code', 100); // 100
$penate->getItem('code');      // 100

// Operations
$penate->increment('code');    // 101
$penate->decrement('code');    // 100

//Mass call
$penate->setItem('val1', 10);
$penate->setItem('val2', 20);

$penate->getItems(['val1', 'val2']); // [10,20]

You can also set temporary values.

$penate->setItem('temporaryValue', 'Hello', 1);

$penate->getItem('temporaryValue'); // Hello

sleep(120); // after 2 minutes

$penate->getItem('temporaryValue'); // null

Releases

No releases published

Packages

No packages published

Languages