Subversion-Projekte lars-tiefland.ci

Revision

Revision 2254 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2254 Revision 2257
Zeile 4... Zeile 4...
4
 *
4
 *
5
 * An open source application development framework for PHP
5
 * An open source application development framework for PHP
6
 *
6
 *
7
 * This content is released under the MIT License (MIT)
7
 * This content is released under the MIT License (MIT)
8
 *
8
 *
9
 * Copyright (c) 2014 - 2017, British Columbia Institute of Technology
9
 * Copyright (c) 2014 - 2018, British Columbia Institute of Technology
10
 *
10
 *
11
 * Permission is hereby granted, free of charge, to any person obtaining a copy
11
 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
 * of this software and associated documentation files (the "Software"), to deal
12
 * of this software and associated documentation files (the "Software"), to deal
13
 * in the Software without restriction, including without limitation the rights
13
 * in the Software without restriction, including without limitation the rights
14
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
Zeile 27... Zeile 27...
27
 * THE SOFTWARE.
27
 * THE SOFTWARE.
28
 *
28
 *
29
 * @package	CodeIgniter
29
 * @package	CodeIgniter
30
 * @author	EllisLab Dev Team
30
 * @author	EllisLab Dev Team
31
 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
31
 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
32
 * @copyright	Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
32
 * @copyright	Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
33
 * @license	http://opensource.org/licenses/MIT	MIT License
33
 * @license	http://opensource.org/licenses/MIT	MIT License
34
 * @link	https://codeigniter.com
34
 * @link	https://codeigniter.com
35
 * @since	Version 1.3.0
35
 * @since	Version 1.3.0
36
 * @filesource
36
 * @filesource
37
 */
37
 */
Zeile 128... Zeile 128...
128
	 *
128
	 *
129
	 * Extracts field type info from the bitflags returned by
129
	 * Extracts field type info from the bitflags returned by
130
	 * mysqli_result::fetch_fields()
130
	 * mysqli_result::fetch_fields()
131
	 *
131
	 *
132
	 * @used-by	CI_DB_mysqli_result::field_data()
132
	 * @used-by	CI_DB_mysqli_result::field_data()
133
	 * @param	int	$flags
133
	 * @param	int	$type
134
	 * @return	string
134
	 * @return	string
135
	 */
135
	 */
136
	private static function _get_field_type($flags)
136
	private static function _get_field_type($type)
137
	{
137
	{
138
		static $map;
138
		static $map;
139
		isset($map) OR $map = array(
139
		isset($map) OR $map = array(
140
			MYSQLI_TYPE_DECIMAL     => 'decimal',
140
			MYSQLI_TYPE_DECIMAL     => 'decimal',
141
			MYSQLI_TYPE_BIT         => 'bit',
141
			MYSQLI_TYPE_BIT         => 'bit',
Zeile 162... Zeile 162...
162
			MYSQLI_TYPE_STRING      => 'char',
162
			MYSQLI_TYPE_STRING      => 'char',
163
			MYSQLI_TYPE_VAR_STRING  => 'varchar',
163
			MYSQLI_TYPE_VAR_STRING  => 'varchar',
164
			MYSQLI_TYPE_GEOMETRY    => 'geometry'
164
			MYSQLI_TYPE_GEOMETRY    => 'geometry'
165
		);
165
		);
Zeile 166... Zeile 166...
166
 
166
 
167
		foreach ($map as $flag => $name)
-
 
168
		{
-
 
169
			if ($flags & $flag)
-
 
170
			{
-
 
171
				return $name;
-
 
172
			}
-
 
173
		}
-
 
174
 
-
 
175
		return $flags;
167
		return isset($map[$type]) ? $map[$type] : $type;
Zeile 176... Zeile 168...
176
	}
168
	}
Zeile 177... Zeile 169...
177
 
169