PHPackages                             saidqb/core-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. saidqb/core-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

saidqb/core-php
===============

core-php

v8.1.9(1y ago)029MITPHPPHP ^8.1

Since Jul 18Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (12)Used By (0)

core-php
========

[](#core-php)

A dependency for php project

Description
-----------

[](#description)

progress build...

Requirments
-----------

[](#requirments)

PHP &gt;= 8.1

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

[](#installation)

```
composer require saidqb/core-php

```

Package include
---------------

[](#package-include)

- **Array Collection** [doctrine/collection](https://www.doctrine-project.org/projects/collections.html)
- **String Manipulation** [str/str](https://github.com/fe3dback/str?tab=readme-ov-file#functions-index)
- **Generator String** [phlak/strgen](https://github.com/PHLAK/StrGen)

### Arr

[](#arr)

```
use Saidqb\CorePhp\Lib\Arr;

$arr = [1, 2, 3];
Arr::collection($arr)->filter(function($element) {
    return $element > 1;
}); // [2, 3]

Arr::collection($arr)->contains(1); // true

Arr::collection($arr)->filter(function($element) {
    return $element > 1;
}); // [2, 3]
```

Detail [Documentation](https://www.doctrine-project.org/projects/doctrine-collections/en/stable/index.html#collection-methods)

### Str

[](#str)

```
use Saidqb\CorePhp\Lib\Str;

$str = 'string';
Str::make($str)->startsWith($substring);
Str::make($str)->endsWith($substring);
```

Detail [Documentation](https://github.com/fe3dback/str?tab=readme-ov-file#functions-index)

### Generate

[](#generate)

```
use Saidqb\CorePhp\Lib\Generate;

Generate::str()->lowerAlpha($length);
Generate::str()->upperAlpha($length);
Generate::str()->mixedAlpha($length);
Generate::str()->numeric($length);
Generate::str()->alphaNumeric($length);
Generate::str()->special($length);
Generate::str()->all($length);
Generate::str()->custom($length, $charset);
```

Detail [Documentation](https://github.com/PHLAK/StrGen)

### Pagination

[](#pagination)

```
use Saidqb\CorePhp\Pagination;

$pagination = Pagination::make()->totalItems(100)->itemPerPage(10)->currentPage(1)->get();
```

### Response

[](#response)

```
use Saidqb\CorePhp\Response;

Response::make()->response([], ResponseCode::HTTP_OK, ResponseCode::HTTP_OK_MESSAGE, 0)->send();

// list item
Response::make()->response(['items' => $items, 'pagination' => $pagination])->send();

// single item
Response::make()->response(['item' => $item])->send();
```

**used in controller**

BaseController

```
use Saidqb\CorePhp\Response;
use Saidqb\CorePhp\ResponseCode;

public $res;

public function __construct()
{
    $this->initResponse();
}

public function initResponse()
{
    $this->res = new Response();
    return $this->res;
}

public function response($data, $code = ResponseCode::HTTP_OK, $message = ResponseCode::HTTP_OK_MESSAGE, $errorCode = 0)
{
    $this->res->response($data, $code, $message, $errorCode)->send();
}
```

Extends to BaseController

```
use Saidqb\CorePhp\ResponseCode;

public function __construct()
{
    parent::__construct();

    $this->initResponse()->hide(['password']);

}

public function index()
{
    $this->response($data, ResponseCode::HTTP_OK);
}
```

Avilable Manipulate data:

```
->hide(['password'])
->decode(['extra'])
->decodeChild(['extra.user'])
->decodeArray(['extra_list'])
->addFields(['field1' => '1', 'field2' => '2'])
->addField('field1', '1')
->hook('item', function($data){ return $data})
```

COFFEE FOR BEST PERFORMANCE
---------------------------

[](#coffee-for-best-performance)

**[COFFEE HERE](https://saidqb.github.io/coffee)** for more inovation

OR

[![Trakteer Saya](https://camo.githubusercontent.com/aa8b9d57c1e453939ecde31b78f4f9fa849bb3f441c90b3aee5c92a8d27bc877/68747470733a2f2f63646e2e7472616b746565722e69642f696d616765732f656d6265642f747262746e2d7265642d312e706e673f646174653d31382d31312d32303233)](https://trakteer.id/saidqb/tip)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~19 days

Recently: every ~45 days

Total

11

Last Release

482d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78c449862126132a8961739c3981ca0868363916678709249f699329aaadb7e8?d=identicon)[saidqb](/maintainers/saidqb)

---

Top Contributors

[![saidqb](https://avatars.githubusercontent.com/u/25014263?v=4)](https://github.com/saidqb "saidqb (38 commits)")

---

Tags

phpdependencylibrary

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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