amf-service
php composer.phar require jerni/amf-bundle, (*1)
branch: dev-master, (*2)
Register bundle in AppKernel.php, (*3)
public function registerBundles()
{
new Jse\AmfBundle\JseAmfBundle(),
}
add in config/routing.yml, (*4)
jse_amf_bundle:
resource: "@JseAmfBundle/Resources/config/routing.xml"
prefix: /gateway-service
add in config/config.yml, (*5)
jse_amf:
service_path: Acme/DemoBundle
sample service:, (*6)
//Acme/DemoBundle/Services/AmfService/TestService.php
use Jse\AmfBundle\Services\AmfServiceContainer;
class TestSevice extends AmfServiceContainer{
public function testsAction($obj){
$cat = $this->getContainer()->get('sonata.classification.manager.category')->findOneBy(array('id' => 1));
return json_encode($cat->getName());
}
}