views:

109

answers:

1

when i do a return in an init() function in my bootstrap what does it actually do? so that i can do say a:

$x = $this->bootstrap('something');

oh or isit so that i can do a $this->getResource('something'). if i do not do a return i cannot get the resource later?

also, when i do a $x = $this->bootstrap('something');. i guess that will be before bootstrap() automatically runs? when is that?

when i do a $x = $application->getOption('something'); i am getting the 'something' array from the config? do i actually need to do a $application->getBootstrap()->bootstrap('something') first?

+2  A: 

Hi! ,

$x = $this->getResource('something');

its used to Initialize and retrieve a "something" resource so you can use that resource else where in the app

$x = $this->bootstrap('something');

is used to to bootstrap the 'something' resource like DB , View ...etc in other words [to ensure that the something resource is initialized]

while

$x = $application->getOption('something');

is used to read the config file of the 'something' resource it should be like

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

highly recommend you to check the quick start

tawfekov