Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / page / CategoryPage.php
index 7dea271..dda13d3 100644 (file)
 /**
  * Special handling for category description pages, showing pages,
  * subcategories and file that belong to the category
+ *
+ * @property WikiCategoryPage $mPage Set by overwritten newPage() in this class
  */
 class CategoryPage extends Article {
        # Subclasses can change this to override the viewer class.
-       public $mCategoryViewerClass = 'CategoryViewer';
-
-       /**
-        * @var WikiCategoryPage
-        */
-       protected $mPage;
+       protected $mCategoryViewerClass = CategoryViewer::class;
 
        /**
         * @param Title $title
@@ -117,4 +114,12 @@ class CategoryPage extends Article {
                $out->addHTML( $viewer->getHTML() );
                $this->addHelpLink( 'Help:Categories' );
        }
+
+       function getCategoryViewerClass() {
+               return $this->mCategoryViewerClass;
+       }
+
+       function setCategoryViewerClass( $class ) {
+               $this->mCategoryViewerClass = $class;
+       }
 }