Subversion-Projekte lars-tiefland.ci

Revision

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

Revision 68 Revision 1257
Zeile 53... Zeile 53...
53
 * CodeIgniter Version
53
 * CodeIgniter Version
54
 *
54
 *
55
 * @var	string
55
 * @var	string
56
 *
56
 *
57
 */
57
 */
58
	define('CI_VERSION', '3.1.0');
58
	const CI_VERSION = '3.1.2';
Zeile 59... Zeile 59...
59
 
59
 
60
/*
60
/*
61
 * ------------------------------------------------------
61
 * ------------------------------------------------------
62
 *  Load the framework constants
62
 *  Load the framework constants
Zeile 414... Zeile 414...
414
		elseif (method_exists($class, '_remap'))
414
		elseif (method_exists($class, '_remap'))
415
		{
415
		{
416
			$params = array($method, array_slice($URI->rsegments, 2));
416
			$params = array($method, array_slice($URI->rsegments, 2));
417
			$method = '_remap';
417
			$method = '_remap';
418
		}
418
		}
419
		// WARNING: It appears that there are issues with is_callable() even in PHP 5.2!
-
 
420
		// Furthermore, there are bug reports and feature/change requests related to it
-
 
421
		// that make it unreliable to use in this context. Please, DO NOT change this
-
 
422
		// work-around until a better alternative is available.
-
 
423
		elseif ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($class)), TRUE))
419
		elseif ( ! method_exists($class, $method))
424
		{
420
		{
425
			$e404 = TRUE;
421
			$e404 = TRUE;
426
		}
422
		}
-
 
423
		/**
-
 
424
		 * DO NOT CHANGE THIS, NOTHING ELSE WORKS!
-
 
425
		 *
-
 
426
		 * - method_exists() returns true for non-public methods, which passes the previous elseif
-
 
427
		 * - is_callable() returns false for PHP 4-style constructors, even if there's a __construct()
-
 
428
		 * - method_exists($class, '__construct') won't work because CI_Controller::__construct() is inherited
-
 
429
		 * - People will only complain if this doesn't work, even though it is documented that it shouldn't.
-
 
430
		 *
-
 
431
		 * ReflectionMethod::isConstructor() is the ONLY reliable check,
-
 
432
		 * knowing which method will be executed as a constructor.
-
 
433
		 */
-
 
434
		elseif ( ! is_callable(array($class, $method)) && strcasecmp($class, $method) === 0)
-
 
435
		{
-
 
436
			$reflection = new ReflectionMethod($class, $method);
-
 
437
			if ( ! $reflection->isPublic() OR $reflection->isConstructor())
-
 
438
			{
-
 
439
				$e404 = TRUE;
-
 
440
			}
-
 
441
		}
427
	}
442
	}
Zeile 428... Zeile 443...
428
 
443
 
429
	if ($e404)
444
	if ($e404)
430
	{
445
	{