Permalink
Browse files

MINOR Documentation (from r104996)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112423 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 0a261fd commit a66c1590ba66ea63ddaa91fcb787ad91617e7317 @chillu chillu committed Oct 15, 2010
Showing with 9 additions and 1 deletion.
  1. +7 −1 core/Core.php
  2. +2 −0 core/ManifestBuilder.php
View
@@ -290,6 +290,9 @@ function getTempFolder($base = null) {
* classes. Classes will be loaded from any PHP file within the application.
* If your class contains an underscore, for example, Page_Controller, then the filename is
* expected to be the stuff before the underscore. In this case, Page.php.
+ *
+ * Class names are converted to lowercase for lookup to adhere to PHP's case-insensitive
+ * way of dealing with them.
*/
function __autoload($className) {
global $_CLASS_MANIFEST;
@@ -299,7 +302,10 @@ function __autoload($className) {
}
/**
- * Return the file where that class is stored
+ * Return the file where that class is stored.
+ *
+ * @param String $className Case-insensitive lookup.
+ * @return String
*/
function getClassFile($className) {
global $_CLASS_MANIFEST;
View
@@ -380,6 +380,8 @@ private static function allClasses($classManifest) {
foreach(self::$classArray as $class => $info) {
$allClasses['exists'][$class] = $class;
+ // Class names are converted to lowercase for lookup to adhere to PHP's case-insensitive
+ // way of dealing with them.
$allClasses['file'][strtolower($class)] = $info['file'];
}

0 comments on commit a66c159

Please sign in to comment.