38 private $redirectTarget =
false;
46 parent::__construct( $text, $modelId );
66 if ( $this->redirectTarget !==
false ) {
67 return $this->redirectTarget;
69 $this->redirectTarget =
null;
71 if ( str_starts_with( $text,
'/* #REDIRECT */' ) ) {
73 if ( preg_match(
'/title=(.*?)&action=raw/', $text,
$matches ) ) {
74 $title = Title::newFromText( urldecode(
$matches[1] ) );
79 $this->redirectTarget = $title;
85 return $this->redirectTarget;
90class_alias( CssContent::class,
'CssContent' );
equals(?Content $that=null)
Content object for CSS pages.
updateRedirect(Title $target)
__construct( $text, $modelId=CONTENT_MODEL_CSS)
Content object implementation for representing flat text.
getText()
Returns the text represented by this Content object, as a string.