PageRenderTime 86ms CodeModel.GetById 30ms app.highlight 39ms RepoModel.GetById 12ms app.codeStats 0ms

/php-bartlett-PHP-CompatInfo-2.5.0/PHP_CompatInfo-2.5.0/PHP/CompatInfo/Reference/mysqli.php

#
PHP | 438 lines | 340 code | 14 blank | 84 comment | 32 complexity | d41142b6c525d6b4d6fc9d9e6ce64664 MD5 | raw file
  1<?php
  2/**
  3 * Version informations about mysqli extension
  4 *
  5 * PHP version 5
  6 *
  7 * @category PHP
  8 * @package  PHP_CompatInfo
  9 * @author   Laurent Laville <pear@laurent-laville.org>
 10 * @license  http://www.opensource.org/licenses/bsd-license.php  BSD License
 11 * @version  SVN: $Id$
 12 * @link     http://php5.laurent-laville.org/compatinfo/
 13 */
 14
 15/**
 16 * All interfaces, classes, functions, constants about mysqli extension
 17 *
 18 * @category PHP
 19 * @package  PHP_CompatInfo
 20 * @author   Laurent Laville <pear@laurent-laville.org>
 21 * @license  http://www.opensource.org/licenses/bsd-license.php  BSD License
 22 * @version  Release: 2.5.0
 23 * @link     http://php5.laurent-laville.org/compatinfo/
 24 * @link     http://www.php.net/manual/en/book.mysqli.php
 25 */
 26class PHP_CompatInfo_Reference_Mysqli implements PHP_CompatInfo_Reference
 27{
 28    /**
 29     * Gets all informations at once about:
 30     * extensions, interfaces, classes, functions, constants
 31     *
 32     * @param string $extension OPTIONAL
 33     * @param string $version   OPTIONAL PHP version
 34     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
 35     *
 36     * @return array
 37     */
 38    public function getAll($extension = null, $version = null)
 39    {
 40        $references = array(
 41            'extensions' => $this->getExtensions($extension, $version),
 42            'interfaces' => $this->getInterfaces($extension, $version),
 43            'classes'    => $this->getClasses($extension, $version),
 44            'functions'  => $this->getFunctions($extension, $version),
 45            'constants'  => $this->getConstants($extension, $version),
 46        );
 47        return $references;
 48    }
 49
 50    /**
 51     * Gets informations about extensions
 52     *
 53     * @param string $extension OPTIONAL
 54     * @param string $version   OPTIONAL PHP version
 55     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
 56     *
 57     * @return array
 58     */
 59    public function getExtensions($extension = null, $version = null)
 60    {
 61        $extensions = array(
 62            'mysqli' => array('5.0.0', '', '0.1')
 63        );
 64        return $extensions;
 65    }
 66
 67    /**
 68     * Gets informations about interfaces
 69     *
 70     * @param string $extension OPTIONAL
 71     * @param string $version   OPTIONAL PHP version
 72     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
 73     *
 74     * @return array
 75     */
 76    public function getInterfaces($extension = null, $version = null)
 77    {
 78        $interfaces = array();
 79
 80        if ((null == $version ) || ('4' == $version)) {
 81            $version4 = array(
 82            );
 83            $interfaces = array_merge(
 84                $interfaces,
 85                $version4
 86            );
 87        }
 88        if ((null == $version ) || ('5' == $version)) {
 89            $version5 = array(
 90            );
 91            $interfaces = array_merge(
 92                $interfaces,
 93                $version5
 94            );
 95        }
 96        return $interfaces;
 97    }
 98
 99    /**
100     * Gets informations about classes
101     *
102     * @param string $extension OPTIONAL
103     * @param string $version   OPTIONAL PHP version
104     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
105     *
106     * @return array
107     * @link   http://www.php.net/manual/en/class.mysqli.php
108     * @link   http://www.php.net/manual/en/class.mysqli-stmt.php
109     * @link   http://www.php.net/manual/en/class.mysqli-result.php
110     * @link   http://www.php.net/manual/en/class.mysqli-driver.php
111     * @link   http://www.php.net/manual/en/class.mysqli-warning.php
112     */
113    public function getClasses($extension = null, $version = null)
114    {
115        $classes = array();
116
117        if ((null == $version ) || ('4' == $version)) {
118            $version4 = array(
119            );
120            $classes = array_merge(
121                $classes,
122                $version4
123            );
124        }
125        if ((null == $version ) || ('5' == $version)) {
126            $version5 = array(
127                'mysqli_sql_exception'           => array('5.0.0', ''),
128                'mysqli_driver'                  => array('5.0.0', ''),
129                'mysqli'                         => array('5.0.0', ''),
130                'mysqli_warning'                 => array('5.0.0', ''),
131                'mysqli_result'                  => array('5.0.0', ''),
132                'mysqli_stmt'                    => array('5.0.0', ''),
133            );
134            $classes = array_merge(
135                $classes,
136                $version5
137            );
138        }
139
140        return $classes;
141    }
142
143    /**
144     * Gets informations about functions
145     *
146     * @param string $extension OPTIONAL
147     * @param string $version   OPTIONAL PHP version
148     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
149     *
150     * @return array
151     */
152    public function getFunctions($extension = null, $version = null)
153    {
154        $functions = array();
155
156        if ((null == $version ) || ('4' == $version)) {
157            $version4 = array(
158            );
159            $functions = array_merge(
160                $functions,
161                $version4
162            );
163        }
164        if ((null == $version ) || ('5' == $version)) {
165            $version5 = array(
166                'mysqli_affected_rows'           => array('5.0.0', ''),
167                'mysqli_autocommit'              => array('5.0.0', ''),
168                'mysqli_bind_param'              => array('5.0.0', '5.3.14'),
169                'mysqli_bind_result'             => array('5.0.0', '5.3.14'),
170                'mysqli_change_user'             => array('5.0.0', ''),
171                'mysqli_character_set_name'      => array('5.0.0', ''),
172                'mysqli_client_encoding'         => array('5.0.0', '5.3.14'),
173                'mysqli_close'                   => array('5.0.0', ''),
174                'mysqli_commit'                  => array('5.0.0', ''),
175                'mysqli_connect'                 => array('5.0.0', ''),
176                'mysqli_connect_errno'           => array('5.0.0', ''),
177                'mysqli_connect_error'           => array('5.0.0', ''),
178                'mysqli_data_seek'               => array('5.0.0', ''),
179                'mysqli_debug'                   => array('5.0.0', ''),
180                'mysqli_disable_reads_from_master'
181                                                 => array('5.0.0', '5.2.17'),
182                'mysqli_disable_rpl_parse'       => array('5.0.0', '5.2.17'),
183                'mysqli_dump_debug_info'         => array('5.0.0', ''),
184                'mysqli_embedded_server_end'     => array('5.0.0', ''),
185                'mysqli_embedded_server_start'   => array('5.0.0', ''),
186                'mysqli_enable_reads_from_master'=> array('5.0.0', '5.2.17'),
187                'mysqli_enable_rpl_parse'        => array('5.0.0', '5.2.17'),
188                'mysqli_errno'                   => array('5.0.0', ''),
189                'mysqli_error'                   => array('5.0.0', ''),
190                'mysqli_error_list'              => array('5.4.0', ''),
191                'mysqli_escape_string'           => array('5.0.0', ''),
192                'mysqli_execute'                 => array('5.0.0', ''),
193                'mysqli_fetch'                   => array('5.0.0', '5.3.14'),
194                'mysqli_fetch_all'               => array('5.0.0', ''),
195                'mysqli_fetch_array'             => array('5.0.0', ''),
196                'mysqli_fetch_assoc'             => array('5.0.0', ''),
197                'mysqli_fetch_field'             => array('5.0.0', ''),
198                'mysqli_fetch_field_direct'      => array('5.0.0', ''),
199                'mysqli_fetch_fields'            => array('5.0.0', ''),
200                'mysqli_fetch_lengths'           => array('5.0.0', ''),
201                'mysqli_fetch_object'            => array('5.0.0', ''),
202                'mysqli_fetch_row'               => array('5.0.0', ''),
203                'mysqli_field_count'             => array('5.0.0', ''),
204                'mysqli_field_seek'              => array('5.0.0', ''),
205                'mysqli_field_tell'              => array('5.0.0', ''),
206                'mysqli_free_result'             => array('5.0.0', ''),
207                'mysqli_get_cache_stats'         => array('5.0.0', ''),
208                'mysqli_get_charset'             => array('5.0.0', ''),
209                'mysqli_get_client_info'         => array('5.0.0', ''),
210                'mysqli_get_client_stats'        => array('5.0.0', ''),
211                'mysqli_get_client_version'      => array('5.0.0', ''),
212                'mysqli_get_connection_stats'    => array('5.0.0', ''),
213                'mysqli_get_host_info'           => array('5.0.0', ''),
214                'mysqli_get_metadata'            => array('5.0.0', '5.3.14'),
215                'mysqli_get_proto_info'          => array('5.0.0', ''),
216                'mysqli_get_server_info'         => array('5.0.0', ''),
217                'mysqli_get_server_version'      => array('5.0.0', ''),
218                'mysqli_get_warnings'            => array('5.0.0', ''),
219                'mysqli_info'                    => array('5.0.0', ''),
220                'mysqli_init'                    => array('5.0.0', ''),
221                'mysqli_insert_id'               => array('5.0.0', ''),
222                'mysqli_kill'                    => array('5.0.0', ''),
223                'mysqli_master_query'            => array('5.0.0', '5.2.17'),
224                'mysqli_more_results'            => array('5.0.0', ''),
225                'mysqli_multi_query'             => array('5.0.0', ''),
226                'mysqli_next_result'             => array('5.0.0', ''),
227                'mysqli_num_fields'              => array('5.0.0', ''),
228                'mysqli_num_rows'                => array('5.0.0', ''),
229                'mysqli_options'                 => array('5.0.0', ''),
230                'mysqli_param_count'             => array('5.0.0', '5.3.14'),
231                'mysqli_ping'                    => array('5.0.0', ''),
232                'mysqli_poll'                    => array('5.0.0', ''),
233                'mysqli_prepare'                 => array('5.0.0', ''),
234                'mysqli_query'                   => array('5.0.0', ''),
235                'mysqli_real_connect'            => array('5.0.0', ''),
236                'mysqli_real_escape_string'      => array('5.0.0', ''),
237                'mysqli_real_query'              => array('5.0.0', ''),
238                'mysqli_reap_async_query'        => array('5.0.0', ''),
239                'mysqli_refresh'                 => array('5.3.0', ''),
240                'mysqli_report'                  => array('5.0.0', ''),
241                'mysqli_rollback'                => array('5.0.0', ''),
242                'mysqli_rpl_parse_enabled'       => array('5.0.0', '5.2.17'),
243                'mysqli_rpl_probe'               => array('5.0.0', '5.2.17'),
244                'mysqli_rpl_query_type'          => array('5.0.0', '5.2.17'),
245                'mysqli_select_db'               => array('5.0.0', ''),
246                'mysqli_send_long_data'          => array('5.0.0', '5.3.14'),
247                'mysqli_send_query'              => array('5.0.0', '5.2.17'),
248                'mysqli_set_charset'             => array('5.0.0', ''),
249                'mysqli_set_local_infile_default'=> array('5.0.0', ''),
250                'mysqli_set_local_infile_handler'=> array('5.0.0', ''),
251                'mysqli_set_opt'                 => array('5.0.0', ''),
252                'mysqli_slave_query'             => array('5.0.0', '5.2.17'),
253                'mysqli_sqlstate'                => array('5.0.0', ''),
254                'mysqli_ssl_set'                 => array('5.0.0', ''),
255                'mysqli_stat'                    => array('5.0.0', ''),
256                'mysqli_stmt_affected_rows'      => array('5.0.0', ''),
257                'mysqli_stmt_attr_get'           => array('5.0.0', ''),
258                'mysqli_stmt_attr_set'           => array('5.0.0', ''),
259                'mysqli_stmt_bind_param'         => array('5.0.0', ''),
260                'mysqli_stmt_bind_result'        => array('5.0.0', ''),
261                'mysqli_stmt_close'              => array('5.0.0', ''),
262                'mysqli_stmt_data_seek'          => array('5.0.0', ''),
263                'mysqli_stmt_errno'              => array('5.0.0', ''),
264                'mysqli_stmt_error'              => array('5.0.0', ''),
265                'mysqli_stmt_error_list'         => array('5.4.0', ''),
266                'mysqli_stmt_execute'            => array('5.0.0', ''),
267                'mysqli_stmt_fetch'              => array('5.0.0', ''),
268                'mysqli_stmt_field_count'        => array('5.0.0', ''),
269                'mysqli_stmt_free_result'        => array('5.0.0', ''),
270                'mysqli_stmt_get_result'         => array('5.0.0', ''),
271                'mysqli_stmt_get_warnings'       => array('5.0.0', ''),
272                'mysqli_stmt_init'               => array('5.0.0', ''),
273                'mysqli_stmt_insert_id'          => array('5.0.0', ''),
274                'mysqli_stmt_more_results'       => array('5.0.0', ''),
275                'mysqli_stmt_next_result'        => array('5.0.0', ''),
276                'mysqli_stmt_num_rows'           => array('5.0.0', ''),
277                'mysqli_stmt_param_count'        => array('5.0.0', ''),
278                'mysqli_stmt_prepare'            => array('5.0.0', ''),
279                'mysqli_stmt_reset'              => array('5.0.0', ''),
280                'mysqli_stmt_result_metadata'    => array('5.0.0', ''),
281                'mysqli_stmt_send_long_data'     => array('5.0.0', ''),
282                'mysqli_stmt_sqlstate'           => array('5.0.0', ''),
283                'mysqli_stmt_store_result'       => array('5.0.0', ''),
284                'mysqli_store_result'            => array('5.0.0', ''),
285                'mysqli_thread_id'               => array('5.0.0', ''),
286                'mysqli_thread_safe'             => array('5.0.0', ''),
287                'mysqli_use_result'              => array('5.0.0', ''),
288                'mysqli_warning_count'           => array('5.0.0', ''),
289            );
290            $functions = array_merge(
291                $functions,
292                $version5
293            );
294        }
295        return $functions;
296    }
297
298    /**
299     * Gets informations about constants
300     *
301     * @param string $extension OPTIONAL
302     * @param string $version   OPTIONAL PHP version
303     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
304     *
305     * @return array
306     * @link   http://www.php.net/manual/en/mysqli.constants.php
307     */
308    public function getConstants($extension = null, $version = null)
309    {
310        $constants = array();
311
312        if ((null == $version ) || ('4' == $version)) {
313            $version4 = array(
314            );
315            $constants = array_merge(
316                $constants,
317                $version4
318            );
319        }
320        if ((null == $version ) || ('5' == $version)) {
321            $version5 = array(
322                'MYSQLI_READ_DEFAULT_GROUP'      => array('5.0.0', ''),
323                'MYSQLI_READ_DEFAULT_FILE'       => array('5.0.0', ''),
324                'MYSQLI_OPT_CONNECT_TIMEOUT'     => array('5.0.0', ''),
325                'MYSQLI_OPT_LOCAL_INFILE'        => array('5.0.0', ''),
326                'MYSQLI_INIT_COMMAND'            => array('5.0.0', ''),
327                'MYSQLI_OPT_NET_CMD_BUFFER_SIZE' => array('5.3.0', ''),
328                'MYSQLI_OPT_NET_READ_BUFFER_SIZE'
329                                                 => array('5.3.0', ''),
330                'MYSQLI_OPT_INT_AND_FLOAT_NATIVE'
331                                                 => array('5.3.0', ''),
332                'MYSQLI_CLIENT_SSL'              => array('5.0.0', ''),
333                'MYSQLI_CLIENT_COMPRESS'         => array('5.0.0', ''),
334                'MYSQLI_CLIENT_INTERACTIVE'      => array('5.0.0', ''),
335                'MYSQLI_CLIENT_IGNORE_SPACE'     => array('5.0.0', ''),
336                'MYSQLI_CLIENT_NO_SCHEMA'        => array('5.0.0', ''),
337                'MYSQLI_CLIENT_FOUND_ROWS'       => array('5.0.0', ''),
338                'MYSQLI_STORE_RESULT'            => array('5.0.0', ''),
339                'MYSQLI_USE_RESULT'              => array('5.0.0', ''),
340                'MYSQLI_ASYNC'                   => array('5.3.0', ''),
341                'MYSQLI_ASSOC'                   => array('5.0.0', ''),
342                'MYSQLI_NUM'                     => array('5.0.0', ''),
343                'MYSQLI_BOTH'                    => array('5.0.0', ''),
344                'MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH'
345                                                 => array('5.0.0', ''),
346                'MYSQLI_STMT_ATTR_CURSOR_TYPE'   => array('5.0.0', ''),
347                'MYSQLI_CURSOR_TYPE_NO_CURSOR'   => array('5.0.0', ''),
348                'MYSQLI_CURSOR_TYPE_READ_ONLY'   => array('5.0.0', ''),
349                'MYSQLI_CURSOR_TYPE_FOR_UPDATE'  => array('5.0.0', ''),
350                'MYSQLI_CURSOR_TYPE_SCROLLABLE'  => array('5.0.0', ''),
351                'MYSQLI_STMT_ATTR_PREFETCH_ROWS' => array('5.0.0', ''),
352                'MYSQLI_NOT_NULL_FLAG'           => array('5.0.0', ''),
353                'MYSQLI_PRI_KEY_FLAG'            => array('5.0.0', ''),
354                'MYSQLI_UNIQUE_KEY_FLAG'         => array('5.0.0', ''),
355                'MYSQLI_MULTIPLE_KEY_FLAG'       => array('5.0.0', ''),
356                'MYSQLI_BLOB_FLAG'               => array('5.0.0', ''),
357                'MYSQLI_UNSIGNED_FLAG'           => array('5.0.0', ''),
358                'MYSQLI_ZEROFILL_FLAG'           => array('5.0.0', ''),
359                'MYSQLI_AUTO_INCREMENT_FLAG'     => array('5.0.0', ''),
360                'MYSQLI_TIMESTAMP_FLAG'          => array('5.0.0', ''),
361                'MYSQLI_SET_FLAG'                => array('5.0.0', ''),
362                'MYSQLI_NUM_FLAG'                => array('5.0.0', ''),
363                'MYSQLI_PART_KEY_FLAG'           => array('5.0.0', ''),
364                'MYSQLI_GROUP_FLAG'              => array('5.0.0', ''),
365                'MYSQLI_BINARY_FLAG'             => array('5.3.0', ''),
366                'MYSQLI_NO_DEFAULT_VALUE_FLAG'   => array('5.3.0', ''),
367                'MYSQLI_ON_UPDATE_NOW_FLAG'      => array('5.3.0', ''),
368                'MYSQLI_TYPE_DECIMAL'            => array('5.0.0', ''),
369                'MYSQLI_TYPE_TINY'               => array('5.0.0', ''),
370                'MYSQLI_TYPE_SHORT'              => array('5.0.0', ''),
371                'MYSQLI_TYPE_LONG'               => array('5.0.0', ''),
372                'MYSQLI_TYPE_FLOAT'              => array('5.0.0', ''),
373                'MYSQLI_TYPE_DOUBLE'             => array('5.0.0', ''),
374                'MYSQLI_TYPE_NULL'               => array('5.0.0', ''),
375                'MYSQLI_TYPE_TIMESTAMP'          => array('5.0.0', ''),
376                'MYSQLI_TYPE_LONGLONG'           => array('5.0.0', ''),
377                'MYSQLI_TYPE_INT24'              => array('5.0.0', ''),
378                'MYSQLI_TYPE_DATE'               => array('5.0.0', ''),
379                'MYSQLI_TYPE_TIME'               => array('5.0.0', ''),
380                'MYSQLI_TYPE_DATETIME'           => array('5.0.0', ''),
381                'MYSQLI_TYPE_YEAR'               => array('5.0.0', ''),
382                'MYSQLI_TYPE_NEWDATE'            => array('5.0.0', ''),
383                'MYSQLI_TYPE_ENUM'               => array('5.0.0', ''),
384                'MYSQLI_TYPE_SET'                => array('5.0.0', ''),
385                'MYSQLI_TYPE_TINY_BLOB'          => array('5.0.0', ''),
386                'MYSQLI_TYPE_MEDIUM_BLOB'        => array('5.0.0', ''),
387                'MYSQLI_TYPE_LONG_BLOB'          => array('5.0.0', ''),
388                'MYSQLI_TYPE_BLOB'               => array('5.0.0', ''),
389                'MYSQLI_TYPE_VAR_STRING'         => array('5.0.0', ''),
390                'MYSQLI_TYPE_STRING'             => array('5.0.0', ''),
391                'MYSQLI_TYPE_CHAR'               => array('5.0.0', ''),
392                'MYSQLI_TYPE_INTERVAL'           => array('5.0.0', ''),
393                'MYSQLI_TYPE_GEOMETRY'           => array('5.0.0', ''),
394                'MYSQLI_TYPE_NEWDECIMAL'         => array('5.0.0', ''),
395                'MYSQLI_TYPE_BIT'                => array('5.0.0', ''),
396                'MYSQLI_SET_CHARSET_NAME'        => array('5.2.5', ''),
397                'MYSQLI_NO_DATA'                 => array('5.0.0', ''),
398                'MYSQLI_REPORT_INDEX'            => array('5.0.0', ''),
399                'MYSQLI_REPORT_ERROR'            => array('5.0.0', ''),
400                'MYSQLI_REPORT_STRICT'           => array('5.0.0', ''),
401                'MYSQLI_REPORT_ALL'              => array('5.0.0', ''),
402                'MYSQLI_REPORT_OFF'              => array('5.0.0', ''),
403                'MYSQLI_DEBUG_TRACE_ENABLED'     => array('5.3.0', ''),
404                'MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED'
405                                                 => array('5.3.0', ''),
406                'MYSQLI_SERVER_QUERY_NO_INDEX_USED'
407                                                 => array('5.3.0', ''),
408                'MYSQLI_SERVER_QUERY_WAS_SLOW'   => array('5.3.0', ''),
409                'MYSQLI_REFRESH_GRANT'           => array('5.3.0', ''),
410                'MYSQLI_REFRESH_LOG'             => array('5.3.0', ''),
411                'MYSQLI_REFRESH_TABLES'          => array('5.3.0', ''),
412                'MYSQLI_REFRESH_HOSTS'           => array('5.3.0', ''),
413                'MYSQLI_REFRESH_STATUS'          => array('5.3.0', ''),
414                'MYSQLI_REFRESH_THREADS'         => array('5.3.0', ''),
415                'MYSQLI_REFRESH_SLAVE'           => array('5.3.0', ''),
416                'MYSQLI_REFRESH_MASTER'          => array('5.3.0', ''),
417                'MYSQLI_REFRESH_BACKUP_LOG'      => array('5.3.0', ''),
418                'MYSQLI_DATA_TRUNCATED'          => array('5.1.0', ''),
419                'MYSQLI_ENUM_FLAG'               => array('5.3.0', ''),
420                'MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'
421                                                 => array('5.3.4', ''),
422                'MYSQLI_SET_CHARSET_DIR'         => array('5.3.4', ''),
423                'MYSQLI_SERVER_PS_OUT_PARAMS'    => array('5.3.4', ''),
424
425                'MYSQLI_RPL_MASTER'              => array('5.0.0', '5.2.17'),
426                'MYSQLI_RPL_SLAVE'               => array('5.0.0', '5.2.17'),
427                'MYSQLI_RPL_ADMIN'               => array('5.0.0', '5.2.17'),
428            );
429            $constants = array_merge(
430                $constants,
431                $version5
432            );
433        }
434
435        return $constants;
436    }
437
438}