Make it easier to subclass Content and ContentHandler subclasses
[lhc/web/wiklou.git] / includes / content / CssContentHandler.php
index 7becabb..1ab4ee2 100644 (file)
  * @ingroup Content
  */
 class CssContentHandler extends TextContentHandler {
+
+       /**
+        * @param string $modelId
+        */
        public function __construct( $modelId = CONTENT_MODEL_CSS ) {
                parent::__construct( $modelId, array( CONTENT_FORMAT_CSS ) );
        }
 
-       public function unserializeContent( $text, $format = null ) {
-               $this->checkFormat( $format );
-
-               return new CssContent( $text );
-       }
-
-       public function makeEmptyContent() {
-               return new CssContent( '' );
+       protected function getContentClass() {
+               return 'CssContent';
        }
 
        /**
@@ -47,7 +45,8 @@ class CssContentHandler extends TextContentHandler {
         *
         * @param Title $title
         * @param Content $content
-        * @return Language wfGetLangObj( 'en' )
+        *
+        * @return Language Return of wfGetLangObj( 'en' )
         *
         * @see ContentHandler::getPageLanguage()
         */
@@ -60,11 +59,13 @@ class CssContentHandler extends TextContentHandler {
         *
         * @param Title $title
         * @param Content $content
-        * @return Language wfGetLangObj( 'en' )
+        *
+        * @return Language Return of wfGetLangObj( 'en' )
         *
         * @see ContentHandler::getPageViewLanguage()
         */
        public function getPageViewLanguage( Title $title, Content $content = null ) {
                return wfGetLangObj( 'en' );
        }
+
 }