Subversion-Projekte lars-tiefland.ci

Revision

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

Revision 2242 Revision 2254
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 - 2018, British Columbia Institute of Technology
9
 * Copyright (c) 2014 - 2017, 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 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
32
 * @copyright	Copyright (c) 2014 - 2017, 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 2.0
35
 * @since	Version 2.0
36
 * @filesource
36
 * @filesource
37
 */
37
 */
Zeile 196... Zeile 196...
196
	 * @param	int	$offset	Step/value to add
196
	 * @param	int	$offset	Step/value to add
197
	 * @return	mixed	New value on success or FALSE on failure
197
	 * @return	mixed	New value on success or FALSE on failure
198
	 */
198
	 */
199
	public function increment($id, $offset = 1)
199
	public function increment($id, $offset = 1)
200
	{
200
	{
201
		if (($result = $this->_memcached->increment($id, $offset)) === FALSE)
201
		return $this->_memcached->increment($id, $offset);
202
		{
-
 
203
			return $this->_memcached->add($id, $offset) ? $offset : FALSE;
-
 
204
		}
-
 
205
 
-
 
206
		return $result;
-
 
207
	}
202
	}
Zeile 208... Zeile 203...
208
 
203
 
Zeile 209... Zeile 204...
209
	// ------------------------------------------------------------------------
204
	// ------------------------------------------------------------------------
Zeile 215... Zeile 210...
215
	 * @param	int	$offset	Step/value to reduce by
210
	 * @param	int	$offset	Step/value to reduce by
216
	 * @return	mixed	New value on success or FALSE on failure
211
	 * @return	mixed	New value on success or FALSE on failure
217
	 */
212
	 */
218
	public function decrement($id, $offset = 1)
213
	public function decrement($id, $offset = 1)
219
	{
214
	{
220
		if (($result = $this->_memcached->decrement($id, $offset)) === FALSE)
215
		return $this->_memcached->decrement($id, $offset);
221
		{
-
 
222
			return $this->_memcached->add($id, 0) ? 0 : FALSE;
-
 
223
		}
-
 
224
 
-
 
225
		return $result;
-
 
226
	}
216
	}
Zeile 227... Zeile 217...
227
 
217
 
Zeile 228... Zeile 218...
228
	// ------------------------------------------------------------------------
218
	// ------------------------------------------------------------------------