src/Admin/Model/DoctrineRestServiceModel.php
/**
     * Derive the name of the collection class from the controller service name
     *
     * @param string $controllerServiceName
     * @param DoctrineRestServiceEntity $metadata
     * @param array $config
     * @return string
     */
Derive the name of the collection class from the controller service name
@param string $controllerServiceName
@param DoctrineRestServiceEntity $metadata
@param array $config
@return string
Derive the name of the collection class from the controller service name @param string $controllerServiceName @param DoctrineRestServiceEntity $metadata @param array $config @return string
protected function deriveCollectionClass($controllerServiceName, DoctrineRestServiceEntity $metadata, array $config)
    {
        if (isset($config['zf-rest'][$controllerServiceName]['collection_class'])) {
            return $config['zf-rest'][$controllerServiceName]['collection_class'];
        }
        $module = $metadata->module == $this->module ? $this->module : $metadata->module;
        if (! preg_match(
            '#'
            . preg_quote($module . '\\Rest\\')
            . '(?P<service>[^\\\\]+)'
            . preg_quote('\\Controller')
            . '#',
            $controllerServiceName,
            $matches
        )) {
            return null;
        }
        return sprintf('%s\\Rest\\%s\\%sCollection', $module, $matches['service'], $matches['service']);
    }
protected function deriveCollectionClass ( $ controllerServiceName , DoctrineRestServiceEntity $ metadata , array $ config ) { if ( isset ( $ config [ 'zf-rest' ] [ $ controllerServiceName ] [ 'collection_class' ] ) ) { return $ config [ 'zf-rest' ] [ $ controllerServiceName ] [ 'collection_class' ] ; } $ module = $ metadata -> module == $ this -> module ? $ this -> module : $ metadata -> module ; if ( ! preg_match ( '#' . preg_quote ( $ module . '\\Rest\\' ) . '(?P<service>[^\\\\]+)' . preg_quote ( '\\Controller' ) . '#' , $ controllerServiceName , $ matches ) ) { return null ; } return sprintf ( '%s\\Rest\\%s\\%sCollection' , $ module , $ matches [ 'service' ] , $ matches [ 'service' ] ) ; }
Derive the name of the collection class from the controller service name
 @param string $controllerServiceName
 @param DoctrineRestServiceEntity $metadata
 @param array $config
 @return string
Derive the name of the collection class from the controller service name @param string $controllerServiceName @param DoctrineRestServiceEntity $metadata @param array $config @return string