PHPackages                             beta/bx.repository - 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. [Framework](/categories/framework)
4. /
5. beta/bx.repository

ActiveBitrix-module[Framework](/categories/framework)

beta/bx.repository
==================

Repository for Bitrix Framework

1.1.1(1y ago)022MITPHPPHP &gt;=8.0

Since Feb 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/beta-eto-code/bx.repository)[ Packagist](https://packagist.org/packages/beta/bx.repository)[ RSS](/packages/beta-bxrepository/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Bitrix repository
=================

[](#bitrix-repository)

**Пример описания модели:**

```
use Model\Base\BaseModel;
use Model\Base\Interfaces\ModelInterface;
use Bitrix\Main\Type\DateTime;
use Bx\Repository\Interfaces\SelectableInterface;
use Bx\Repository\Interfaces\FetchableInterface;
use Bx\Repository\Interfaces\SavableInterface;
use Data\Provider\Interfaces\DataProviderInterface;

class ShortNews extends BaseModel implements SelectableInterface, FetchableInterface, SavableInterface
{
    public string $id = '';
    public string $title = '';
    public string $previewText = '';
    public string $previewPicture = '';
    public ?DateTime $publicationDate = null;

    public static function initFromArray(array $data): ModelInterface
    {
        $this->id = (string) ($data['ID'] ?? '');
        $this->titme = (string) ($data['NAME'] ?? '');
        $this->previewText = (string) ($data['PREVIEW_TEXT'] ?? '');
        $this->previewPicture = (string) ($data['PREVIEW_PICTURE'] ?? '');

        $publicationDate = $data['ACTIVE_FROM'] ?? null;
        if (is_string($publicationDate)) {
            $publicationDate = new DateTime($publicationDate, 'd.m.Y H:i:s');
        }

        $this->publicationDate = $publicationDate instanceof DateTime ? $publicationDate : null;
    }

    public function save(
        DataProviderInterface $dataProvider,
        ?\Repository\Base\Interfaces\AccessRecipientContextInterface $recipientContext = null
    ): PkOperationResultInterface {

    }

    public static function getSelectFiledNames(): array
    {
        return ['ID', 'NAME', 'PREVIEW_TEXT', 'PREVIEW_PICTURE', 'CREATED_BY'];
    }

    public static function getFetchList(): array
    {
        return [];
    }

    public function jsonSerialize(): array
    {
        return [
            'id' => $this->id,
            'title' => $this->title,
            'previewText' => $this->previewText,
            'previewPicture' => $this->previewPicture,
            'publicationDate' => $this->publicationDate instanceof DateTime ? $this->publicationDate->format('c') : '';
        ];
    }
}
```

**Пример выборки альтернативной модели**

```
$iblockRepository = new \Bx\Repository\IblockElementRepository('content', 'news', ShorNews:class);
$iblockRepository->initWithModelClass(NewsModel::class)->getCollection();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance44

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

Total

4

Last Release

445d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c75fd54c926c6b835a6b6cd92514d60d55a285d35847b9f22aefcc7ad5ef9ae7?d=identicon)[nnagornyy](/maintainers/nnagornyy)

---

Top Contributors

[![alex19pov31](https://avatars.githubusercontent.com/u/786683?v=4)](https://github.com/alex19pov31 "alex19pov31 (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/beta-bxrepository/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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