PHPackages                             zhmi/inflector - 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. zhmi/inflector

ActiveLibrary

zhmi/inflector
==============

Библиотека для склонения русских слов с помощью разных инструментов

v0.1.2(9y ago)146[1 issues](https://github.com/mmjurov/inflector/issues)PHPPHP &gt;=5.3.0

Since Mar 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mmjurov/inflector)[ Packagist](https://packagist.org/packages/zhmi/inflector)[ RSS](/packages/zhmi-inflector/feed)WikiDiscussions master Synced 2mo ago

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

zhmi/inflector
==============

[](#zhmiinflector)

Библиотека, которая позволяет склонять слова с помощью различных инструментов. В качестве базового инструмента для склонения используется [phpMorphy](http://phpmorphy.sourceforge.net/dokuwiki/)

Интерфейс работы простой: Инициализируем сервис склонения. Передаем ему кодировку своего проекта, чтобы он знал о том, в какой кодировке к нему будут приходить слова. По-умолчанию utf-8. Словари есть только для utf-8 и windows-1251, поэтому поддерживаются только эти кодировки.

```
$inflectorService = new \Zhmi\Inflector\Service('utf-8');
```

Выполняем склонение нужного слова

```
$inflections = $inflectorService->inflect('Дружба');
```

Результат будет получен в виде экземпляра InflectionResult, который позволяет работать с ним как с массивом. Например, если вы хотите получить Родительный падеж, то можно достать его из объекта так:

```
//Любой из этих вариантов будет верным
echo $inflections[1];
echo $inflections['родительный'];
echo $inflections['genitive'];
echo $inflections->getInflection(1);
echo $inflections->getInflection('родительный');
echo $inflections->getInflection('genitive');
echo $inflections->getGenitive();
```

Если слово не удалось склонить, то будет возвращен экземпляр EmptyInflectionInterface, который при попытке достать склонение будет возвращать исходный вариант без склонения.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

3592d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/063eabc66470fad298c3d9ff12eda282d784a068932a62cd48a4e5a261433c24?d=identicon)[mmjurov](/maintainers/mmjurov)

---

Top Contributors

[![mmjurov](https://avatars.githubusercontent.com/u/802208?v=4)](https://github.com/mmjurov "mmjurov (13 commits)")

---

Tags

phpinflectorсклонятор

### Embed Badge

![Health badge](/badges/zhmi-inflector/health.svg)

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

###  Alternatives

[doctrine/inflector

PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.

11.4k855.8M711](/packages/doctrine-inflector)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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