PHPackages                             g737a6b/toei - 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. g737a6b/toei

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

g737a6b/toei
============

PHP library to integrate scattered events in RDB.

1.1.1(7y ago)09MITPHP

Since May 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/g737a6b/toei)[ Packagist](https://packagist.org/packages/g737a6b/toei)[ RSS](/packages/g737a6b-toei/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

Toei [![CircleCI](https://camo.githubusercontent.com/240e7b94eb9acbb53899b4f4f472bd3a1cbe6265d531f0cc3049968485907425/68747470733a2f2f636972636c6563692e636f6d2f67682f673733376136622f746f65692e7376673f7374796c653d737667)](https://circleci.com/gh/g737a6b/toei)
==================================================================================================================================================================================================================================================================

[](#toei-)

PHP library to integrate scattered events in RDB.

Examples of use
---------------

[](#examples-of-use)

### RDB

[](#rdb)

```
-- Table "users"
CREATE TABLE `users` (`id` INT, `name` TEXT, `created` DATETIME, `deleted` DATETIME);
INSERT INTO `users` (`id`, `name`, `created`, `deleted`)
VALUES (1, 'Suzuki', '2017-01-01 12:04:11', NULL),
	(2, 'Tanaka', '2017-01-21 09:57:48', '2017-03-20 18:03:30'),
	(3, 'Yoshida', '2017-02-04 20:47:25', NULL);

-- Table "messages"
CREATE TABLE `messages` (`sender` INT, `receiver` INT, `body` TEXT, `created` DATETIME);
INSERT INTO `messages` (`sender`, `receiver`, `body`, `created`)
VALUES (1, 2, 'Hi!', '2017-01-21 12:01:44'),
	(2, 3, 'Hi!', '2017-02-04 21:54:17'),
	(1, 3, 'Hi!', '2017-02-05 12:03:01'),
	(2, 1, 'Bye!', '2017-03-20 17:54:46'),
	(2, 3, 'Bye!', '2017-03-20 17:56:23');
```

### config.json

[](#configjson)

```
{
	"register": {
		"table": "users",
		"identifyBy": "id",
		"sortBy": "created"
	},
	"withdraw": {
		"table": "users",
		"identifyBy": "id",
		"sortBy": "deleted",
		"condition": "created > '2000-01-01 00:00:00'"
	},
	"send_message": {
		"table": "messages",
		"identifyBy": "sender",
		"sortBy": "created"
	},
	"recieve_message": {
		"table": "messages",
		"identifyBy": "receiver",
		"sortBy": "created"
	}
}
```

### PHP

[](#php)

```
$config = json_decode(file_get_contents("config.json"));
$Toei = new Toei\Toei($PDO, $config);
$Toei->setId(2);
$result = $Toei->project(true);

// array(6) {
//   [0]=>
//   array(3) {
//     ["action"]=>
//     string(8) "register"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-01-21 09:57:48"
//   }
//   [1]=>
//   array(3) {
//     ["action"]=>
//     string(15) "recieve_message"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-01-21 12:01:44"
//   }
//   [2]=>
//   array(3) {
//     ["action"]=>
//     string(12) "send_message"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-02-04 21:54:17"
//   }
//   [3]=>
//   array(3) {
//     ["action"]=>
//     string(12) "send_message"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-03-20 17:54:46"
//   }
//   [4]=>
//   array(3) {
//     ["action"]=>
//     string(12) "send_message"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-03-20 17:56:23"
//   }
//   [5]=>
//   array(3) {
//     ["action"]=>
//     string(8) "withdraw"
//     ["id"]=>
//     string(1) "2"
//     ["time"]=>
//     string(19) "2017-03-20 18:03:30"
//   }
// }
```

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

[](#installation)

### Composer

[](#composer)

Add a dependency to your project's `composer.json` file.

```
{
	"require": {
		"g737a6b/toei": "*"
	}
}
```

Development
-----------

[](#development)

### Run tests

[](#run-tests)

```
docker run -it --rm -v $(pwd):/app composer:1.8 run-script tests
```

License
-------

[](#license)

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2019 [Hiroyuki Suzuki](https://mofg.net)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~204 days

Total

4

Last Release

2685d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d4fb20a844e6640ff3f2c66acfbd7b32131a0720787ee864d1cef9883fba0e?d=identicon)[g737a6b](/maintainers/g737a6b)

---

Top Contributors

[![g737a6b](https://avatars.githubusercontent.com/u/10450063?v=4)](https://github.com/g737a6b "g737a6b (23 commits)")

---

Tags

composerlibraryrdbanalysisRDB

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/g737a6b-toei/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[phpmyadmin/sql-parser

A validating SQL lexer and parser with a focus on MySQL dialect.

47750.4M55](/packages/phpmyadmin-sql-parser)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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