Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Config class Database Interface
  • Hi All,

    I was recently introduced to FuelPHP and am currently evaluating it for a potential project and am quite impressed so far. I come from Kohana so it's been fairly straight forward. However, as far as I can tell the Config class in Fuel relies on a PHP file in the configuration directory and cannot pull a config from the database. For my application, this is a very important feature. Are there any implementations for this functionality for Fuel or is something I would have to build into the Config class myself?
  • The core functionality includes driver support for file based configuration storage, either in PHP array, INI, Yaml or json format.

    As it is driver based, it's not a problem to create a class called Config_Db, so you can do \Config::load('myconfig.db'); Once defined the Config class will pick it up automatically, just make sure your class implements \Config_Interface.

    I vaguely recall a similar question some time ago, so maybe a (google) search might reveal it's already written.

Howdy, Stranger!

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

In this Discussion