dev-master
9999999-devMorpher Webservice
MIT
The Requires
by Vladimir Savritsky
morpher morpher bundle
1.0.0
1.0.0.0service morpher
MIT
The Requires
by Vladimir Savritsky
page page bundle
Wallogit.com
2017 © Pedro Peláez
Morpher Webservice
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)
// 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)
Morpher Webservice
MIT
morpher morpher bundle
service morpher
MIT
page page bundle