FTP (and other class) Default Config Files |
[eluser]adamfairholm[/eluser]
Hey everyone, For a few of the CI classes, there is a variant of this line in the documentation: Quote:Setting FTP Preferences in a Config File I was wondering if anyone knew if there is anywhere in the code where this specifically happens and these variables from the config file are initialized. I can't seem to find anything in the FTP, Loader or Config classes. I know that there are a few classes that have this (I believe the Email class has one as well). I'm writing a class that would be great to use this feature with, but I'm at a loss of how to make that happen. Any pointers would be appreciated!
[eluser]Phil Sturgeon[/eluser]
That actually happens in Loader::_ci_init_class(). Take a look at line 860.
[eluser]xwero[/eluser]
To let the classes not dependent on the config class the settings are loaded as a class parameter. The down side is that the settings aren't a part of the config class as the config file content is added to the class directly.
[eluser]adamfairholm[/eluser]
Thanks! There it is. I missed it in the Loader there. That's too bad that the settings aren't part of the config class though. I guess it's handy in certain circumstances, though. |
Welcome Guest, Not a member yet? Register Sign In |