chrwei / ArchReactorOS

web based software system for manging membership based community
http://archreactor.org/wiki/index.php/AROS
GNU General Public License v2.0
17 stars 3 forks source link

Implement an __autoload function. #21

Open kwisatz opened 14 years ago

kwisatz commented 14 years ago

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 commented 14 years ago

CamelCase to nocamel_case would be pregreplace('/(?<=\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.