ZF\Apigility\Admin\Controller\AuthenticationController::mappingAuthentication PHP Метод

mappingAuthentication() защищенный Метод

Map the authentication adapter to a module Since Apigility 1.1
protected mappingAuthentication ( Zend\Http\Request $request ) : ZF\ContentNegotiation\ViewModel | ZF\ApiProblem\ApiProblemResponse
$request Zend\Http\Request
Результат ZF\ContentNegotiation\ViewModel | ZF\ApiProblem\ApiProblemResponse
    protected function mappingAuthentication(Request $request)
    {
        $module = $this->params('name', false);
        $version = $this->params()->fromQuery('version', false);
        switch ($request->getMethod()) {
            case $request::METHOD_GET:
                return $this->createAuthenticationMapResult($this->model->getAuthenticationMap($module, $version));
            case $request::METHOD_PUT:
                return $this->updateAuthenticationMap($this->bodyParams(), $module, $version);
            case $request::METHOD_DELETE:
                return $this->removeAuthenticationMap($module, $version);
            default:
                $response = new ApiProblemResponse(new ApiProblem(405, 'Only the methods GET, PUT, DELETE are allowed for this URI'));
                $response->getHeaders()->addHeaderLine('Allow', 'GET, PUT, DELETE');
                return $response;
        }
    }