PHPackages                             bluzelle/bluzelle-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. bluzelle/bluzelle-php

ActiveLibrary[Database &amp; ORM](/categories/database)

bluzelle/bluzelle-php
=====================

A PHP library to interact with Bluzelle Blockchain Database

19PHP

Since Jun 22Pushed 7y ago3 watchersCompare

[ Source](https://github.com/bluzelle/bluzelle-php)[ Packagist](https://packagist.org/packages/bluzelle/bluzelle-php)[ RSS](/packages/bluzelle-bluzelle-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Bluphant
========

[](#bluphant)

[![Build Status](https://camo.githubusercontent.com/6914c1dda1e270cfe48d753687da1ba79a88db1cf96c996ed7d80ff0007e6f63/68747470733a2f2f7472617669732d63692e6f72672f7468652d7068702d737761726d2f626c757068616e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/the-php-swarm/bluphant)[![License](https://camo.githubusercontent.com/a549a7a30bacba7bfceebdc207a8e86c3f2c02995a2527640dca30048fd2b64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e737667)](https://opensource.org/licenses/Apache-2.0)

Bluphant is a PHP library to interact with Bluzelle Blockchain Database.

Bluzelle is a Blockchain Database that works in a system of swarms, this makes the availability, integrity, integrability and the consistency be natural. This is a PHP Database Adapter for Bluzelle.

There is a sample here that is the existent `example` in this package built with `docker-compose`:

> [Sample](https://swarm.masa.tech)

Usage
-----

[](#usage)

Before everything, Bluphant is an Adapter, and to use it you just have to place it as an $adapter for you Database Layer.

It might be interesting to build other 2 classes to work with this:

- Data Mapper

    ```
    $userMapper = new UserMapper($adapter);
    ```
- Models

    ```
    $user = new User("Everchanging Joe", "joe@example.com");
    $userMapper->insert($user);
    ```

---

How to
======

[](#how-to)

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

```
composer require bluzelle/bluzelle-php
```

Because of the necessary support to **[protobuf](https://developers.google.com/protocol-buffers/)**, a required step to use this library is to install a PECL package through this command:

```
sudo pecl install protobuf-3.5.1
```

Prepare Adapter
---------------

[](#prepare-adapter)

```
use Bluphant\BluphantAdapter;

$adapter = new BluphantAdapter('127.0.0.1', 8100);

$table = '3f966cd1-ef79-4464-b3be-81e84002550b';
```

Statements
----------

[](#statements)

### Create

[](#create)

```
$adapter->insert($table, [
    "key" => "key1",
    "value" => "sample value"
]);
```

### Read

[](#read)

```
$adapter->select($table, [
    "key" => "key1"
]);
```

### Update

[](#update)

```
$adapter->update($table, [
    "key" => "key1",
    "value" => "sample value 2"
]);
```

### Delete

[](#delete)

```
$adapter->delete($table, [
    "key" => "key1"
]);
```

### Keys

[](#keys)

```
$adapter->keys($table);
```

### Execute

[](#execute)

```
echo $adapter->execute();
```

---

Reference
---------

[](#reference)

- [Bluzelle WebSocket API](https://bluzelle.github.io/api/#websocket-api)

---

Protobuf
--------

[](#protobuf)

There is a build step of this library for protobuf. This will be required so it accomplished the goal of Bluzelle project, which is to have a better environment for development and business.

During the build step, that is not required for someone that is simply using this library, is to run this at the root directory of this library:

```
protoc --proto_path=src/Datastructure --php_out=./src/Datastructure Database.proto
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1092909?v=4)[Sávio Resende](/maintainers/lotharthesavior)[@lotharthesavior](https://github.com/lotharthesavior)

---

Top Contributors

[![lotharthesavior](https://avatars.githubusercontent.com/u/1092909?v=4)](https://github.com/lotharthesavior "lotharthesavior (66 commits)")

### Embed Badge

![Health badge](/badges/bluzelle-bluzelle-php/health.svg)

```
[![Health](https://phpackages.com/badges/bluzelle-bluzelle-php/health.svg)](https://phpackages.com/packages/bluzelle-bluzelle-php)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
