data = $data; } /** * @return Content $this */ public function copy() { // UnknownContent is immutable, so no need to copy. return $this; } /** * Returns an empty string. * * @param int $maxlength * * @return string */ public function getTextForSummary( $maxlength = 250 ) { return ''; } /** * Returns the data size in bytes. * * @return int */ public function getSize() { return strlen( $this->data ); } /** * Returns false. * * @param bool|null $hasLinks If it is known whether this content contains links, * provide this information here, to avoid redundant parsing to find out. * * @return bool */ public function isCountable( $hasLinks = null ) { return false; } /** * @return string data of unknown format and meaning */ public function getNativeData() { return $this->getData(); } /** * @return string data of unknown format and meaning */ public function getData() { return $this->data; } /** * @param string|null $format * * @return string data of unknown format and meaning */ public function serialize( $format = null ) { return $this->getData(); } /** * Returns an empty string. * * @return string The raw text. */ public function getTextForSearchIndex() { return ''; } /** * @return false */ public function getWikitextForTransclusion() { return false; } /** * @param string $toModel * @param string $lossy * @return false */ public function convert( $toModel, $lossy = '' ) { return false; } protected function equalsInternal( Content $that ) { if ( !$that instanceof FallbackContent ) { return false; } return $this->getData() == $that->getData(); } } class_alias( FallbackContent::class, 'UnknownContent' );