Anonymous | Login | Signup for a new account | 2024-04-20 04:29 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
View Revisions: Issue #850 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0000850: Automatic class name retrieving based on it's filename | ||
Revision | 2010-09-06 05:37:48 by alex | ||
Description | I propose we auto-guess php class name based on filename, where that class is stored. For example "my_super_helper.php" file will contain "MySuperHelper" class and nothing other. There are several benefits of this: * no need to specify class name in unit config file (only class filename remains); * developer will be forced to properly name class file to connect it's class to the system. We'll make some presumptions, that: * "eh" will transform to "EventHandler" * "tp" will transform to "TagProcessor" * all classes from "core" module, that are not event handler/tag processor should have "k" in front of their name Before: * UsersEventHandler, users_event_handler.php * UserGroupsEventHandler, user_groups_eh.php * kThemesHelper, themes_helper.php * CustomFieldsTagProcessor, custom_fields_tag_processor.php After: * UserEventHandler, user_eh.php * UserGroupEventHandler, user_group_eh.php * kThemeHelper, theme_helper.php * CustomFieldTagProcessor, custom_field_tp.php |
||
Revision | 2010-09-05 20:54:02 by alex | ||
Description | I propose we auto-guess php class name based on filename, where that class is stored. For example "my_super_helper.php" file will contain "MySuperHelper" class and nothing other. There are several benefits of this: * no need to specify class name in unit config file (only class filename remains); * developer will be forced to properly name class file to connect it's class to the system. We'll make some presumptions, that: * "eh" will transform to "EventHandler" * "tp" will transform to "TagProcessor" * all classes from "core" module, that are not event handler/tag processor should have "k" in front of their name Before: * UsersEventHandler, users_event_handler.php * UserGroupsEventHandler, user_groups_eh.php * kThemesHelper, themes_helper.php * CustomFieldsEventHandler, custom_fields_tag_processor.php After: * UserEventHandler, user_eh.php * UserGroupEventHandler, user_group_eh.php * kThemeHelper, theme_helper.php * CustomFieldEventHandler, custom_field_tp.php |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |