I have to agree with miles, this is a feature I've wanted for a while. The newest 2.0 milestone has retutning the model reference as apposed to an array as a toggle feature slated for release. Guess we'll just have to wait and see. *fingers crossed*
Nick On Nov 16, 12:09 pm, Jamie <[email protected]> wrote: > No - the point of MVC is really to separate the manipulation of model > data from the view through the use of a controller. There's nothing > wrong with reading data from a model in a view, unless you like > needless overhead. Lots of respected frameworks do it (like the Zend > Framework). > > On Nov 16, 10:50 am, cricket <[email protected]> wrote: > > > > > The whole point of the MVC pattern is to separate the Model from the > > View through the use of a Controller. > > > On Tue, Nov 16, 2010 at 3:45 AM, Joshua Muheim <[email protected]> wrote: > > > Also an interesting idea, Miles. Thanks for mentioning it. > > > > On Fri, Nov 12, 2010 at 8:00 PM, Miles J <[email protected]> wrote: > > >> I dislike this also. Cake really should have more than 1 model type: > > >> DAOModel and DataModel. > > > >> One deals with database interactions, while the other manipulates a > > >> dataset for the view. > > > >> However, there is nothing stopping you creating these extra models. > > > >> $this->set('data', new UserDataModel($this->User->find())); > > > >> On Nov 12, 5:23 am, Joshua Muheim <[email protected]> wrote: > > >>> I'd like to warm up this topic again. :-) > > > >>> I decided to pass model instances to the views instead of just their > > >>> $data attributes. So is there a way to tweak the paginator to do > > >>> exactly this? > > > >>> Thanks, > > >>> Josh > > > >>> On Thu, Oct 28, 2010 at 8:26 PM, euromark <[email protected]> > > >>> wrote: > > >>> > i tend to do those things "on demand" > > >>> > using a behavior to add new keys or even doing it in the model > > >>> > afterFind() etc often results in additional work without actually > > >>> > needing this information > > >>> > but of course this depends on the particular case > > > >>> > On 28 Okt., 20:10, cricket <[email protected]> wrote: > > >>> >> On Thu, Oct 28, 2010 at 10:03 AM, euromark > > >>> >> <[email protected]> wrote: > > >>> >> > thats not correct for PHP5 anymore > > >>> >> > in PHP4 you needed to do this > > >>> >> > but in PHP5 it is passed by reference by default, afaik > > > >>> >> Agreed on passing the model to the view. But this could also be > > >>> >> accomplished in afterFind(), adding new key => value to the data > > >>> >> array. > > > >>> > Check out the new CakePHP Questions > > >>> > sitehttp://cakeqs.organdhelpothers 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 sitehttp://cakeqs.organdhelp 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 sitehttp://cakeqs.organdhelp 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
