Closed augustohp closed 12 years ago
But these magic constants should point to where? If we just translate them, they would inherit the scope from Instantiator::parseConstants, and __DIR__
, __FILE__
, __CLASS__
and many others would loss all its meaning.
I believe we should discourage using magic constants in INI files.
We should discourage but we really need them. There is not much problem with FILE and CLASS, actually there is no need to them as I see it.
But the DIR is needed for paths relative to the application. The first value that comes to mind is the PATH to the dir of the parsed INI file. What do you think?
Can't think of a proper use case for this. Enlighten us please!
Registering a class path for Doctrine, for instance. It needs a path that is relative to the application, to call the method to register the Entities path I need to create a constant that would not be used in anywhere else but the INI file.
You mean for the annotation driver? Can I see the sample? I believe registering it relative to the include_path should work.
DIR for example ...