Content directory (content/) and extension (.md) are currently set as a global constant via define(). This makes it cumbersome to change them in a local installation. It would be much more convenient to set them as config.php parameter. This also opens up additional opportunities for plugins and allows testing.
As both of those parameters are used late in the request cycle/after the core bootstrapped, I don't see any problem to set them as config.php parameter.
The only drawback is that it may break existing plugin code. On the other hand it's easy to fix, just replace CONTENT_DIR with Registry::get('Phile_Settings')['content_dir'] or CONTENT_EXT with Registry::get('Phile_Settings')['content_ext'].
Content directory (
content/
) and extension (.md
) are currently set as a global constant viadefine()
. This makes it cumbersome to change them in a local installation. It would be much more convenient to set them asconfig.php
parameter. This also opens up additional opportunities for plugins and allows testing.As both of those parameters are used late in the request cycle/after the core bootstrapped, I don't see any problem to set them as
config.php
parameter.The only drawback is that it may break existing plugin code. On the other hand it's easy to fix, just replace
CONTENT_DIR
withRegistry::get('Phile_Settings')['content_dir']
orCONTENT_EXT
withRegistry::get('Phile_Settings')['content_ext']
.