protected function location($url)
    {
        /** @var $response Response */
        $response = $this->getResponse();

        $response->getHeaders()
            ->addHeaderLine(
                'Location',
                $url
            );

        $response->setStatusCode(201);

        return $response;
    }