MediaWiki master
MediaWiki\Content\ContentJsonCodec Class Reference

ContentJsonCodec handles serialization of Content objects to/from JSON using methods of the appropriate ContentHandler. More...

Inherits JsonClassCodec, and JsonClassCodec.

Collaboration diagram for MediaWiki\Content\ContentJsonCodec:

Public Member Functions

 __construct (private IContentHandlerFactory $contentHandlerFactory)
 
 jsonClassHintFor (string $className, string $keyName)
 
 newFromJsonArray (string $className, array $json)
 
 toJsonArray ( $obj)
 

Detailed Description

ContentJsonCodec handles serialization of Content objects to/from JSON using methods of the appropriate ContentHandler.

<Content>

Access: internal

Definition at line 19 of file ContentJsonCodec.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Content\ContentJsonCodec::__construct ( private IContentHandlerFactory $contentHandlerFactory)

Definition at line 21 of file ContentJsonCodec.php.

Member Function Documentation

◆ jsonClassHintFor()

MediaWiki\Content\ContentJsonCodec::jsonClassHintFor ( string $className,
string $keyName )

Definition at line 50 of file ContentJsonCodec.php.

◆ newFromJsonArray()

MediaWiki\Content\ContentJsonCodec::newFromJsonArray ( string $className,
array $json )

Definition at line 38 of file ContentJsonCodec.php.

◆ toJsonArray()

MediaWiki\Content\ContentJsonCodec::toJsonArray ( $obj)

Definition at line 27 of file ContentJsonCodec.php.


The documentation for this class was generated from the following file: