TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Read init values from a config file?
  • I notice that synapsestudios' Kohana template reads the init array from a config file (after first instantiating Kohana::$config):


    This seems like a good idea. :)

  • I haven't used kohana in a while, but looking at your link they are also defining the modules AFTER that, so the system is essentially in a flat mode.

    If that's the case, you might as well do: Kohana::init(include 'init.php');

    As I recall the reason their code works there would be Kohana's habbit of auto-injecting APPPATH and SYSPATH into the paths before the modules are initialized.

  • I think I see what you mean. :-) But in the default bootstrap the modules are defined after init() as well. Would it only be in 'flat' mode with respect to the bits used before and during init()? I mean Kohana::$config, Config, Config_File, and the actual init.php config file? Other things used later would therefore be part of the Cascading Filesystem?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion