JsonOutput

Base class for json output

since 2016-09-27
author

Olle Härstedt

Methods

__construct

__construct(string|null $result) 

Arguments

$result

string|null

__toString

__toString() : string

Response

string

Json encoded object

Properties

result

result : mixed
var

Type(s)

mixed

Array like array('code' => 123, 'message' => 'Something went wrong.')

error : array|null
var

Type(s)

array|null

Success message pop-up

success : string|null
var

Type(s)

string|null

True if user is logged in

loggedIn : boolean
var

Type(s)

boolean

True if user has permission

hasPermission : boolean
var

Type(s)

boolean

Translated text of 'No permission'

noPermissionText : string
var

Type(s)

string