Hello, i have a problem when i use Email::forge() with all default value and default config file. The config doesn't load on the Email class on
<code>
/**
* Init, config loading.
*/
public static function _init()
{
\Config::load('email', true);
static::$_defaults = \Config::get('email.defaults');
}
</code>
But if i do something like that it's work and the config file is loaded. I don't know when the static function _init() is tigger when the forge() is launch but he don't find the config file. It's a little weird.
<code>
Email::_init();
$email = Email::forge();
</code>
I use fuelphp 1.2.1
_init() is called when the class is loaded, by the autoloader. See it as a static version of __construct().
So there is no need to call it yourself, it will be called.
Ok, i understand but the problem still there. If i don't call _init(), the \Config::get('email.defaults'); still return NULL, but if i call _init() just before forge(), the class find the config files. It's little hard to explain properly.
Very weird. If you add a debug to _init(), you should see it being called. It's one of the core functionalities of the framework, if that wouldn't work, nothing would.
You don't have anything else that might overwrite the config?