Class Json

Summary

Fully Qualified Name: Laminas\View\Helper\Json
Extends: AbstractHelper

Description

Helper for simplifying JSON responses

Methods

Name Description Defined By
__invoke() Encode data as JSON and set response header Json
getView() Get the view object AbstractHelper
setResponse() Set the response object Json
setView() Set the View object AbstractHelper

Method Details

__invoke()

Encode data as JSON and set response header

Parameter Name Type Description
$data mixed
$jsonOptions array Options

Returns: string|void

getView()

Get the view object

Returns: null|\Renderer

setResponse()

Set the response object

Parameter Name Type Description
$response \Response

Returns: \Json

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top