3 * A content object represents page content, e.g. the text to show on a page.
4 * Content objects have no knowledge about how they relate to Wiki pages.
13 * @return String a string representing the content in a way useful for building a full text search index.
14 * If no useful representation exists, this method returns an empty string.
16 * @todo: test that this actually works
17 * @todo: make sure this also works with LuceneSearch / WikiSearch
19 public function getTextForSearchIndex( );
24 * @return String the wikitext to include when another page includes this content, or false if the content is not
25 * includable in a wikitext page.
27 * @TODO: allow native handling, bypassing wikitext representation, like for includable special pages.
28 * @TODO: use in parser, etc!
30 public function getWikitextForTransclusion( );
33 * Returns a textual representation of the content suitable for use in edit summaries and log messages.
37 * @param int $maxlength maximum length of the summary text
38 * @return String the summary text
40 public function getTextForSummary( $maxlength = 250 );
43 * Returns native representation of the data. Interpretation depends on the data model used,
44 * as given by getDataModel().
48 * @return mixed the native representation of the content. Could be a string, a nested array
49 * structure, an object, a binary blob... anything, really.
51 * @NOTE: review all calls carefully, caller must be aware of content model!
53 public function getNativeData( );
56 * returns the content's nominal size in bogo-bytes.
60 public function getSize( );
63 * Returns the id of the content model used by this content objects.
64 * Corresponds to the CONTENT_MODEL_XXX constants.
68 * @return int the model id
70 public function getModel();
73 * Convenience method that returns the ContentHandler singleton for handling the content
74 * model this Content object uses.
76 * Shorthand for ContentHandler::getForContent( $this )
80 * @return ContentHandler
82 public function getContentHandler();
85 * Convenience method that returns the default serialization format for the content model
86 * model this Content object uses.
88 * Shorthand for $this->getContentHandler()->getDefaultFormat()
92 * @return ContentHandler
94 public function getDefaultFormat();
97 * Convenience method that returns the list of serialization formats supported
98 * for the content model model this Content object uses.
100 * Shorthand for $this->getContentHandler()->getSupportedFormats()
104 * @return array of supported serialization formats
106 public function getSupportedFormats();
109 * Returns true if $format is a supported serialization format for this Content object,
112 * Note that this should always return true if $format is null, because null stands for the
113 * default serialization.
115 * Shorthand for $this->getContentHandler()->isSupportedFormat( $format )
119 * @param String $format the format to check
120 * @return bool whether the format is supported
122 public function isSupportedFormat( $format );
125 * Convenience method for serializing this Content object.
127 * Shorthand for $this->getContentHandler()->serializeContent( $this, $format )
131 * @param null|String $format the desired serialization format (or null for the default format).
132 * @return String serialized form of this Content object
134 public function serialize( $format = null );
137 * Returns true if this Content object represents empty content.
141 * @return bool whether this Content object is empty
143 public function isEmpty();
146 * Returns whether the content is valid. This is intended for local validity checks, not considering global consistency.
147 * Content needs to be valid before it can be saved.
149 * This default implementation always returns true.
155 public function isValid();
158 * Returns true if this Content objects is conceptually equivalent to the given Content object.
161 * * Will return false if $that is null.
162 * * Will return true if $that === $this.
163 * * Will return false if $that->getModelName() != $this->getModel().
164 * * Will return false if $that->getNativeData() is not equal to $this->getNativeData(),
165 * where the meaning of "equal" depends on the actual data model.
167 * Implementations should be careful to make equals() transitive and reflexive:
169 * * $a->equals( $b ) <=> $b->equals( $a )
170 * * $a->equals( $b ) && $b->equals( $c ) ==> $a->equals( $c )
174 * @param Content $that the Content object to compare to
175 * @return bool true if this Content object is equal to $that, false otherwise.
177 public function equals( Content
$that = null );
180 * Return a copy of this Content object. The following must be true for the object returned
181 * if $copy = $original->copy()
183 * * get_class($original) === get_class($copy)
184 * * $original->getModel() === $copy->getModel()
185 * * $original->equals( $copy )
187 * If and only if the Content object is immutable, the copy() method can and should
188 * return $this. That is, $copy === $original may be true, but only for immutable content
193 * @return Content. A copy of this object
195 public function copy( );
198 * Returns true if this content is countable as a "real" wiki page, provided
199 * that it's also in a countable location (e.g. a current revision in the main namespace).
203 * @param $hasLinks Bool: if it is known whether this content contains links, provide this information here,
204 * to avoid redundant parsing to find out.
207 public function isCountable( $hasLinks = null ) ;
210 * Convenience method, shorthand for
211 * $this->getContentHandler()->getParserOutput( $this, $title, $revId, $options, $generateHtml )
213 * @note: subclasses should NOT override this to provide custom rendering.
214 * Override ContentHandler::getParserOutput() instead!
216 * @param Title $title
218 * @param null|ParserOptions $options
219 * @param Boolean $generateHtml whether to generate Html (default: true). If false,
220 * the result of calling getText() on the ParserOutput object returned by
221 * this method is undefined.
225 * @return ParserOutput
227 public function getParserOutput( Title
$title, $revId = null, ParserOptions
$options = null, $generateHtml = true );
230 * Construct the redirect destination from this content and return an
231 * array of Titles, or null if this content doesn't represent a redirect.
232 * The last element in the array is the final destination after all redirects
233 * have been resolved (up to $wgMaxRedirects times).
237 * @return Array of Titles, with the destination last
239 public function getRedirectChain();
242 * Construct the redirect destination from this content and return a Title,
243 * or null if this content doesn't represent a redirect.
244 * This will only return the immediate redirect target, useful for
245 * the redirect table and other checks that don't need full recursion.
249 * @return Title: The corresponding Title
251 public function getRedirectTarget();
254 * Construct the redirect destination from this content and return the
255 * Title, or null if this content doesn't represent a redirect.
256 * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit
257 * in order to provide (hopefully) the Title of the final destination instead of another redirect.
263 public function getUltimateRedirectTarget();
266 * Returns whether this Content represents a redirect.
267 * Shorthand for getRedirectTarget() !== null.
273 public function isRedirect();
276 * Returns the section with the given id.
280 * @param String $sectionId the section's id, given as a numeric string. The id "0" retrieves the section before
281 * the first heading, "1" the text between the first heading (included) and the second heading (excluded), etc.
282 * @return Content|Boolean|null the section, or false if no such section exist, or null if sections are not supported
284 public function getSection( $sectionId );
287 * Replaces a section of the content and returns a Content object with the section replaced.
291 * @param $section empty/null/false or a section number (0, 1, 2, T1, T2...), or "new"
292 * @param $with Content: new content of the section
293 * @param $sectionTitle String: new section's subject, only if $section is 'new'
294 * @return string Complete article text, or null if error
296 public function replaceSection( $section, Content
$with, $sectionTitle = '' );
299 * Returns a Content object with pre-save transformations applied (or this object if no transformations apply).
303 * @param Title $title
305 * @param null|ParserOptions $popts
308 public function preSaveTransform( Title
$title, User
$user, ParserOptions
$popts );
311 * Returns a new WikitextContent object with the given section heading prepended, if supported.
312 * The default implementation just returns this Content object unmodified, ignoring the section header.
316 * @param $header String
319 public function addSectionHeader( $header );
322 * Returns a Content object with preload transformations applied (or this object if no transformations apply).
326 * @param Title $title
327 * @param null|ParserOptions $popts
330 public function preloadTransform( Title
$title, ParserOptions
$popts );
332 # TODO: handle ImagePage and CategoryPage
333 # TODO: make sure we cover lucene search / wikisearch.
334 # TODO: make sure ReplaceTemplates still works
335 # FUTURE: nice&sane integration of GeSHi syntax highlighting
336 # [11:59] <vvv> Hooks are ugly; make CodeHighlighter interface and a config to set the class which handles syntax highlighting
337 # [12:00] <vvv> And default it to a DummyHighlighter
339 # TODO: make sure we cover the external editor interface (does anyone actually use that?!)
341 # TODO: tie into API to provide contentModel for Revisions
342 # TODO: tie into API to provide serialized version and contentFormat for Revisions
343 # TODO: tie into API edit interface
344 # FUTURE: make EditForm plugin for EditPage
346 # FUTURE: special type for redirects?!
347 # FUTURE: MultipartMultipart < WikipageContent (Main + Links + X)
348 # FUTURE: LinksContent < LanguageLinksContent, CategoriesContent
350 // @TODO: add support for ar_content_format, ar_content_model, rev_content_format, rev_content_model to API
355 * A content object represents page content, e.g. the text to show on a page.
356 * Content objects have no knowledge about how they relate to Wiki pages.
360 abstract class AbstractContent
implements Content
{
363 * Name of the content model this Content object represents.
364 * Use with CONTENT_MODEL_XXX constants
366 * @var String $model_id
371 * @param int $model_id
373 public function __construct( $model_id = null ) {
374 $this->model_id
= $model_id;
378 * Returns the id of the content model used by this content objects.
379 * Corresponds to the CONTENT_MODEL_XXX constants.
383 * @return int the model id
385 public function getModel() {
386 return $this->model_id
;
390 * Throws an MWException if $model_id is not the id of the content model
391 * supported by this Content object.
393 * @param int $model_id the model to check
395 * @throws MWException
397 protected function checkModelID( $model_id ) {
398 if ( $model_id !== $this->model_id
) {
399 $model_name = ContentHandler
::getContentModelName( $model_id );
400 $own_model_name = ContentHandler
::getContentModelName( $this->model_id
);
402 throw new MWException( "Bad content model: expected {$this->model_id} ($own_model_name) but got found $model_id ($model_name)." );
407 * Convenience method that returns the ContentHandler singleton for handling the content
408 * model this Content object uses.
410 * Shorthand for ContentHandler::getForContent( $this )
414 * @return ContentHandler
416 public function getContentHandler() {
417 return ContentHandler
::getForContent( $this );
421 * Convenience method that returns the default serialization format for the content model
422 * model this Content object uses.
424 * Shorthand for $this->getContentHandler()->getDefaultFormat()
428 * @return ContentHandler
430 public function getDefaultFormat() {
431 return $this->getContentHandler()->getDefaultFormat();
435 * Convenience method that returns the list of serialization formats supported
436 * for the content model model this Content object uses.
438 * Shorthand for $this->getContentHandler()->getSupportedFormats()
442 * @return array of supported serialization formats
444 public function getSupportedFormats() {
445 return $this->getContentHandler()->getSupportedFormats();
449 * Returns true if $format is a supported serialization format for this Content object,
452 * Note that this will always return true if $format is null, because null stands for the
453 * default serialization.
455 * Shorthand for $this->getContentHandler()->isSupportedFormat( $format )
459 * @param String $format the format to check
460 * @return bool whether the format is supported
462 public function isSupportedFormat( $format ) {
464 return true; // this means "use the default"
467 return $this->getContentHandler()->isSupportedFormat( $format );
471 * Throws an MWException if $this->isSupportedFormat( $format ) doesn't return true.
474 * @throws MWException
476 protected function checkFormat( $format ) {
477 if ( !$this->isSupportedFormat( $format ) ) {
478 throw new MWException( "Format $format is not supported for content model " . $this->getModel() );
483 * Convenience method for serializing this Content object.
485 * Shorthand for $this->getContentHandler()->serializeContent( $this, $format )
489 * @param null|String $format the desired serialization format (or null for the default format).
490 * @return String serialized form of this Content object
492 public function serialize( $format = null ) {
493 return $this->getContentHandler()->serializeContent( $this, $format );
497 * Returns true if this Content object represents empty content.
501 * @return bool whether this Content object is empty
503 public function isEmpty() {
504 return $this->getSize() == 0;
508 * Returns if the content is valid. This is intended for local validity checks, not considering global consistency.
509 * It needs to be valid before it can be saved.
511 * This default implementation always returns true.
517 public function isValid() {
522 * Returns true if this Content objects is conceptually equivalent to the given Content object.
524 * Will returns false if $that is null.
525 * Will return true if $that === $this.
526 * Will return false if $that->getModelName() != $this->getModel().
527 * Will return false if $that->getNativeData() is not equal to $this->getNativeData(),
528 * where the meaning of "equal" depends on the actual data model.
530 * Implementations should be careful to make equals() transitive and reflexive:
532 * * $a->equals( $b ) <=> $b->equals( $a )
533 * * $a->equals( $b ) && $b->equals( $c ) ==> $a->equals( $c )
537 * @param Content $that the Content object to compare to
538 * @return bool true if this Content object is euqual to $that, false otherwise.
540 public function equals( Content
$that = null ) {
541 if ( is_null( $that ) ){
545 if ( $that === $this ) {
549 if ( $that->getModel() !== $this->getModel() ) {
553 return $this->getNativeData() === $that->getNativeData();
557 * Convenience method, shorthand for
558 * $this->getContentHandler()->getParserOutput( $this, $title, $revId, $options, $generateHtml )
560 * @note: subclasses should NOT override this to provide custom rendering.
561 * Override ContentHandler::getParserOutput() instead!
563 * @param Title $title
565 * @param null|ParserOptions $options
566 * @param Boolean $generateHtml whether to generate Html (default: true). If false,
567 * the result of calling getText() on the ParserOutput object returned by
568 * this method is undefined.
572 * @return ParserOutput
574 public function getParserOutput( Title
$title, $revId = null, ParserOptions
$options = null, $generateHtml = true ) {
575 return $this->getContentHandler()->getParserOutput( $this, $title, $revId, $options, $generateHtml );
579 * Construct the redirect destination from this content and return an
580 * array of Titles, or null if this content doesn't represent a redirect.
581 * The last element in the array is the final destination after all redirects
582 * have been resolved (up to $wgMaxRedirects times).
586 * @return Array of Titles, with the destination last
588 public function getRedirectChain() {
593 * Construct the redirect destination from this content and return a Title,
594 * or null if this content doesn't represent a redirect.
595 * This will only return the immediate redirect target, useful for
596 * the redirect table and other checks that don't need full recursion.
600 * @return Title: The corresponding Title
602 public function getRedirectTarget() {
607 * Construct the redirect destination from this content and return the
608 * Title, or null if this content doesn't represent a redirect.
609 * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit
610 * in order to provide (hopefully) the Title of the final destination instead of another redirect.
616 public function getUltimateRedirectTarget() {
625 public function isRedirect() {
626 return $this->getRedirectTarget() !== null;
630 * Returns the section with the given id.
632 * The default implementation returns null.
636 * @param String $sectionId the section's id, given as a numeric string. The id "0" retrieves the section before
637 * the first heading, "1" the text between the first heading (included) and the second heading (excluded), etc.
638 * @return Content|Boolean|null the section, or false if no such section exist, or null if sections are not supported
640 public function getSection( $sectionId ) {
645 * Replaces a section of the content and returns a Content object with the section replaced.
649 * @param $section empty/null/false or a section number (0, 1, 2, T1, T2...), or "new"
650 * @param $with Content: new content of the section
651 * @param $sectionTitle String: new section's subject, only if $section is 'new'
652 * @return string Complete article text, or null if error
654 public function replaceSection( $section, Content
$with, $sectionTitle = '' ) {
659 * Returns a Content object with pre-save transformations applied (or this object if no transformations apply).
663 * @param Title $title
665 * @param null|ParserOptions $popts
668 public function preSaveTransform( Title
$title, User
$user, ParserOptions
$popts ) {
673 * Returns a new WikitextContent object with the given section heading prepended, if supported.
674 * The default implementation just returns this Content object unmodified, ignoring the section header.
678 * @param $header String
681 public function addSectionHeader( $header ) {
686 * Returns a Content object with preload transformations applied (or this object if no transformations apply).
690 * @param Title $title
691 * @param null|ParserOptions $popts
694 public function preloadTransform( Title
$title, ParserOptions
$popts ) {
700 * Content object implementation for representing flat text.
702 * TextContent instances are immutable
706 abstract class TextContent
extends AbstractContent
{
708 public function __construct( $text, $model_id = null ) {
709 parent
::__construct( $model_id );
711 $this->mText
= $text;
714 public function copy() {
715 return $this; #NOTE: this is ok since TextContent are immutable.
718 public function getTextForSummary( $maxlength = 250 ) {
721 $text = $this->getNativeData();
723 $truncatedtext = $wgContLang->truncate(
724 preg_replace( "/[\n\r]/", ' ', $text ),
725 max( 0, $maxlength ) );
727 return $truncatedtext;
731 * returns the text's size in bytes.
733 * @return int the size
735 public function getSize( ) {
736 $text = $this->getNativeData( );
737 return strlen( $text );
741 * Returns true if this content is not a redirect, and $wgArticleCountMethod is "any".
743 * @param $hasLinks Bool: if it is known whether this content contains links, provide this information here,
744 * to avoid redundant parsing to find out.
746 * @return bool true if the content is countable
748 public function isCountable( $hasLinks = null ) {
749 global $wgArticleCountMethod;
751 if ( $this->isRedirect( ) ) {
755 if ( $wgArticleCountMethod === 'any' ) {
763 * Returns the text represented by this Content object, as a string.
765 * @return String the raw text
767 public function getNativeData( ) {
768 $text = $this->mText
;
773 * Returns the text represented by this Content object, as a string.
775 * @return String the raw text
777 public function getTextForSearchIndex( ) {
778 return $this->getNativeData();
782 * Returns the text represented by this Content object, as a string.
784 * @return String the raw text
786 public function getWikitextForTransclusion( ) {
787 return $this->getNativeData();
791 * Diff this content object with another content object..
795 * @param Content $that the other content object to compare this content object to
796 * @param Language $lang the language object to use for text segmentation. If not given, $wgContentLang is used.
798 * @return DiffResult a diff representing the changes that would have to be made to this content object
799 * to make it equal to $that.
801 public function diff( Content
$that, Language
$lang = null ) {
804 $this->checkModelID( $that->getModel() );
806 #@todo: could implement this in DifferenceEngine and just delegate here?
808 if ( !$lang ) $lang = $wgContLang;
810 $otext = $this->getNativeData();
811 $ntext = $this->getNativeData();
813 # Note: Use native PHP diff, external engines don't give us abstract output
814 $ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) );
815 $nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
817 $diff = new Diff( $ota, $nta );
827 class WikitextContent
extends TextContent
{
829 public function __construct( $text ) {
830 parent
::__construct($text, CONTENT_MODEL_WIKITEXT
);
834 * Returns the section with the given id.
836 * @param String $section
838 * @internal param String $sectionId the section's id
839 * @return Content|false|null the section, or false if no such section exist, or null if sections are not supported
841 public function getSection( $section ) {
844 $text = $this->getNativeData();
845 $sect = $wgParser->getSection( $text, $section, false );
847 return new WikitextContent( $sect );
851 * Replaces a section in the wikitext
853 * @param $section empty/null/false or a section number (0, 1, 2, T1, T2...), or "new"
854 * @param $with Content: new content of the section
855 * @param $sectionTitle String: new section's subject, only if $section is 'new'
857 * @throws MWException
858 * @return Content Complete article content, or null if error
860 public function replaceSection( $section, Content
$with, $sectionTitle = '' ) {
861 wfProfileIn( __METHOD__
);
863 $myModelId = $this->getModel();
864 $sectionModelId = $with->getModel();
866 if ( $sectionModelId != $myModelId ) {
867 $myModelName = ContentHandler
::getContentModelName( $myModelId );
868 $sectionModelName = ContentHandler
::getContentModelName( $sectionModelId );
870 throw new MWException( "Incompatible content model for section: document uses $myModelId ($myModelName), "
871 . "section uses $sectionModelId ($sectionModelName)." );
874 $oldtext = $this->getNativeData();
875 $text = $with->getNativeData();
877 if ( $section === '' ) {
878 return $with; #XXX: copy first?
879 } if ( $section == 'new' ) {
880 # Inserting a new section
881 $subject = $sectionTitle ?
wfMsgForContent( 'newsectionheaderdefaultlevel', $sectionTitle ) . "\n\n" : '';
882 if ( wfRunHooks( 'PlaceNewSection', array( $this, $oldtext, $subject, &$text ) ) ) {
883 $text = strlen( trim( $oldtext ) ) > 0
884 ?
"{$oldtext}\n\n{$subject}{$text}"
885 : "{$subject}{$text}";
888 # Replacing an existing section; roll out the big guns
891 $text = $wgParser->replaceSection( $oldtext, $section, $text );
894 $newContent = new WikitextContent( $text );
896 wfProfileOut( __METHOD__
);
901 * Returns a new WikitextContent object with the given section heading prepended.
903 * @param $header String
906 public function addSectionHeader( $header ) {
907 $text = wfMsgForContent( 'newsectionheaderdefaultlevel', $header ) . "\n\n" . $this->getNativeData();
909 return new WikitextContent( $text );
913 * Returns a Content object with pre-save transformations applied (or this object if no transformations apply).
915 * @param Title $title
917 * @param ParserOptions $popts
920 public function preSaveTransform( Title
$title, User
$user, ParserOptions
$popts ) { #FIXME: also needed for JS/CSS!
921 global $wgParser, $wgConteLang;
923 $text = $this->getNativeData();
924 $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts );
926 return new WikitextContent( $pst );
930 * Returns a Content object with preload transformations applied (or this object if no transformations apply).
932 * @param Title $title
933 * @param ParserOptions $popts
936 public function preloadTransform( Title
$title, ParserOptions
$popts ) {
937 global $wgParser, $wgConteLang;
939 $text = $this->getNativeData();
940 $plt = $wgParser->getPreloadText( $text, $title, $popts );
942 return new WikitextContent( $plt );
945 public function getRedirectChain() {
946 $text = $this->getNativeData();
947 return Title
::newFromRedirectArray( $text );
950 public function getRedirectTarget() {
951 $text = $this->getNativeData();
952 return Title
::newFromRedirect( $text );
955 public function getUltimateRedirectTarget() {
956 $text = $this->getNativeData();
957 return Title
::newFromRedirectRecurse( $text );
961 * Returns true if this content is not a redirect, and this content's text is countable according to
962 * the criteria defined by $wgArticleCountMethod.
964 * @param Bool $hasLinks if it is known whether this content contains links, provide this information here,
965 * to avoid redundant parsing to find out.
966 * @param null|\Title $title
968 * @internal param \IContextSource $context context for parsing if necessary
970 * @return bool true if the content is countable
972 public function isCountable( $hasLinks = null, Title
$title = null ) {
973 global $wgArticleCountMethod, $wgRequest;
975 if ( $this->isRedirect( ) ) {
979 $text = $this->getNativeData();
981 switch ( $wgArticleCountMethod ) {
985 return strpos( $text, ',' ) !== false;
987 if ( $hasLinks === null ) { # not known, find out
989 $context = RequestContext
::getMain();
990 $title = $context->getTitle();
993 $po = $this->getParserOutput( $title, null, null, false );
994 $links = $po->getLinks();
995 $hasLinks = !empty( $links );
1004 public function getTextForSummary( $maxlength = 250 ) {
1005 $truncatedtext = parent
::getTextForSummary( $maxlength );
1007 #clean up unfinished links
1008 #XXX: make this optional? wasn't there in autosummary, but required for deletion summary.
1009 $truncatedtext = preg_replace( '/\[\[([^\]]*)\]?$/', '$1', $truncatedtext );
1011 return $truncatedtext;
1019 class MessageContent
extends TextContent
{
1020 public function __construct( $msg_key, $params = null, $options = null ) {
1021 parent
::__construct(null, CONTENT_MODEL_WIKITEXT
); #XXX: messages may be wikitext, html or plain text! and maybe even something else entirely.
1023 $this->mMessageKey
= $msg_key;
1025 $this->mParameters
= $params;
1027 if ( is_null( $options ) ) {
1030 elseif ( is_string( $options ) ) {
1031 $options = array( $options );
1034 $this->mOptions
= $options;
1038 * Returns the message as rendered HTML, using the options supplied to the constructor plus "parse".
1039 * @return String the message text, parsed
1041 public function getHtml( ) {
1042 $opt = array_merge( $this->mOptions
, array('parse') );
1044 return wfMsgExt( $this->mMessageKey
, $this->mParameters
, $opt );
1049 * Returns the message as raw text, using the options supplied to the constructor minus "parse" and "parseinline".
1051 * @return String the message text, unparsed.
1053 public function getNativeData( ) {
1054 $opt = array_diff( $this->mOptions
, array('parse', 'parseinline') );
1056 return wfMsgExt( $this->mMessageKey
, $this->mParameters
, $opt );
1064 class JavaScriptContent
extends TextContent
{
1065 public function __construct( $text ) {
1066 parent
::__construct($text, CONTENT_MODEL_JAVASCRIPT
);
1074 class CssContent
extends TextContent
{
1075 public function __construct( $text ) {
1076 parent
::__construct($text, CONTENT_MODEL_CSS
);