PHP code example of zfcampus / zf-rpc

1. Go to this page and download the library: Download zfcampus/zf-rpc library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zfcampus / zf-rpc example snippets


return [
    /* ... */
    'modules' => [
        /* ... */
        'ZF\Rpc',
    ],
    /* ... */
];

'zf-rpc' => [
    'Application\Controller\LoginController' => [
        'http_methods' => ['POST'],
        'route_name'   => 'api-login',
        'callable'     => 'Application\Controller\LoginController::process',
    ],
],

'controllers' => [
    'abstract_factories' => [
        'ZF\Rpc\Factory\RpcControllerFactory',
    ],
],