Kiril Angov a écrit :
> The the method sfLoader::loadHelpers() you use include() instead of
> include_once() and I am having problem with helpers which depend on each
> other (cannot redeclare function). So my question is why would you use
> include instead of include_once() because as soon as I change it to
> include_once it stopped giving me this fatal error (of course) and no
> other side effects for now. If it is a bug I will file a report, I just
> wanted to run it through the list first.
If it is for performance purpose, we could use:
function_exists('helper_function') or include('helperfile.php');
But this imply naming consistency in helper function names :/
Same for classes:
class_exists('sfClass') or require('sfClass.class.php');
The *_exists() PHP functions are a lot faster than the require/include
ones, and (require|include)_once ones are known to have deplorable
performances too.
++
--
Nicolas Perriault http://www.clever-age.com
Clever Age - conseil en architecture technique
GSM: +33 6 60 92 08 67 Tél: +33 1 53 34 66 10
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---