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