OEModule\PASAPI\controllers\V1Controller::sendResponse PHP Метод

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

protected sendResponse ( $status = 200, $body = '' )
    protected function sendResponse($status = 200, $body = '')
    {
        header('HTTP/1.1 ' . $status);
        header('Content-type: ' . $this->getContentType());
        if ($status == 401) {
            header('WWW-Authenticate: Basic realm="OpenEyes"');
        }
        // TODO: configure allowed methods per resource
        if ($status == 405) {
            header('Allow: PUT');
        }
        echo $body;
        \Yii::app()->end();
    }