src/Admin/Model/DoctrineRpcServiceModel.php
/**
     * Fetch a single RPC service
     *
     * @todo get route details?
     * @param string $controllerServiceName
     * @return DoctrineRpcServiceEntity|false
     */
Fetch a single RPC service
@todo get route details.
Fetch a single RPC service @todo get route details .
public function fetch($controllerServiceName)
    {
        $data   = ['controller_service_name' => $controllerServiceName];
        $config = $this->configResource->fetch(true);
        if (isset($config['zf-rpc'][$controllerServiceName])) {
            $rpcConfig = $config['zf-rpc'][$controllerServiceName];
            if (isset($rpcConfig['route_name'])) {
                $data['route_name']  = $rpcConfig['route_name'];
                $data['route_match'] = $this->getRouteMatchStringFromModuleConfig($data['route_name'], $config);
            }
            if (isset($rpcConfig['http_methods'])) {
                $data['http_methods'] = $rpcConfig['http_methods'];
            }
        } else {
            return false;
        }
        if (isset($config['zf-content-negotiation'])) {
            $contentNegotiationConfig = $config['zf-content-negotiation'];
            if (isset($contentNegotiationConfig['controllers'][$controllerServiceName])) {
                $data['selector'] = $contentNegotiationConfig['controllers'][$controllerServiceName];
            }
            if (isset($contentNegotiationConfig['accept_whitelist'][$controllerServiceName])) {
                $data['accept_whitelist'] = $contentNegotiationConfig['accept_whitelist'][$controllerServiceName];
            }
            if (isset($contentNegotiationConfig['content_type_whitelist'][$controllerServiceName])) {
                $data['content_type_whitelist'] =
                    $contentNegotiationConfig['content_type_whitelist'][$controllerServiceName];
            }
        }
        $service = new DoctrineRpcServiceEntity();
        $service->exchangeArray($data);
        return $service;
    }
public function fetch ( $ controllerServiceName ) { $ data = [ 'controller_service_name' => $ controllerServiceName ] ; $ config = $ this -> configResource -> fetch ( true ) ; if ( isset ( $ config [ 'zf-rpc' ] [ $ controllerServiceName ] ) ) { $ rpcConfig = $ config [ 'zf-rpc' ] [ $ controllerServiceName ] ; if ( isset ( $ rpcConfig [ 'route_name' ] ) ) { $ data [ 'route_name' ] = $ rpcConfig [ 'route_name' ] ; $ data [ 'route_match' ] = $ this -> getRouteMatchStringFromModuleConfig ( $ data [ 'route_name' ] , $ config ) ; } if ( isset ( $ rpcConfig [ 'http_methods' ] ) ) { $ data [ 'http_methods' ] = $ rpcConfig [ 'http_methods' ] ; } } else { return false ; } if ( isset ( $ config [ 'zf-content-negotiation' ] ) ) { $ contentNegotiationConfig = $ config [ 'zf-content-negotiation' ] ; if ( isset ( $ contentNegotiationConfig [ 'controllers' ] [ $ controllerServiceName ] ) ) { $ data [ 'selector' ] = $ contentNegotiationConfig [ 'controllers' ] [ $ controllerServiceName ] ; } if ( isset ( $ contentNegotiationConfig [ 'accept_whitelist' ] [ $ controllerServiceName ] ) ) { $ data [ 'accept_whitelist' ] = $ contentNegotiationConfig [ 'accept_whitelist' ] [ $ controllerServiceName ] ; } if ( isset ( $ contentNegotiationConfig [ 'content_type_whitelist' ] [ $ controllerServiceName ] ) ) { $ data [ 'content_type_whitelist' ] = $ contentNegotiationConfig [ 'content_type_whitelist' ] [ $ controllerServiceName ] ; } } $ service = new DoctrineRpcServiceEntity ( ) ; $ service -> exchangeArray ( $ data ) ; return $ service ; }
Fetch a single RPC service
 @todo get route details?
Fetch a single RPC service @todo get route details?
// Is this handled differently in recent versions of Apigility // FIXME: verify this\ // Is this handled differently in recent versions of Apigility // FIXME: verify this\