ArchReactorOS icon indicating copy to clipboard operation
ArchReactorOS copied to clipboard

Implement an __autoload function.

Open kwisatz opened this issue 14 years ago • 1 comments

Implement an autoload function that automatically includes class files according to a specific naming convention.

I.e. : class ClassName is inside lib/class_name.class.php

kwisatz avatar Apr 09 '10 14:04 kwisatz

CamelCase to nocamel_case would be preg_replace('/(?<=\w)([A-Z])/','_$1',$camelCase);

but is actually pretty expensive in time.

Will resort to ClassName --> classname.class.php unless we need to figure out the filename from the class name.

kwisatz avatar Apr 09 '10 21:04 kwisatz