PHPackages                             rrwitp/core - 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. rrwitp/core

ActiveLibrary

rrwitp/core
===========

Core component of Plasma.

v0.3.0(6y ago)001Apache-2.0PHPPHP &gt;=7.1

Since Dec 22Pushed 5y agoCompare

[ Source](https://github.com/RRWITP/core)[ Packagist](https://packagist.org/packages/rrwitp/core)[ RSS](/packages/rrwitp-core/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (5)Used By (1)

Plasma [![Build Status](https://camo.githubusercontent.com/2249bc94bfe6414c52701fab57147e4a22e27b2e63b5af8e9ff04004f55600fa/68747470733a2f2f7472617669732d63692e6f72672f506c61736d615048502f636f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PlasmaPHP/core) [![Build Status](https://camo.githubusercontent.com/459c4e9ffb037c58bb413e8ee70d245ceb66c2338133f9f64041f7dd25cf88b7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f506c61736d615048502f636f72652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PlasmaPHP/core/build-status/master) [![Code Coverage](https://camo.githubusercontent.com/8056496638f91d759b92256c4568560e8775cb8f24e3060543f6541e9667706b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f506c61736d615048502f636f72652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PlasmaPHP/core/?branch=master)
========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#plasma---)

Plasma provides an asynchronous, non-blocking (data access) Database Abstraction Layer. This is the core component, defining common parts and interfaces.

The core component alone does **nothing**, you need a Plasma driver, which does all the handling of the DBMS.

Plasma does not aim to be a full Database Abstraction Layer. Simulating missing features is not a goal and should never be.

For a list of drivers, see the [main repository](https://github.com/PlasmaPHP/plasma).

Getting Started
===============

[](#getting-started)

As soon as you have selected a driver, you can install it using `composer`. For the core, the command is

```
composer require plasma/core

```

Each driver has their own dependencies, as such they have to implement a factory, which creates their driver instances correctly. For more information, see the driver project page.

But this is some little pseudo code:

```
$loop = \React\EventLoop\Factory::create();
$factory = new \SomeGuy\PlasmaDriver\MsSQLFactory($loop);

$client = \Plasma\Client::create($factory, 'root:1234@localhost');

$client->execute('SELECT * FROM `users`', [])
    ->then(function (\Plasma\QueryResultInterface $result) use ($client) {
        // Do something with the query result
        // Most likely for a SELECT query,
        // it will be a streaming query result

        $client->close()->done();
    }, function (\Throwable $error) use ($client) {
        // Oh no, an error occurred!
        echo $error.\PHP_EOL;

        $client->close()->done();
    });

$loop->run();
```

Cursors
=======

[](#cursors)

Cursors are a powerful way to get full control over fetching rows. Cursors allow you to control when a row (or multiple) is fetched from the database and allows your application a small memory footprint while fetching millions of rows.

Cursors return a promise and resolve with the row, an array of rows or `false` (when no more rows). Since they return a promise, you don't need to depend on events and possibly buffer rows when passing around the result.

When combining cursors with generator coroutines (such as Recoil), you get a powerful tool you already know from PDO.

```
// Inside a coroutine

/** @var \Plasma\CursorInterface  $cursor */
$cursor = yield $client->createReadCursor('SELECT * FROM `my_table`');

while($row = yield $cursor->fetch()) {
    // Process row
}
```

Support for cursors depend on the individual drivers.

Documentation
=============

[](#documentation)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~93 days

Total

4

Last Release

2424d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5157609?v=4)[Tim Joosten](/maintainers/Tjoosten)[@Tjoosten](https://github.com/Tjoosten)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rrwitp-core/health.svg)

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

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k116.9M402](/packages/react-socket)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[clue/redis-react

Async Redis client implementation, built on top of ReactPHP.

28210.5M45](/packages/clue-redis-react)

PHPackages © 2026

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