On Jun 18, 1:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In 1.1 and 1.2 Dispatcher::start() first calls beforeFilter() and then
> the startup methods of components. This leads to a situation where in
> beforeFilter() components are available (constructed) already, but
> their startup() method wasn't called yet - although you would expect
> that.
>
> Is it intentional to call beforeFilter first and initialize the
> components after?
Components can have a initialize method, which is run immediately
after they are instanciated, and a startup method which is run after
the controller beforeFIlter.
see the foreach loop in this method
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/controller/component.php#L60
Note that components extend object, that link is to the cake class
which handles instanciating components, it isn't the base class for
them. The beforeFilter is run sometime after that. (handled in the
dispatcher if you are curious)
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---