I have to agree $this->Helper.

It makes more sense when reading your code that you're referencing a
Helper Class and not a local variable you have set somewhere else in
your code.
Also i quite often have for loops where i'm building up a html string
for output and $html would be the logical variable name but then you
get the clash.

So i hope Cake Devs intend to remove $html etc in 2.0,

On Jan 21, 3:20 pm, euromark <dereurom...@googlemail.com> wrote:
> of course 100%
> $this->Helper
>
> a) cleaner
> b) fit for 2.0
>
> :)
>
> On 21 Jan., 15:53, connrs <shu...@gmail.com> wrote:
>
> > Hi guys
>
> > I suppose this is my first ever post on any CakePHP related forum/group so
> > get the unicorns and badger porn out. I've been actively using CakePHP since
> > 1.1 and have generally beaten and thrashed the framework into doing what I
> > liked until progressively it has become the shiny framework of today.
>
> > As I've refactored and refactored over and over, Cake has finally beaten and
> > thrashed me into better use of Behavior, Component and Helper; I use those
> > three so much now to keep my code tidy and help make testing manageable.
>
> > These days, I find that there are times I want to name a helper to match the
> > model when working in views. I feel that models named Invoice suit an
> > Invoice helper more than concocting weakly linked names; yet, in the past
> > I've often mashed up the oddest of names so that I can avoid variable
> > collisions. I, personally, find this method much more MVC (I've seen this in
> > my occasional expeditions into RoR).
> > *
> > *
> > *TLDR;*
> > *
> > *
> > Since 1.3, have you begun refactoring to take advantage of $this->Helper or
> > have you continued to make use of $helper and used creative naming to get
> > around things?
> > *I guess I'm just trying to gauge whether or not I'm personally taking the
> > right path with $this->Helper over $helper*
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to