ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Prettyjson.php
Go to the documentation of this file.
1<?php
3
4use Exception;
5
6class Prettyjson extends Json
7{
11 protected static function getEncodeOptions()
12 {
13 if (!(defined('\JSON_PRETTY_PRINT') && defined('\JSON_UNESCAPED_SLASHES') && defined('\JSON_UNESCAPED_UNICODE'))) {
14 throw new Exception('PHP 5.4 or later is required to export uncompressed JSON');
15 }
16 return \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE;
17 }
21 public static function getDescription()
22 {
23 return 'Build an uncompressed JSON-encoded file (PHP 5.4 or later is needed)';
24 }
25}
An exception for terminatinating execution or to throw for unit testing.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27