Elgg\Http\ResponseFactory::respondFromContent PHP Метод

respondFromContent() публичный Метод

Send OK response
public respondFromContent ( string $content = '', integer $status_code = ELGG_HTTP_OK, array $headers = [] ) : type
$content string Response body
$status_code integer HTTP status code
$headers array HTTP headers (will be discarded for AJAX requets)
Результат type
    public function respondFromContent($content = '', $status_code = ELGG_HTTP_OK, array $headers = [])
    {
        if ($this->ajax->isReady()) {
            $hook_type = $this->parseContext();
            // $this->ajax->setStatusCode($status_code);
            return $this->send($this->ajax->respondFromOutput($content, $hook_type));
        }
        return $this->send($this->prepareResponse($content, $status_code, $headers));
    }