PHP Class JsonFormatHelper, Platform-API-plugin

Inheritance: extends AppHelper
Exibir arquivo Open project: nodesagency/Platform-API-plugin

Protected Properties

Property Type Description
$_settings array _settings

Public Methods

Method Description
__construct ( View $View, array $settings = [] ) Allow overriding of settings
format ( string $json ) : string Indents a flat JSON string to make it more human-readable.
formatArray ( mixed $json ) : string formatArray

Method Details

__construct() public method

Allow overriding of settings
public __construct ( View $View, array $settings = [] )
$View View The View this helper is being attached to.
$settings array Configuration settings for the helper.

format() public method

Indents a flat JSON string to make it more human-readable.
public format ( string $json ) : string
$json string The original JSON string to process.
return string Indented version of the original JSON string.

formatArray() public method

Will only work with php 5.4. Mostly just a reminder
public formatArray ( mixed $json ) : string
$json mixed
return string Indented version of the original JSON string.

Property Details

$_settings protected_oe property

_settings
protected array $_settings
return array