24 private $redirectTarget =
false;
32 parent::__construct( $text, $modelId );
52 if ( $this->redirectTarget !==
false ) {
53 return $this->redirectTarget;
55 $this->redirectTarget =
null;
57 if ( str_starts_with( $text,
'/* #REDIRECT */' ) ) {
59 if ( preg_match(
'/title=(.*?)&action=raw/', $text,
$matches ) ) {
60 $title = Title::newFromText( urldecode(
$matches[1] ) );
65 $this->redirectTarget = $title;
71 return $this->redirectTarget;
76class_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.