43 private $redirectTarget =
false;
51 parent::__construct( $text, $modelId );
71 if ( $this->redirectTarget !==
false ) {
72 return $this->redirectTarget;
74 $this->redirectTarget =
null;
76 if ( strpos( $text,
'/* #REDIRECT */' ) === 0 ) {
78 if ( preg_match(
'/title=(.*?)&action=raw/', $text,
$matches ) ) {
79 $title = Title::newFromText( urldecode(
$matches[1] ) );
84 $this->redirectTarget = $title;
90 return $this->redirectTarget;
95class_alias( CssContent::class,
'CssContent' );
equals(?Content $that=null)
Decides whether two Content objects are equal.
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.