-abstract class CategoryListBase {
- # FIXME: Is storing all member variables as simple arrays a good idea?
- # Should we use some kind of associative array instead?
- /** Names of all member categories, normalized to DB-key form */
- protected $mNames = null;
- /** IDs of all member categories */
- protected $mIDs = null;
- /**
- * Counts of membership (cat_pages, cat_subcats, cat_files) for all member
- * categories
- */
- protected $mPages = null, $mSubcats = null, $mFiles = null;
-
- protected function __construct() {}
-
- /** See CategoryList::newFromNames for details. */
- protected function setNames( $names ) {
- if( !is_array( $names ) ) {
- throw new MWException( __METHOD__.' passed non-array' );
- }
- $this->mNames = array_diff(
- array_map(
- array( 'CategoryListBase', 'setNamesCallback' ),
- $names
- ),
- array( false )
- );
- }
+class Category {
+ /** Name of the category, normalized to DB-key form */
+ private $mName = null;
+ private $mID = null;
+ /** Category page title */
+ private $mTitle = null;
+ /** Counts of membership (cat_pages, cat_subcats, cat_files) */
+ private $mPages = null, $mSubcats = null, $mFiles = null;