basilicom/rpc-gateway-symfony

rpc gateway lib for symfony

1.2.0 2017-05-02 20:36 UTC

This package is auto-updated.

Last update: 2024-11-10 01:14:31 UTC


README

Developer info: basilicom

Synopsis

Code Example / Method of Operation

  • if your service namespace ist not "\App\Rpc\Service", please don't forget to set your custom namespace.
  • For Example, your Service Class is \Website\Rpc\Custom\User.php:
    $rpc = new \RpcGateway\Gateway();
    $rpc->setServiceClassNamespace('\Website\Rpc\Custom\\')

Installation

  • just add '"basilicom/rpc-gateway-symfony": "dev-master"' to your composer '"require": {}'

API Reference

  • n/a

Tests

  • none

Contributors

License

  • BSD-3-Clause

Pimcore Controller Example

<?php

namespace AppBundle\Controller;

use Symfony\Component\HttpFoundation\Request;

class RpcController extends AbstractController
{

    public function defaultAction(Request $request)
    {
        $gateway = new \RpcGateway\Gateway($request);
        $gateway->setServiceClassNamespace('\AppBundle\Rpc\\');
        return $gateway->dispatch();
    }
}