Add email recipient username as a parameter to emailuser confirmation
[lhc/web/wiklou.git] / includes / Init.php
1 <?php
2 /**
3 * Some functions that are useful during startup.
4 *
5 * This class previously contained some functionality related to a PHP compiler
6 * called hphpc. That compiler has now been discontinued.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * http://www.gnu.org/copyleft/gpl.html
22 *
23 * @file
24 */
25
26 /**
27 * Some functions that are useful during startup.
28 *
29 * This class previously contained some functionality related to a PHP compiler
30 * called hphpc. That compiler has now been discontinued. All methods are now
31 * deprecated.
32 */
33 class MWInit {
34 static $compilerVersion;
35
36 /**
37 * @deprecated since 1.22
38 */
39 static function getCompilerVersion() {
40 return false;
41 }
42
43 /**
44 * Returns true if we are running under HipHop, whether in compiled or
45 * interpreted mode.
46 *
47 * @deprecated since 1.22
48 * @return bool
49 */
50 static function isHipHop() {
51 return defined( 'HPHP_VERSION' );
52 }
53
54 /**
55 * Get a fully-qualified path for a source file relative to $IP.
56 * @deprecated since 1.22
57 *
58 * @param $file string
59 *
60 * @return string
61 */
62 static function interpretedPath( $file ) {
63 global $IP;
64 return "$IP/$file";
65 }
66
67 /**
68 * @deprecated since 1.22
69 * @param $file string
70 * @return string
71 */
72 static function compiledPath( $file ) {
73 global $IP;
74 return "$IP/$file";
75 }
76
77 /**
78 * @deprecated since 1.22
79 * @param $file string
80 * @return string
81 */
82 static function extCompiledPath( $file ) {
83 return false;
84 }
85
86 /**
87 * Deprecated wrapper for class_exists()
88 * @deprecated since 1.22
89 *
90 * @param $class string
91 *
92 * @return bool
93 */
94 static function classExists( $class ) {
95 return class_exists( $class );
96 }
97
98 /**
99 * Deprecated wrapper for method_exists()
100 * @deprecated since 1.22
101 *
102 * @param $class string
103 * @param $method string
104 *
105 * @return bool
106 */
107 static function methodExists( $class, $method ) {
108 return method_exists( $class, $method );
109 }
110
111 /**
112 * Deprecated wrapper for function_exists()
113 * @deprecated since 1.22
114 *
115 * @param $function string
116 *
117 * @return bool
118 */
119 static function functionExists( $function ) {
120 return function_exists( $function );
121 }
122
123 /**
124 * Deprecated wrapper for call_user_func_array()
125 * @deprecated since 1.22
126 *
127 * @param $className string
128 * @param $methodName string
129 * @param $args array
130 *
131 * @return mixed
132 */
133 static function callStaticMethod( $className, $methodName, $args ) {
134 return call_user_func_array( array( $className, $methodName ), $args );
135 }
136 }