Re: Seeking clarification

2011-11-18 Thread euromark
I now submitted my final patch for the upgrade shell: http://cakephp.lighthouseapp.com/projects/42648/tickets/2117-improvements-for-20-upgrade-shell#ticket-2117-15 the removal of the name attribute worked quite well. all thousand files where it occurred have been successfully processed so far. O

Re: Seeking clarification

2011-10-27 Thread 100rk
On Oct 27, 3:40 am, euromark wrote: > I added the removal of those names in my UpgradeShell script with > these patterns: Nice! -- 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

Re: Seeking clarification

2011-10-26 Thread euromark
I added the removal of those names in my UpgradeShell script with these patterns: $patterns = array( array( 'remove var $name = ...;', '/\bvar\s*\$name\s*=\s*(.*);/',

Re: Seeking clarification

2011-10-26 Thread 100rk
Talking about $name property, it is not just case of PagesController and CakeErrorController (descendant requires to set either $name or $viewPath) - it is used in most of CDC plugins - I know it saves some processor ticks, but it also forces developers using classes like model Users.User as parent

Re: Seeking clarification

2011-10-26 Thread Larry E. Masters
The only reason $name was set in your own classes in older versions was for support in PHP 4. The code below is the same code as in previous versions but in PHP < 5 MyClassName would be returned as myclassname. To make conventions work I suggested people set the $name attribute when I first wrote t

Re: Seeking clarification

2011-10-26 Thread 100rk
IMO, only reason to add $name property could be - extending class (controller/model) where it is defined as well. For example, core PagesController contains line - public $name = 'Pages'; - therefore your controller class MyPagesController extendsPagesController { ... } will need $name propert

Re: Seeking clarification

2011-10-26 Thread Larry E. Masters
It is not needed, and should not be used. -- Larry E. Masters On Wed, Oct 26, 2011 at 11:30 AM, Jeremy Burns wrote: > Just asking a possibly dumb question. I'm working through the 2.0 > tutorial to become more familiar with it. Is it required/advised/ > unnecessary to add: > > $public $name =

Seeking clarification

2011-10-26 Thread Jeremy Burns
Just asking a possibly dumb question. I'm working through the 2.0 tutorial to become more familiar with it. Is it required/advised/ unnecessary to add: $public $name = 'Whatever'; ...to models and controllers? The tutorial sometimes has it, sometimes doesn't. PS I thought it was connected with P