PHPackages                             kosmosafive/bitrix-ds - 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. kosmosafive/bitrix-ds

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

kosmosafive/bitrix-ds
=====================

Структуры данных

1.6.0(6mo ago)01094Apache-2.0PHPPHP ^8.3

Since Sep 18Pushed 6mo agoCompare

[ Source](https://github.com/kosmosafive/bitrix-ds)[ Packagist](https://packagist.org/packages/kosmosafive/bitrix-ds)[ Docs](https://github.com/kosmosafive/bitrix-ds)[ RSS](/packages/kosmosafive-bitrix-ds/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (10)Used By (4)

Структуры данных
================

[](#структуры-данных)

Collection
----------

[](#collection)

Типизированная коллекция

При использовании статических анализаторов (например, Psalm, PHPStan) можно использовать только комментарии. Если необходимо ограничивать выполнение кода в runtime, необходимо явно выбрасывать исключение.

Ниже приведен пример реализации типизированной коллекции, метод add.

```
use Kosmosafive\Bitrix\DS\Collection;
use InvalidArgumentException;

class Entity
{

}

/**
 * @template-extends Collection
 */
class EntityCollection extends Collection
{
    /**
     * @param Entity $value
     * @return EntityCollection
     */
    public function add(mixed $value): EntityCollection
    {
        if (!$value instanceof Entity) {
            throw new InvalidArgumentException("This collection only accepts instances of " . Entity::class);
        }

        return parent::add($value);
    }
}
```

Request
-------

[](#request)

Используется для фильтрации и валидации данных от клиента.

Для валидации можно использовать внешний сервис.

```
use Kosmosafive\Bitrix\DS\Request;

readonly class GetRequest extends Request
{
    #[Required]
    protected ?Uuid $id;

    public function __construct(\Bitrix\Main\Request $httpRequest)
    {
        $this->id = $this->filterUuid($httpRequest->get('id'));
    }

    public function getId(): ?Uuid
    {
        return $this->id;
    }
}

$getRequest = new GetRequest($this->getRequest());
$validateResult = $getRequest->validate();
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance66

Regular maintenance activity

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

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

Total

8

Last Release

197d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4149bcfcdcc947ad42afa006615812c8ea743bf76e0e10ef44ffb3d5ae2796f0?d=identicon)[kosmosafive](/maintainers/kosmosafive)

---

Top Contributors

[![kosmosafive](https://avatars.githubusercontent.com/u/14090839?v=4)](https://github.com/kosmosafive "kosmosafive (34 commits)")

---

Tags

requestdatabitrixcollectionstructureds

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kosmosafive-bitrix-ds/health.svg)

```
[![Health](https://phpackages.com/badges/kosmosafive-bitrix-ds/health.svg)](https://phpackages.com/packages/kosmosafive-bitrix-ds)
```

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k78.3k90](/packages/pocketmine-pocketmine-mp)[graze/data-structure

Data collections and containers

12295.9k10](/packages/graze-data-structure)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2519.3k](/packages/iteks-laravel-enum)[michaels/data-manager

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

132.0k2](/packages/michaels-data-manager)

PHPackages © 2026

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