Index: trunk/phase3/includes/Pager.php |
— | — | @@ -837,7 +837,7 @@ |
838 | 838 | var $mSort; |
839 | 839 | var $mCurrentRow; |
840 | 840 | |
841 | | - function __construct( IContextSource $context = null ) { |
| 841 | + public function __construct( IContextSource $context = null ) { |
842 | 842 | if ( $context ) { |
843 | 843 | $this->setContext( $context ); |
844 | 844 | } |
— | — | @@ -855,6 +855,10 @@ |
856 | 856 | parent::__construct(); |
857 | 857 | } |
858 | 858 | |
| 859 | + /** |
| 860 | + * @protected |
| 861 | + * @return string |
| 862 | + */ |
859 | 863 | function getStartBody() { |
860 | 864 | global $wgStylePath; |
861 | 865 | $tableClass = htmlspecialchars( $this->getTableClass() ); |
— | — | @@ -901,10 +905,18 @@ |
902 | 906 | return $s; |
903 | 907 | } |
904 | 908 | |
| 909 | + /** |
| 910 | + * @protected |
| 911 | + * @return string |
| 912 | + */ |
905 | 913 | function getEndBody() { |
906 | 914 | return "</tbody></table>\n"; |
907 | 915 | } |
908 | 916 | |
| 917 | + /** |
| 918 | + * @protected |
| 919 | + * @return string |
| 920 | + */ |
909 | 921 | function getEmptyBody() { |
910 | 922 | $colspan = count( $this->getFieldNames() ); |
911 | 923 | $msgEmpty = wfMsgHtml( 'table_pager_empty' ); |
— | — | @@ -912,6 +924,7 @@ |
913 | 925 | } |
914 | 926 | |
915 | 927 | /** |
| 928 | + * @protected |
916 | 929 | * @param $row Array |
917 | 930 | * @return String HTML |
918 | 931 | */ |
— | — | @@ -934,6 +947,8 @@ |
935 | 948 | /** |
936 | 949 | * Get a class name to be applied to the given row. |
937 | 950 | * |
| 951 | + * @protected |
| 952 | + * |
938 | 953 | * @param $row Object: the database result row |
939 | 954 | * @return String |
940 | 955 | */ |
— | — | @@ -944,6 +959,8 @@ |
945 | 960 | /** |
946 | 961 | * Get attributes to be applied to the given row. |
947 | 962 | * |
| 963 | + * @protected |
| 964 | + * |
948 | 965 | * @param $row Object: the database result row |
949 | 966 | * @return Array of <attr> => <value> |
950 | 967 | */ |
— | — | @@ -962,6 +979,8 @@ |
963 | 980 | * take this as an excuse to hardcode styles; use classes and |
964 | 981 | * CSS instead. Row context is available in $this->mCurrentRow |
965 | 982 | * |
| 983 | + * @protected |
| 984 | + * |
966 | 985 | * @param $field String The column |
967 | 986 | * @param $value String The cell contents |
968 | 987 | * @return Array of attr => value |
— | — | @@ -970,18 +989,34 @@ |
971 | 990 | return array( 'class' => 'TablePager_col_' . $field ); |
972 | 991 | } |
973 | 992 | |
| 993 | + /** |
| 994 | + * @protected |
| 995 | + * @return string |
| 996 | + */ |
974 | 997 | function getIndexField() { |
975 | 998 | return $this->mSort; |
976 | 999 | } |
977 | 1000 | |
| 1001 | + /** |
| 1002 | + * @protected |
| 1003 | + * @return string |
| 1004 | + */ |
978 | 1005 | function getTableClass() { |
979 | 1006 | return 'TablePager'; |
980 | 1007 | } |
981 | 1008 | |
| 1009 | + /** |
| 1010 | + * @protected |
| 1011 | + * @return string |
| 1012 | + */ |
982 | 1013 | function getNavClass() { |
983 | 1014 | return 'TablePager_nav'; |
984 | 1015 | } |
985 | 1016 | |
| 1017 | + /** |
| 1018 | + * @protected |
| 1019 | + * @return string |
| 1020 | + */ |
986 | 1021 | function getSortHeaderClass() { |
987 | 1022 | return 'TablePager_sort'; |
988 | 1023 | } |
— | — | @@ -990,7 +1025,7 @@ |
991 | 1026 | * A navigation bar with images |
992 | 1027 | * @return String HTML |
993 | 1028 | */ |
994 | | - function getNavigationBar() { |
| 1029 | + public function getNavigationBar() { |
995 | 1030 | global $wgStylePath; |
996 | 1031 | |
997 | 1032 | if ( !$this->isNavigationBarShown() ) { |
— | — | @@ -1046,7 +1081,7 @@ |
1047 | 1082 | * |
1048 | 1083 | * @return String: HTML fragment |
1049 | 1084 | */ |
1050 | | - function getLimitSelect() { |
| 1085 | + public function getLimitSelect() { |
1051 | 1086 | # Add the current limit from the query string |
1052 | 1087 | # to avoid that the limit is lost after clicking Go next time |
1053 | 1088 | if ( !in_array( $this->mLimit, $this->mLimitsShown ) ) { |
— | — | @@ -1139,13 +1174,19 @@ |
1140 | 1175 | * The current result row is available as $this->mCurrentRow, in case you |
1141 | 1176 | * need more context. |
1142 | 1177 | * |
| 1178 | + * @protected |
| 1179 | + * |
1143 | 1180 | * @param $name String: the database field name |
1144 | 1181 | * @param $value String: the value retrieved from the database |
1145 | 1182 | */ |
1146 | 1183 | abstract function formatValue( $name, $value ); |
1147 | 1184 | |
1148 | 1185 | /** |
1149 | | - * The database field name used as a default sort order |
| 1186 | + * The database field name used as a default sort order. |
| 1187 | + * |
| 1188 | + * @protected |
| 1189 | + * |
| 1190 | + * @return string |
1150 | 1191 | */ |
1151 | 1192 | abstract function getDefaultSort(); |
1152 | 1193 | |