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

createAuthenticationAdapter() приватный Метод

Create a new authentication adapter
private createAuthenticationAdapter ( array $params ) : ZF\ApiProblem\ApiProblemResponse | Zend\Http\Response
$params array
Результат ZF\ApiProblem\ApiProblemResponse | Zend\Http\Response
    private function createAuthenticationAdapter($params)
    {
        try {
            $entity = $this->model->createAuthenticationAdapter($params);
        } catch (\Exception $e) {
            return new ApiProblemResponse(new ApiProblem($e->getCode(), $e->getMessage()));
        }
        $response = $this->getResponse();
        $response->setStatusCode(201);
        $response->getHeaders()->addHeaderLine('Location', $this->url()->fromRoute('zf-apigility/api/authentication', ['authentication_adapter' => $entity['name']]));
        return $this->createEntity($entity);
    }