2017 © Pedro Peláez
 

yii2-component yii2-morpher

Yii2 Morpher

image

sevenfloor/yii2-morpher

Yii2 Morpher

  • Thursday, April 13, 2017
  • by ignatenkovnikita
  • Repository
  • 3 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 16 % Grown

The README.md

Yii2-morpher

Installation

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available, (*1)

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

composer require --prefer-dist sevenfloor/yii2-morpher

or add, (*4)

"sevenfloor/yii2-morpher": "*"

to the require section of your composer.json., (*5)

## Usage, (*6)

php 'components' => [ // ... 'morpher' => [ 'class' => 'sevenfloor\morpher\Morpher' ] // ... ], (*7)

Get all case; ```php Yii::$app->morpher ->setQuery('Санкт-Петербург') ->getData();, (*8)

 /*result 
 Array
 (
     [Р] => Санкт-Петербурга
     [Д] => Санкт-Петербургу
     [В] => Санкт-Петербург
     [Т] => Санкт-Петербургом
     [П] => Санкт-Петербурге
     [множественное] => Array
         (
             [И] => Санкт-Петербурги
             [Р] => Санкт-Петербургов
             [Д] => Санкт-Петербургам
             [В] => Санкт-Петербурги
             [Т] => Санкт-Петербургами
             [П] => Санкт-Петербургах
         )

 ); */

```, (*9)

Get case; php echo Yii::$app->morpher ->setQuery('Санкт-Петербург') ->setCase(Morpher::PREPOSITIONAL) ->getData(); //result 'Санкт-Петербурге', (*10)

Get plural case; ```php echo Yii::$app->morpher ->setQuery('Санкт-Петербург') ->setCase(Morpher::PREPOSITIONAL) ->setPlural() ->getData();, (*11)

//result Санкт-Петербургах

```, (*12)

The Versions

13/04 2017

dev-master

9999999-dev https://github.com/SevenFloor/yii2-morpher

Yii2 Morpher

  Sources   Download

MIT

The Requires

 

by Andrei Arkhipov

yii2 yii yii 2 cases morpher