src/Admin/Model/DoctrineRestServiceModel.php
/**
     * Delete a named service
     *
     * @todo Remove content-negotiation and/or HAL configuration?
     * @param string $controllerService
     * @param bool $recursive
     * @return true
     */
Delete a named service
@todo Remove content-negotiation and/or HAL configuration.
@param string $controllerService
@param bool $recursive
@return true
Delete a named service @todo Remove content - negotiation and / or HAL configuration . @param string $controllerService @param bool $recursive @return true
public function deleteService($controllerService, $recursive = false)
    {
        try {
            $service = $this->fetch($controllerService);
        } catch (Exception\RuntimeException $e) {
            throw new Exception\RuntimeException(sprintf(
                'Cannot delete REST service "%s"; not found',
                $controllerService
            ), 404);
        }
        if ($recursive) {
            $reflection = new ReflectionClass($service->resourceClass);
            Utility::recursiveDelete(dirname($reflection->getFileName()));
        }
        $this->deleteRoute($service);
        $response = $this->deleteDoctrineRestConfig($service);
        if ($response instanceof ApiProblem) {
            return $response;
        }
        return true;
    }
public function deleteService ( $ controllerService , $ recursive = false ) { try { $ service = $ this -> fetch ( $ controllerService ) ; } catch ( Exception \ RuntimeException $ e ) { throw new Exception \ RuntimeException ( sprintf ( 'Cannot delete REST service "%s"; not found' , $ controllerService ) , 404 ) ; } if ( $ recursive ) { $ reflection = new ReflectionClass ( $ service -> resourceClass ) ; Utility :: recursiveDelete ( dirname ( $ reflection -> getFileName ( ) ) ) ; } $ this -> deleteRoute ( $ service ) ; $ response = $ this -> deleteDoctrineRestConfig ( $ service ) ; if ( $ response instanceof ApiProblem ) { return $ response ; } return true ; }
Delete a named service
 @todo Remove content-negotiation and/or HAL configuration?
Delete a named service @todo Remove content - negotiation and / or HAL configuration?