Are you rewriting Cake, PHP or just building your own stuff? ;-) Jeremy Burns Class Outfit
[email protected] http://www.classoutfit.com On 19 Oct 2010, at 16:37, Joshua Muheim wrote: > Yeah I knew that, but still IMHO they should have been named with a "_" > prefix. > > I guess sometimes I'm searching for too much sense in stuff... I'd > rather should just accept it as given and don't think too much about > it... But I often feel like a child: I wanna know WHY something is the > way it is... :-) > > On Tue, Oct 19, 2010 at 5:05 PM, euromark <[email protected]> wrote: >> those are callbacks - special methods belonging to the controller >> logic >> thats why >> >> >> On 19 Okt., 16:07, Joshua Muheim <[email protected]> wrote: >>> OK, so why do several CakePHP methods don't have an underscore? Like >>> beforeFilter()? I know, CakePHP will probably be smart enough to not >>> allow this to be called as an action through the browser, but >>> still...? :-P >>> >>> On Tue, Oct 19, 2010 at 4:00 PM, Joshua Muheim <[email protected]> wrote: >>>> Thanks for the hint with the components! :-) >>> >>>> On Tue, Oct 19, 2010 at 3:59 PM, euromark <[email protected]> >>>> wrote: >>>>> yep, thats right (for example from the acl shell) >>>>> or YOU could accidently misinterpret it as an action >>> >>>>> so either way it is still helpful to use the underscores :) >>> >>>>> but in most cases you usually can put that could in a component >>>>> doesnt have to be a controller _function... >>> >>>>> On 19 Okt., 15:44, psybear83 <[email protected]> wrote: >>>>>> As mentioned before, I have taken over an existing CakePHP >>>>>> application... and it's not a very good one. I'm working since a month >>>>>> or more on things like writing tests (there haven't been any before), >>>>>> cleaning and rewriting code etc. >>> >>>>>> So now I stumbled over some methods in a controller that aren't >>>>>> actions, but they don't have underscores "_" in front of their >>>>>> names... so I ask you: they *really should have*, right?? >>> >>>>>> I know the conventions, that protected and private methods and >>>>>> attributes should have an underscore (or even two in some conventions) >>>>>> for visual reasons back from the days of PHP4, but that's not what's >>>>>> really important here, right? It's important here because when not >>>>>> having an underscore, it will be "mistaken" by CakePHP for an >>>>>> available action, right? >>> >>>>>> So aside from that, are you following the convention mentioned above? >>>>>> Should I use it when coding a CakePHP application? Or is it somewhat >>>>>> outdated? >>> >>>>>> Thanks >>>>>> Josh >>> >>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >>>>> with their CakePHP related questions. >>> >>>>> You received this message because you are subscribed to the Google Groups >>>>> "CakePHP" 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 >>>>> athttp://groups.google.com/group/cake-php?hl=en >> >> Check out the new CakePHP Questions site http://cakeqs.org and help others >> with their CakePHP related questions. >> >> You received this message because you are subscribed to the Google Groups >> "CakePHP" 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 >> > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" 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
