[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/content/ -> JsonContent.php (summary)

JSON Content Model

Author: Ori Livneh <[email protected]>
Author: Kunal Mehta <[email protected]>
File Size: 120 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JsonContent:: (8 methods):
  __construct()
  getJsonData()
  isValid()
  beautifyJSON()
  preSaveTransform()
  fillParserOutput()
  objectTable()
  objectRow()


Class: JsonContent  - X-Ref

Represents the content of a JSON content.

__construct( $text, $modelId = CONTENT_MODEL_JSON )   X-Ref
No description

getJsonData()   X-Ref
Decodes the JSON into a PHP associative array.

return: array

isValid()   X-Ref

return: bool Whether content is valid JSON.

beautifyJSON()   X-Ref
Pretty-print JSON

return: bool|null|string

preSaveTransform( Title $title, User $user, ParserOptions $popts )   X-Ref
Beautifies JSON prior to save.

param: Title $title Title
param: User $user User
param: ParserOptions $popts
return: JsonContent

fillParserOutput( Title $title, $revId,ParserOptions $options, $generateHtml, ParserOutput &$output)   X-Ref
Set the HTML and add the appropriate styles

param: Title $title
param: int $revId
param: ParserOptions $options
param: bool $generateHtml
param: ParserOutput $output

objectTable( $mapping )   X-Ref
Constructs an HTML representation of a JSON object.

param: array $mapping
return: string HTML

objectRow( $key, $val )   X-Ref
Constructs HTML representation of a single key-value pair.

param: string $key
param: mixed $val
return: string HTML.



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1