1 | <?php |
||
6 | class Peachy { |
||
7 | |||
8 | /** |
||
9 | * Initializes Peachy, logs in with a either configuration file or a given username and password |
||
10 | * |
||
11 | * @static |
||
12 | * @access public |
||
13 | * |
||
14 | * @param string $config_name Name of the config file stored in the Configs directory, minus the .cfg extension. Default null |
||
15 | * @param string $pgUsername Username to log in if no config file specified. Default null |
||
16 | * @param string $password Password to log in with if no config file specified. Default null |
||
17 | * @param string $base_url URL to api.php if no config file specified. Defaults to English Wikipedia's API. |
||
18 | * @param string $classname |
||
19 | * |
||
20 | * @throws LoginError |
||
21 | * @return Wiki Instance of the Wiki class, where most functions are stored |
||
22 | */ |
||
23 | public static function newWiki( $config_name = null, $pgUsername = null, $password = null, $base_url = 'http://en.wikipedia.org/w/api.php', $classname = 'Wiki' ) { |
||
61 | |||
62 | /** |
||
63 | * Performs various checks and settings |
||
64 | * Checks if MW version is at least {@link MINMW} |
||
65 | * |
||
66 | * @static |
||
67 | * @access public |
||
68 | * @param string $base_url URL to api.php |
||
69 | * @throws DependencyError |
||
70 | * @return array Installed extensions |
||
71 | */ |
||
72 | public static function wikiChecks( $base_url ) { |
||
111 | |||
112 | /** |
||
113 | * Loads a specific plugin into memory |
||
114 | * |
||
115 | * @static |
||
116 | * @access public |
||
117 | * @param string|array $plugins Name of plugin(s) to load from Plugins directory, minus .php ending |
||
118 | * @return void |
||
119 | * @deprecated since 18 June 2013 |
||
120 | */ |
||
121 | public static function loadPlugin( $plugins ) { |
||
124 | |||
125 | /** |
||
126 | * Loads all available plugins |
||
127 | * |
||
128 | * @static |
||
129 | * @access public |
||
130 | * @return void |
||
131 | * @deprecated since 18 June 2013 |
||
132 | */ |
||
133 | public static function loadAllPlugins() { |
||
137 | |||
138 | /** |
||
139 | * Checks for config files, parses them. |
||
140 | * |
||
141 | * @access private |
||
142 | * @static |
||
143 | * @param string $config_name Name of config file |
||
144 | * @throws BadEntryError |
||
145 | * @return array Config params |
||
146 | */ |
||
147 | private static function parse_config( $config_name ) { |
||
165 | |||
166 | /** |
||
167 | * @param null|string $method |
||
168 | * @param null|string $newfunction |
||
169 | * @param string $message |
||
170 | */ |
||
171 | public static function deprecatedWarn( $method, $newfunction, $message = null ) { |
||
180 | |||
181 | public static function getSvnInfo() { |
||
215 | } |
||
216 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: