PHPackages                             sirclo-bachtiar/bachtiar-zend-magento2-helper - 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. sirclo-bachtiar/bachtiar-zend-magento2-helper

ActiveLibrary

sirclo-bachtiar/bachtiar-zend-magento2-helper
=============================================

Magento Helpers

3.1.1(4y ago)013GPL-3.0PHP

Since Mar 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sirclo-bachtiar/magento-helpers)[ Packagist](https://packagist.org/packages/sirclo-bachtiar/bachtiar-zend-magento2-helper)[ Docs](https://github.com/sirclo-bachtiar/magento-helpers)[ RSS](/packages/sirclo-bachtiar-bachtiar-zend-magento2-helper/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

Bachtiar Service Helpers
========================

[](#bachtiar-service-helpers)

Service Helpers.
----------------

[](#service-helpers)

This service is used to help some activities during your work, which contains several functions that may make your job simpler. Personally, this library is used for magento.

Require
-------

[](#require)

This library requiring **[Laminas Log](https://github.com/laminas/laminas-log)** for create logger.

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

[](#installation)

```
composer require sirclo-bachtiar/magento-helpers
```

Usage
-----

[](#usage)

- ### Logger Service

    [](#logger-service)

It's used for saving log activity.

```
use Bachtiar\Helper\Logger\Service\LogService;

class LogTest
{
    public function Log()
    {
        return LogService::channel('default')
            ->mode('default')
            ->title('log_title')
            ->message('message_to_log');
    }
}

#### Info ####
:: channel('default')
    -> select channel, available [ emerg, alert, crit, err, warn, notice, info ], if null then auto set to default.

:: mode('default')
    -> select log mode, available [ test, debug, develop ], if null then auto set to default.

:: title('default')
    -> set log title, if null then auto set to default title.

:: message('default')
    -> set log message, if null then auto set to default message.
```

- ### Response Service

    [](#response-service)

It's used for create a response result from your functions/methods activity.

```
use Bachtiar\Helper\Response\Service\ResponseService;

class ResponseTest
{
    public function Response()
    {
        return ResponseService::setStatus(true)
            ->setData([])
            ->setDataAdd([])
            ->setMessage('default')
            ->response();
    }
}

#### Info ####
:: setStatus(true)
    -> status of response, available [ true, false ], if null then auto set to true.

:: setData([])
    -> set data response value, ! must be an array, if null then will be set to an empty array.

:: setDataAdd([])
    -> set config data from response result, ! must be an array, if null then will be set to an empty array.

:: setMessage('default')
    -> set message from response result, if null then will be no any response message.

:: response()
    -> process to create response.
```

- ### Query Builder Service

    [](#query-builder-service)

It's used for custom query builder. (return query only).

```
use Bachtiar\Helper\DB\Query\Service\QueryBuilderService;

class QueryBuilderTest
{
    public function QueryBuilder()
    {
        return QueryBuilderService::select([])->from('base_table')
            ->join('relation_table', 'baseColumnId', '=', 'relationColumnId')
            ->where('base_table.name', '=', 'test')
            ->andWhere('base_table.age', '=', 'age')
            ->orWhere('relation_table.address', 'like', '%ponorogo%')
            ->get();
    }
}

#### Info ####
:: select([]) -> optional
    -> set select column, if null, then auto set to all (*).

:: from('base_table') -> ! must be included
    -> set base table query.

:: join('relation_table', 'baseColumnId', '=', 'relationColumnId')
    -> set inner join from query.

:: where('base_table.name', '=', 'test') -> optional
    -> set where clause from query

:: andWhere('base_table.age', '=', 'age') -> optional
    -> set or where clause from query

:: orWhere('relation_table.address', 'like', '%ponorogo%') -> optional
    -> set and where clause from query

:: get()
    -> process to create query builder.
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Recently: every ~25 days

Total

11

Last Release

1793d ago

Major Versions

1.0.3 → 2.0.02021-03-03

2.1.0 → 3.0.02021-03-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/88b127624b85b1e5f9f2f7fd10f1cb9df3f04a5e9f330540fd59ddbb2d59d6ee?d=identicon)[sirclo-bachtiar](/maintainers/sirclo-bachtiar)

---

Top Contributors

[![sirclo-bachtiar](https://avatars.githubusercontent.com/u/78332835?v=4)](https://github.com/sirclo-bachtiar "sirclo-bachtiar (16 commits)")

### Embed Badge

![Health badge](/badges/sirclo-bachtiar-bachtiar-zend-magento2-helper/health.svg)

```
[![Health](https://phpackages.com/badges/sirclo-bachtiar-bachtiar-zend-magento2-helper/health.svg)](https://phpackages.com/packages/sirclo-bachtiar-bachtiar-zend-magento2-helper)
```

###  Alternatives

[samsonasik/error-hero-module

A Hero for your Laminas and Mezzio application to trap php errors &amp; exceptions

5233.4k1](/packages/samsonasik-error-hero-module)[los/loslog

LosLog provides some log utility

1751.2k2](/packages/los-loslog)

PHPackages © 2026

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