Given the following snippet:
namespace my_ns; // create class loader $loader = new \phalcon\Loader(); // register a namespaces $loader->registerNamespaces( array('my_ns' => __DIR__.'/my_ns/') ); // register class loader $loader->register(); $obj = new Object();
everything works as expected (Object.php exists in the specified directory).
But once I say in another file/namespace:
$obj = new \My_ns\Object();
namespace my_NS; $obj = new Object();
the code breaks:
Fatal error: Class '...\Object' not found in ...
Do I miss something to parameterize the class loader to ignore cases and conform with PHP rules (different cases in namespace/class identifiers are to be ignored)? Or how should this be handled?
It would be very easy for the class loader to ignore differently cased namespaces (convert to lower case). As it obviously is not implemented this way, why not? What is the intention?
edit: This question is not about different casing on different file systems. The question is about the registered namespace, not about what is or is not stored in the file system.