/**
* The class name of objects that should be created
*
+ * @deprecated override getContentClass instead
+ *
* @var string
*/
protected $contentClass = 'JSONContent';
}
/**
- * Unserializes a JSONContent object.
- *
- * @param string $text Serialized form of the content
- * @param null|string $format The format used for serialization
+ * Temporary back-compat until extensions
+ * are updated to override this
*
- * @return JSONContent
+ * @return string
*/
- public function unserializeContent( $text, $format = null ) {
- $this->checkFormat( $format );
- return new $this->contentClass( $text );
+ protected function getContentClass() {
+ return $this->contentClass;
}
/**
- * Creates an empty JSONContent object.
+ * Returns the english language, because JSON is english, and should be handled as such.
+ *
+ * @param Title $title
+ * @param Content|null $content
*
- * @return JSONContent
+ * @return Language Return of wfGetLangObj( 'en' )
+ *
+ * @see ContentHandler::getPageLanguage()
*/
- public function makeEmptyContent() {
- return new $this->contentClass( '' );
- }
-
- /** JSON is English **/
public function getPageLanguage( Title $title, Content $content = null ) {
return wfGetLangObj( 'en' );
}
- /** JSON is English **/
+ /**
+ * Returns the english language, because JSON is english, and should be handled as such.
+ *
+ * @param Title $title
+ * @param Content|null $content
+ *
+ * @return Language Return of wfGetLangObj( 'en' )
+ *
+ * @see ContentHandler::getPageLanguage()
+ */
public function getPageViewLanguage( Title $title, Content $content = null ) {
return wfGetLangObj( 'en' );
}