Nexus API Reference

JsonResponse
in package

FinalYes
Tags
psalm-api

JSON response sugar. JSON_UNESCAPED_SLASHES is the default since slashes appear constantly in URLs and look ugly when escaped.

Table of Contents

Constants

DEFAULT_FLAGS  = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE

Methods

created()  : ResponseInterface
ok()  : ResponseInterface

Constants

DEFAULT_FLAGS

public mixed DEFAULT_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE

Methods

created()

public static created(mixed $data[, string|null $location = null ][, int $flags = self::DEFAULT_FLAGS ]) : ResponseInterface
Parameters
$data : mixed
$location : string|null = null
$flags : int = self::DEFAULT_FLAGS
Return values
ResponseInterface

ok()

public static ok(mixed $data[, int $flags = self::DEFAULT_FLAGS ]) : ResponseInterface
Parameters
$data : mixed
$flags : int = self::DEFAULT_FLAGS
Return values
ResponseInterface

        
On this page

Search results