Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Few Structure Issues
  • I have been going threw the Fuel API and have noticed a few weird things. First from index you call the application bootstrap and then from the application bootstrap you call the Fuel bootstrap as from the code i seen on the application bootstrap there is no need to go to the application bootstrap first. Secondly why do some classes have namespaces and others don't example's being the autoloader sits in global and the DB sits in core? This made little to no sense to me.
  • First from index you call the application bootstrap and then from the application bootstrap you call the Fuel bootstrap as from the code i seen on the application bootstrap there is no need to go to the application bootstrap first.
    The Core is actually loaded by the application, the application being the actual... ehm... application. That also allows you to put a few overwrites in there and things to do before the core is loaded.
    Secondly why do some classes have namespaces and others don't example's being the autoloader sits in global and the DB sits in core? This made little to no sense to me.
    The Autoloader is actually the only example and that's been changed in 1.1 where it is in Fuel\Core.
  • the Core is actually loaded by the application, the application being the actual... ehm... application. That also allows you to put a few overwrites in there and things to do before the core is loaded.

    See this is where you guys loose me as the application really is not loading the core but calls the core bootstrap witch loads the core then you guys proceed to use the core from the application bootstrap. Why not just forgo the call to the App bootstrap and call the core bootstrap and then have a config file for directory specific to Extensions of core classes as this then initiate the autoloader and config as you already do but in the core bootstrap as this will give you a single access to the fuel core and would eliminate the bouncing back and forth between the core and application. also good to know there will be namespaces throughout the core now and kudos on the PSR0 compliant autoloader!
  • As Jelmer explained, the app bootstrap needs to be called before the core bootstrap because it is used to extend core classes (which reside in your app/classes folder), these need to be defined before the core is loaded. This is how it works, I don't see what your issue is...
  • I have no issue and have all the respect in the world for you guys developing Fuel. But from my own programming experiences i have found it more user friendly when everything is in one place as far as configuration options. Witch you guys have in the bootstrap with being able to extend or override classes. As for a better structure wouldn't it be more user friendly and allow for a more unified structure to have such configuration options in a config file?.

Howdy, Stranger!

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

In this Discussion