Index: trunk/extensions/EducationProgram/includes/EPStudent.php |
— | — | @@ -18,28 +18,6 @@ |
19 | 19 | * |
20 | 20 | * @since 0.1 |
21 | 21 | * |
22 | | - * @return string |
23 | | - */ |
24 | | - public static function getDBTable() { |
25 | | - return 'ep_students'; |
26 | | - } |
27 | | - |
28 | | - /** |
29 | | - * @see parent::getFieldTypes |
30 | | - * |
31 | | - * @since 0.1 |
32 | | - * |
33 | | - * @return string |
34 | | - */ |
35 | | - protected static function getFieldPrefix() { |
36 | | - return 'student_'; |
37 | | - } |
38 | | - |
39 | | - /** |
40 | | - * @see parent::getFieldTypes |
41 | | - * |
42 | | - * @since 0.1 |
43 | | - * |
44 | 22 | * @return array |
45 | 23 | */ |
46 | 24 | protected static function getFieldTypes() { |
Index: trunk/extensions/EducationProgram/includes/EPOrg.php |
— | — | @@ -18,28 +18,6 @@ |
19 | 19 | * |
20 | 20 | * @since 0.1 |
21 | 21 | * |
22 | | - * @return string |
23 | | - */ |
24 | | - public static function getDBTable() { |
25 | | - return 'ep_orgs'; |
26 | | - } |
27 | | - |
28 | | - /** |
29 | | - * @see parent::getFieldTypes |
30 | | - * |
31 | | - * @since 0.1 |
32 | | - * |
33 | | - * @return string |
34 | | - */ |
35 | | - protected static function getFieldPrefix() { |
36 | | - return 'org_'; |
37 | | - } |
38 | | - |
39 | | - /** |
40 | | - * @see parent::getFieldTypes |
41 | | - * |
42 | | - * @since 0.1 |
43 | | - * |
44 | 22 | * @return array |
45 | 23 | */ |
46 | 24 | protected static function getFieldTypes() { |
Index: trunk/extensions/EducationProgram/includes/EPTerm.php |
— | — | @@ -19,28 +19,6 @@ |
20 | 20 | * |
21 | 21 | * @since 0.1 |
22 | 22 | * |
23 | | - * @return string |
24 | | - */ |
25 | | - public static function getDBTable() { |
26 | | - return 'ep_terms'; |
27 | | - } |
28 | | - |
29 | | - /** |
30 | | - * @see parent::getFieldTypes |
31 | | - * |
32 | | - * @since 0.1 |
33 | | - * |
34 | | - * @return string |
35 | | - */ |
36 | | - protected static function getFieldPrefix() { |
37 | | - return 'term_'; |
38 | | - } |
39 | | - |
40 | | - /** |
41 | | - * @see parent::getFieldTypes |
42 | | - * |
43 | | - * @since 0.1 |
44 | | - * |
45 | 23 | * @return array |
46 | 24 | */ |
47 | 25 | protected static function getFieldTypes() { |
Index: trunk/extensions/EducationProgram/includes/EPDBObject.php |
— | — | @@ -48,11 +48,11 @@ |
49 | 49 | */ |
50 | 50 | public static function getDBTable() { |
51 | 51 | global $egEPDBObjects; |
52 | | - if ( array_key_exists( __CLASS__, $egEPDBObjects ) ) { |
53 | | - return $egEPDBObjects[__CLASS__]['table']; |
| 52 | + if ( array_key_exists( get_called_class(), $egEPDBObjects ) ) { |
| 53 | + return $egEPDBObjects[get_called_class()]['table']; |
54 | 54 | } |
55 | 55 | else { |
56 | | - throw new MWException( 'Class "' . __CLASS__ . '" not found in $egEPDBObjects' ); |
| 56 | + throw new MWException( 'Class "' . get_called_class() . '" not found in $egEPDBObjects' ); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
— | — | @@ -66,11 +66,11 @@ |
67 | 67 | */ |
68 | 68 | protected static function getFieldPrefix() { |
69 | 69 | global $egEPDBObjects; |
70 | | - if ( array_key_exists( __CLASS__, $egEPDBObjects ) ) { |
71 | | - return $egEPDBObjects[__CLASS__]['prefix']; |
| 70 | + if ( array_key_exists( get_called_class(), $egEPDBObjects ) ) { |
| 71 | + return $egEPDBObjects[get_called_class()]['prefix']; |
72 | 72 | } |
73 | 73 | else { |
74 | | - throw new MWException( 'Class "' . __CLASS__ . '" not found in $egEPDBObjects' ); |
| 74 | + throw new MWException( 'Class "' . get_called_class() . '" not found in $egEPDBObjects' ); |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
Index: trunk/extensions/EducationProgram/includes/EPCourse.php |
— | — | @@ -19,28 +19,6 @@ |
20 | 20 | * |
21 | 21 | * @since 0.1 |
22 | 22 | * |
23 | | - * @return string |
24 | | - */ |
25 | | - public static function getDBTable() { |
26 | | - return 'ep_courses'; |
27 | | - } |
28 | | - |
29 | | - /** |
30 | | - * @see parent::getFieldTypes |
31 | | - * |
32 | | - * @since 0.1 |
33 | | - * |
34 | | - * @return string |
35 | | - */ |
36 | | - protected static function getFieldPrefix() { |
37 | | - return 'course_'; |
38 | | - } |
39 | | - |
40 | | - /** |
41 | | - * @see parent::getFieldTypes |
42 | | - * |
43 | | - * @since 0.1 |
44 | | - * |
45 | 23 | * @return array |
46 | 24 | */ |
47 | 25 | protected static function getFieldTypes() { |
Index: trunk/extensions/EducationProgram/includes/EPMentor.php |
— | — | @@ -18,28 +18,6 @@ |
19 | 19 | * |
20 | 20 | * @since 0.1 |
21 | 21 | * |
22 | | - * @return string |
23 | | - */ |
24 | | - public static function getDBTable() { |
25 | | - return 'ep_mentors'; |
26 | | - } |
27 | | - |
28 | | - /** |
29 | | - * @see parent::getFieldTypes |
30 | | - * |
31 | | - * @since 0.1 |
32 | | - * |
33 | | - * @return string |
34 | | - */ |
35 | | - protected static function getFieldPrefix() { |
36 | | - return 'mentor_'; |
37 | | - } |
38 | | - |
39 | | - /** |
40 | | - * @see parent::getFieldTypes |
41 | | - * |
42 | | - * @since 0.1 |
43 | | - * |
44 | 22 | * @return array |
45 | 23 | */ |
46 | 24 | protected static function getFieldTypes() { |