Метод | Описание | |
---|---|---|
__construct ( stdClass $schema ) | JsonSchema constructor. | |
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | Execute the middleware. | |
fromArray ( array $json ) : static | callable | ||
fromDecodedObject ( stdClass $schema ) : static | callable | ||
fromEncodedString ( string $json ) : static | callable | ||
fromFile ( SplFileObject $file ) : static | callable |
Метод | Описание | |
---|---|---|
invalidateResponse ( Psr\Http\Message\ResponseInterface $response, string $reason, array $headers = [], string | null $body = null ) : Psr\Http\Message\ResponseInterface |
public __construct ( stdClass $schema ) | ||
$schema | stdClass | A JSON-decoded object-representation of the schema. |
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$next | callable | |
Результат | Psr\Http\Message\ResponseInterface |
public static fromDecodedObject ( stdClass $schema ) : static | callable | ||
$schema | stdClass | |
Результат | static | callable |
public static fromEncodedString ( string $json ) : static | callable | ||
$json | string | |
Результат | static | callable |