2017 © Pedro Peláez
 

symfony-bundle morpherbundle

Morpher Webservice

image

vsavritsky/morpherbundle

Morpher Webservice

  • Thursday, July 5, 2018
  • by savritsky
  • Repository
  • 1 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 25 % Grown

The README.md

MorpherBundle

Installation

Require the vsavritsky/morpherbundle in your composer.json and update your dependencies. composer require vsavritsky/morpherbundle, (*1)

{
    "require": {
       ...
       "vsavritsky/morpherbundle": "dev-master"
       ...
    }
}

Add the AnchovyCURLBundle and VsavritskyMorpherBundle to your application's kernel:, (*2)

public function registerBundles()
{
    $bundles = array(
        ...
        new Vsavritsky\MorpherBundle\VsavritskyMorpherBundle(),
        ...
    );

add parameters access to parameters.yml:, (*3)

vsavritsky_morpher.access.username: username
vsavritsky_morpher.access.pass: pass

update db: app/console doctrine:schema:update --force, (*4)

Usage

// Simple call:
    use Vsavritsky\MorpherBundle\Entity\RequestFacade;
    ...
    public function indexAction() {

        $morpher = $this->get('vsavritsky_morpher.request');
        $plural = true;
        $result = $morpher->inflect('Тест', RequestFacade::CASE_ROD, 'Дефолтное значение', $plural);
    echo '<pre>';
        print_r($result); exit();
        exit();
    }

consts:, (*5)

`const CASE_ROD = 'Р';`
`const CASE_DAT = 'Д';`
`const CASE_VIN = 'В';`
`const CASE_TVOR = 'Т';`
`const CASE_PREDL = 'П';`
`const CASE_GDE = 'М';`

result: 'Тесту' `, (*6)

The Versions

05/07 2018

dev-master

9999999-dev

Morpher Webservice

  Sources   Download

MIT

The Requires

 

by Vladimir Savritsky

morpher morpher bundle

10/11 2015

1.0.0

1.0.0.0

service morpher

  Sources   Download

MIT

The Requires

 

by Vladimir Savritsky

page page bundle