PHPackages                             xenioushk/bwl-plugin-api - 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. xenioushk/bwl-plugin-api

ActiveLibrary

xenioushk/bwl-plugin-api
========================

BlueWindLab Plugin APIs.

1.0.9(11mo ago)0577↓100%MITPHP

Since Mar 15Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/xenioushk/bwl-plugin-api)[ Packagist](https://packagist.org/packages/xenioushk/bwl-plugin-api)[ RSS](/packages/xenioushk-bwl-plugin-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Database Query API
------------------

[](#database-query-api)

1. Use the class.

```
use Xenioushk\BwlPluginApi\Api\Database\QueryManagerApi;
```

2. Initalize the class.

```
$query_manager_api = new QueryManagerApi();
```

3. Insert Data.

```
$data = [
  'name'=> "mahbub",
  'age' => 39
];

$result = $query_manager_api->insert($data);
```

@Return: Newly created row id.

4. Read Data. (Multiple With Complex Condition)

```
/**
 * Example usage: Simple
 */

$filters = [
  'name' => 'Test',
  'id' => 8,
  'age >=' => 10,
  'age ='],
];

$data = $crud->get_items(1, 5, $filters, 'created_at', 'DESC');

/**
* More example.
*/

// Default is equal.
$filters = [
  'postid'    => $post_id,
  'post_type' => $post_type,
];

// You can use  Greater than, less than
$filters['vote_date >='] = [ 'value' => $pvm_filter_start_date, 'operator' => '>=' ];
$filters['vote_date '  => ['value' => 100, 'operator' => '>'],
        'MAX(points) >=' => ['value' => 50, 'operator' => '>='],
        'MIN(points) ' => ['value' => 100, 'operator' => '>'],
        'AVG(points) >=' => ['value' => 20, 'operator' => '>='],
    ],
    'order_by' => 'total_points',
    'order_dir' => 'DESC',
    'page' => 1,
    'per_page' => 10,
];
```

@Return: Multiple Rows data.

5. Read Data. (Single With ID)

```
$args = [
  'selected_fields' => "", // default: *. Example: 'id,name,email,age'
  'key'=> 'age', // default is id
  'id' => 39
];

$result = $query_manager_api->get_item($args);
```

This create a query like the following example

```
SELECT * FROM  WHERE age=39 LIMIT 1;
```

@Return: Single Row data.

6. Update Data.

```
$data = [
  'name'=> "mahbub",
  'age' => 39
];
$id = 5;
$result = $query_manager_api->update($id,$data);
```

This Query update the table data where id is equal to 5

@Return: 1 Success. @Return: 0 No changes.

7. Delete Data.

```
$id = 10;
$result = $query_manager_api->delete($id);
```

@Return: 1 Success. @Return: 0 Already deleted.

Changelog
---------

[](#changelog)

👉 **1.0.9 (24.05.25)**

- 🔥 Updated: Database Query API to support SUM,HAVING, MAX, MIN, COUNT.

👉 **1.0.8 (23.05.25)**

- 🚀 Added: Database Query API.

👉 **1.0.7 (08.05.25)**

- 🚀 Added: Custom post type taxonomy callback.

👉 **1.0.6 (01.05.25)**

- 🔥 Updated: Plugin cpt publicly\_queryable parameter.

👉 **1.0.5 (06.04.25)**

- ✅ Fixed: Filters API bug.
- ❌ Removed: CMB API.

👉 **1.0.4 (22.03.25)**

- Upgraded Plugin Pages API. 🙌
- Added View API. 🎉

👉 **1.0.3 (22.03.25)**

- Upgraded Actions and Filters API. 🙌

👉 **1.0.2 (17.03.25)**

- Fixed Custom post type API bug. 🐞

👉 **1.0.1 (16.03.25)**

- Fixed Dashboard widget API bug. 🐞

👉 **1.0.0 (15.03.25)**

- Initial release. 🚀
- Updated namespaces of the classes. 🙌

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance50

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

###  Release Activity

Cadence

Every ~7 days

Total

10

Last Release

351d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/878613a428a1dc52a2c6a23836a59d882616f71630506492d0dcd853b619c752?d=identicon)[xenioushk](/maintainers/xenioushk)

---

Top Contributors

[![xenioushk](https://avatars.githubusercontent.com/u/1782254?v=4)](https://github.com/xenioushk "xenioushk (19 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xenioushk-bwl-plugin-api/health.svg)

```
[![Health](https://phpackages.com/badges/xenioushk-bwl-plugin-api/health.svg)](https://phpackages.com/packages/xenioushk-bwl-plugin-api)
```

PHPackages © 2026

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