PHPackages                             alleyinteractive/wp-big-pit - 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. alleyinteractive/wp-big-pit

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

alleyinteractive/wp-big-pit
===========================

The WordPress database table for everything else.

v0.8.0(8mo ago)37.5k↓32.8%[2 issues](https://github.com/alleyinteractive/wp-big-pit/issues)GPL-2.0-or-laterPHPPHP ^8.2

Since Oct 18Pushed 8mo ago18 watchersCompare

[ Source](https://github.com/alleyinteractive/wp-big-pit)[ Packagist](https://packagist.org/packages/alleyinteractive/wp-big-pit)[ Docs](https://github.com/alleyinteractive/wp-big-pit)[ RSS](/packages/alleyinteractive-wp-big-pit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (9)Versions (9)Used By (0)

Big Pit
=======

[](#big-pit)

The Big Pit is a key-value WordPress database table for storing things that don't make sense to store as a post, term, option, or other core data type.

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

[](#installation)

You can install the package via Composer:

```
composer require alleyinteractive/wp-big-pit
```

API
---

[](#api)

The `Alley\WP\Big_Pit\Client` interface describes the create-read-update-delete operations that can be used with the Big Pit. You can type hint against this interface when using Big Pit as a dependency.

```
namespace Alley\WP\Big_Pit;

use Alley\WP\Types\Feature;

interface Client extends Feature {
	public function value( string $key, string $group ): mixed;

	public function set( string $key, mixed $value, string $group ): void;

	public function delete( string $key, string $group ): void;

	public function group( string $key ): iterable;

	public function flush_group( string $group ): void;
}
```

Each item in the Big Pit has a key and a group, much like the WordPress object cache. Each key is unique within a group.

`Client` extends the `Alley\WP\Types\Feature` interface from the [Type Extensions](https://github.com/alleyinteractive/wp-type-extensions) library, which includes a `boot()` method for performing side effects.

You must call `boot()` before using the client. If you are compiling features using the `Features` instance from Type Extensions, you can include the Big Pit client, and it will be booted with the rest of your feature classes.

Usage
-----

[](#usage)

```
