Re: Re: Re: making controller methods private?
yea try it On 10/17/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 10/17/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > > > no but it does make it private 'like' in cakephp in that it can not be > > called with the /controller/method from the browser. > > Hey Sam, > > Is this actually a feature in CakePHP that it won't let object methods > that start with an underscore be accessed directly? If so, that's a > neat bit of coding! > > -- > Chris Hartjes > > "The greatest inefficiencies come from solving problems you will never have." > -- Rasmus Lerdorf > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Re: making controller methods private?
On 10/17/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > no but it does make it private 'like' in cakephp in that it can not be > called with the /controller/method from the browser. Hey Sam, Is this actually a feature in CakePHP that it won't let object methods that start with an underscore be accessed directly? If so, that's a neat bit of coding! -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Re: making controller methods private?
no but it does make it private 'like' in cakephp in that it can not be called with the /controller/method from the browser. On 10/17/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Just preceed the function name with a underscore. > > > > /me counts to five before replying to avoid getting labeled as angry or > uncaring > > Please note, the following rant is based on PHP, not Cake > > Adding an underscore to a function name DOES NOT MAKE A FUNCTION > PRIVATE. That is a commonly-used convention in PHP though, to make it > easier to figure out with functions SHOULD be private if your language > does not support making private methods of an object. > > Ahem. > > In PHP 5 you can declare a function private so that code that uses > your object cannot access that function directly. I take it from > Nate's comments that it has been done already for Cake 1.2. > > (There, that wasn't so bad...or angry) > > -- > Chris Hartjes > > "The greatest inefficiencies come from solving problems you will never have." > -- Rasmus Lerdorf > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---