Timeline for Using PHP namespace hybrid for Drupal modules
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 28, 2015 at 16:17 | history | edited | avpaderno♦ | edited tags | |
| Jun 3, 2014 at 0:26 | vote | accept | donut | ||
| Jun 3, 2014 at 0:26 | answer | added | donut | timeline score: 0 | |
| Apr 30, 2014 at 22:19 | comment | added | donut | That makes more sense. I agree about writing modules for general consumption. I'm in a situation where I'm writing a lot of very specific modules and am considering using this pattern. Thanks for the responses. | |
| Apr 30, 2014 at 22:01 | comment | added | Clive♦ | I meant that purely from a Drupal (not language) point of view. Drupal has it's own coding standards which it's best to follow, and namespacing functions isn't part of that. If you're not bothered about the Drupal conventions, then sure, do whatever works for you...but if you're looking to write a module to contribute back to the community, or want it to be understood easily by other Drupal devs in the future, it's best to stick to standards | |
| Apr 30, 2014 at 21:18 | comment | added | donut | Why isn't namespacing functions a good idea? Mainly to avoid having to use the module prefix in code within that module (or namespace). I mean, the whole point of the Drupal prefix convention is to provide namespacing. Why not use PHP's built in namespacing features when possible? | |
| Apr 30, 2014 at 20:35 | comment | added | Clive♦ | BTW I meant namespacing classes is a good idea. Functions, not so much IMO. What problem are you trying to solve? | |
| Apr 30, 2014 at 17:14 | comment | added | Clive♦ | Namespacing your code is a great idea...but it's already been done better than that :) drupal.org/project/xautoload | |
| Apr 30, 2014 at 17:12 | history | asked | donut | CC BY-SA 3.0 |