diff options
Diffstat (limited to 'kohana/core')
-rw-r--r-- | kohana/core/Bootstrap.php | 4 | ||||
-rw-r--r-- | kohana/core/Kohana.php | 52 |
2 files changed, 29 insertions, 27 deletions
diff --git a/kohana/core/Bootstrap.php b/kohana/core/Bootstrap.php index 6b2aefaa..57db1648 100644 --- a/kohana/core/Bootstrap.php +++ b/kohana/core/Bootstrap.php @@ -10,8 +10,8 @@ * @license http://kohanaphp.com/license.html */ -define('KOHANA_VERSION', '2.2'); -define('KOHANA_CODENAME', 'efĂmera'); +define('KOHANA_VERSION', '2.3'); +define('KOHANA_CODENAME', 'accipiter'); // Test of Kohana is running in Windows define('KOHANA_IS_WIN', DIRECTORY_SEPARATOR === '\\'); diff --git a/kohana/core/Kohana.php b/kohana/core/Kohana.php index e6bfb3f1..c4812e63 100644 --- a/kohana/core/Kohana.php +++ b/kohana/core/Kohana.php @@ -975,37 +975,39 @@ final class Kohana { $file = $class; } - if (($filepath = self::find_file($type, $file)) === FALSE) + if ($filename = self::find_file($type, $file)) + { + // Load the class + require $filename; + } + else + { + // The class could not be found return FALSE; + } - // Load the file - require $filepath; - - if ($type === 'libraries' OR $type === 'helpers') + if ($filename = self::find_file($type, self::$configuration['core']['extension_prefix'].$class)) { - if ($extension = self::find_file($type, self::$configuration['core']['extension_prefix'].$class)) - { - // Load the extension - require $extension; - } - elseif ($suffix !== 'Core' AND class_exists($class.'_Core', FALSE)) - { - // Class extension to be evaluated - $extension = 'class '.$class.' extends '.$class.'_Core { }'; - - // Start class analysis - $core = new ReflectionClass($class.'_Core'); + // Load the class extension + require $filename; + } + elseif ($suffix !== 'Core' AND class_exists($class.'_Core', FALSE)) + { + // Class extension to be evaluated + $extension = 'class '.$class.' extends '.$class.'_Core { }'; - if ($core->isAbstract()) - { - // Make the extension abstract - $extension = 'abstract '.$extension; - } + // Start class analysis + $core = new ReflectionClass($class.'_Core'); - // Transparent class extensions are handled using eval. This is - // a disgusting hack, but it gets the job done. - eval($extension); + if ($core->isAbstract()) + { + // Make the extension abstract + $extension = 'abstract '.$extension; } + + // Transparent class extensions are handled using eval. This is + // a disgusting hack, but it gets the job done. + eval($extension); } return TRUE; |